As usual, I have an idea for a first-person 3D game. This one popped into my head a week ago and is the culmination of several tenants for such a project:
Focus on story via exploration and voyeurism (e.g. for AI behaviour).
Quick to play, easy to get lost. Wandering may be crucial to progressing.
Use of atmospheric electronica (Rudy Adrian, Stars of the Lid, etc. etc.).
Mostly emergent controls and non-static dialog using text-to-speech.
Engaging story which is a mystery you unravel to complete the game.
Simplified models so I can concentrate more on their movement.
What I’ve decided on so far is an frigid runic setting of a large city filled with synthetic beings: robots for all intensive purposes. They do not, however, know they are robots and that is part of the story and your character’s story. I have some concept for the lore involved and a vague thought for the initial chapter (something I can sink my teeth into). The core game is you start out and must find out who you and your people are: where did it all begin.
Speech synthesis in the context of video games has interested me for some time. Today I messed around with eSpeak, IBM TTS, and AT&T Labs. Using the last of those three I generated the following audio clips which have pieces of the story I’ve been drafting. These are named based on the AT&T voice, not the character who would be saying them. My descriptions follow each sample.
This is conceivably the very first line of the game, when you are dropped behind the eyes of this being. You hear yourself (the character you play) speak and exactly why is part of the mystery. It starts as a game mechanic to set mood and assist you, but is actually part of the story too. It’s difficult to get the cadence right with all the TTS tools and something I’ll have to play with some more. I wanted a main character voice that was not overwhelming to listen to and also to have a bit of emotion to it.
The society is not particularly advanced, and their ability to repair (heal) is left to technicians (versus physicians) which are the equivalent to the doctors of yore which thought to cleanse people by bleeding them. This particular technician, however, is more like a hacker with much better skills but a bit of a criminal record. Perhaps him or someone he knows can even give upgrades …
Our main character eludes to the presence of genders within this group of humanoids which could possibly mean they’re some kind of manufactured species. The fact is that the personalities of the two types are distinct and comparable to our own contemporary versions. I can’t call them sexes since these people do not sexually reproduce (no facilities for that). While I want to avoid too many stereotypes, looking into this world requires convincing me that these are essentially human creatures even if they’re not strictly biological. This helps form a relate-able emotional connection.
I love the way this one turned out, much like the very first one up above. It hints at some issues that you’re looking for the roots of. How long has this race been around, where did they come from, and why can’t they remember any of that?
I’m suffering from a temporary insanity that I may pursue: putting all the helper PHP I’m writing into a single monolithic PHP file: obremsdk.php. Crazy, right? Well, hear me out … and I mean me (talking to myself via blogging is another layer of psychopathy I’m sure).
I started the PHP for ObremSDK as I do with any framework in the past: separate files for discreet sections of modular logic. Theoretically that is the right way, but as time goes on I wonder if I use this more out of habit than anything else. Like my early obsessions with OOP, am I over-abstracting? Is a single file going to far? In general, I end up including everything because I need bits and pieces from everywhere. Modules can’t have too much high-level logic or they start becoming more tightly bound to each other.
For example, my latest “tiny” addition is to add some quick RSS/Atom parsing. I started a file called xmlfeed.php then rss.php and now I’m staring at xml.php where much of the common logic is ending up. Okay, so I put all the abstract XML stuff into that file, but then what’s left in rss.php? Now in order to use this code I need to include two files, and that’s just for the high-level part of the logic. For HTTP requests, I’ll need my http.php module and then there’s the file access stuff I built in fileio.php. Decisions for where things go and why start piling up as this thing slowly grows and I wonder why I’m taking the time to divide it as I go.
What if I start with one file and then divide it later if certain pieces become obviously separate from the common scenarios? I like to think of this as an evolution of sorts. I start with the body of code that I’m using and as things go into disuse they get pruned into separate legacy files. The maintenance there is updating old code to include those separate files, but then they’re probably stuck on a particular version of my code base anyway. There’s no reason why I can’t put a major version number into this big blob (obremsdk1.php) and then backport nasty bug fixes as needed (if ever).
It should be pointed out that I’m not trying to build up a gigantic framework like Zend for every situation. This is merely the code I’ve written that I like to share between projects. Well, I think I’m going to play with this idea some more.
It initially shocked me to get this oddly-wrapped envelope from New Zealand, since it contained no indication of who it was from. I have a friend named Ewan who’s a Kiwi — was it from him?
Mysterious Envelope from New Zealand
Actually, it was a couple of CD’s from Rudy Adrian whom we did an interview of on FanSiter a couple weeks back! He does atmospheric electronic music and it was a pleasure to kick back and listen to some of his most recent work, called “Distant Stars”. He also included a signed copy of Twilight.
Rudy Adrian - Twilight (atmospheric works vol. 2)
I have been finding this genre to be very useful as a backdrop when I’m reading, playing video games, or writing code. It doesn’t demand my full attention, but instead tugs at the back of my mind.
Wow! I am typing this into the “Visual” tab on WordPress in FireFox 3.5 and dang is it noticeably faster. To clarify, I installed Ubuntu 9.10 (Karmic Koala) on my EEE 901 and thus have gone from Firefox 3.0.X to 3.5.X. Browsing seemed snappier, but now I know it’s magnitudes better based on how this is performing. Previously I could practically watch the characters appearing, now they feel like they’re there before I finish hitting the keys. This is awesome!
I’m also trying AdBlock Plus instead of NoScript to see how well it fairs. NoScript is great, don’t get me wrong, but sometimes it takes me a moment to notice I’m missing something on a web page. Some sites require JS for form submissions and things and you won’t know until clicking a button does nothing. So I’m hoping ABP will use up less of my brain cells.
It’s the end of another week, this one kinda fell off the edge at contracting job. That is, I started to run out of things that needed doing and didn’t feel like wasting my time and their money by sitting in a cubicle sopping up their cash. Instead I mostly worked half-days and played Dragon Age or read The Gathering Storm in the evenings. No programming, but I have been adding posts to Bikini BOP here and there (always a fun activity).
What I’ve been meaning to do, as a smallish activity, is rip out the last of the PHP code I have that requires Zend Framework, specifically the Feed classes. In true perfectionist fashion my biggest stumbling block has been what to name the class and its file. Dumb, right? Well, I started with XmlFeed (xmlfeed.php) but that sounded too generic and you wouldn’t necessarily know what it does at a glance, so I’ve switched to Rss (rss.php). Too obvious? Oh well, I tried. It will read Atom feeds to an extent as well, but it will basically boil it down to the same components as RSS.
Another quirk, since I’m writing this for myself, I found myself designing all the property names (these will be array keys) as 4 characters. What’s that called? Not OCD, well not really. My mind was more of in a puzzle-solving and creative mood: how can I make these mostly apparent but keep them in 4 characters? It’s a little crazy too, I admit, but here’s what I came up with:
name: <title> This one isn’t great, but it still makes sense.
uuid: <guid> I could have gone with the latter, but other parts of my code (GData class) had already used UUID and I thought I’d keep it the same. In fact, I copied all these except “from” from their usage in my GData class.
body: <description> Following a sort of “email message” motif, huh?
date: <pubDate> I’m working exclusively with published dates so all others are ignored.
href: <link> Specifically the HYPERTEXT reference (e.g. link to a web page). For Atom feeds this will find that HTML link which for my purposes is what I always want.
tags: <category> Nothing much to say here except that I drop all the fluff around categories and just keep their names.
from: <author> This is my favourite one! I didn’t want to use “auth” for fear it would be confused with “authorization” or “authentication” (as I commonly use that abbreviation). Since a name and/or email address goes in this field, it continues that email motif I mentioned earlier.
So as soon as I have the urge, I’ll be plopping this into ObremSDK and get FanSiter running on this netbook where I don’t have (and didn’t want to download) ZF.
Having a bit of inspiration after a productive day at the office, I decided to implement this small feature that’s been on my mind for weeks: restriction maximum picture dimensions and/or size during the preload process. There are two big reasons: 1.) FTP push and 2.) because I have a lot of super-high-quality image sources. The Grace Park site is the first to take advantage of this, getting a maximum width of 400 (about 25% the width of some of the sources!).
PicMax is a variable specified in the site text at the site level, e.g. at the very top. I wanted it to follow this syntax:
picmax=WIDTHxHEIGHT,SIZE
I also wanted each one of those components to be optional. You can specify all, one, some, or none and achieve the effect you’re looking for. The aforementioned fansite simply specifies “400″ which means “400 maximum width”. However, what if you just want height? Easy: “x400″ (400 maximum height). You see the ‘x’ and ‘,’ are delimiters that need to be present in order to specify what’s after them. So to cap all pictures at ten thousand bytes, you’d say “,10000″. Maximum width and size but no height: “400,10000″. How do I achieve such magic?
Damn I love regular expressions! Now, to retain your sanity you can specify a zero in the whatever spot you don’t want filled in and the code will operate the same. When I first approached the parsing I wondered how I’d structure the pattern, but it turns out just making everything optional solved it. Crazy!
When pictures are resized for scale, their maximum file size is capped at their previous file size. This prevents the unintentional effect of shrinking one and having it grow on disk (the opposite desired effect). Usually resizing dimensions is enough to squish the byte size, but it’s difficult to know what to set the JPG quality value to and re-saving any lossy format is an easy way towards bloat.