Once upon a time there was a little Zombie. The Zombie, being the dumbest of all Afterglow enemies, waits until he has straight line of sight to the player, then rushes at him and fires his gun once he determines himself to be in range. This means that the player keeps catching a hail of bullets right in his mouth, just like he did to so many of the Zombie's friends, family and neighbors.
This screenshot kind of sucks because the UI is in the way, but that's because I had to start running pretty fast away from the little bastard when he started shooting. It may be a good idea in Afterglow to add some sort of "response speed" value that keeps the actors from being psycho snap shots like they were in the original game.
Anyway, a bunch of other nice things came along with this:
Actor AI has access to the current state of the game, letting them do stuff like simple goal planning and access to the same "game services" the player does,
Inventories can be defined in XML using "item stereotypes," which makes building an inventory for an AI stereotype a lot easier,
A long-standing bug in Propane Injector's Vector class has been fixed. As with Novarunner, the bug was present in the negation method. It's really surprising that I managed to screw up that method twice in two different ways, but now it's fixed.
The character statistics UI panel has started to be under development. I won't have any screenshots to show off until it stops sucking, but it will look a lot like a prettier version of the Glow character panel. Get used to it, you'll be using it a lot.
In other news, my class project (once Racist, now "Advanced Combat Racing") is under development, but we've been tied up so much in paperwork that it's been hard to make an enjoyable prototype. I've already started pinching ideas and functionality from the code I write to eventually make a racing game of my own; perhaps a clone of GTI Club that puts the player somewhere pleasant and lets them whale on rally hatches.
Obviously, since I'm hard at work doing the initial planning and scheduling part of my game, I feel that I haven't been updating the journal as much as I should have. However, if you read between the lines you can see that I am extending (by quite a bit) my knowledge of general game development.
Afterglow is getting the character upgrade panel that the original game made famous; I'm just working right now on a suitable layout that will be effective. I'll post some screenshots once that gets working -- after that, most of the RPG system is implemented and needs to be tuned, so I'll relax by making enemies spurt out blood. Anyone have any good resources on how people do decals nowadays in GL?
I return from a bug-fixing hunt. Let me lay my bad trip on you.
Racist
So I was getting this insane bug (on the Mac only) where stuff rendered a spew of polygons all over the screen, ruining everything. I couldn't figure it out; I harassed SHilbert, I rewrote the vertex buffer class from the ground up, I tore apart the model loader which I had just written and practically rewrote that, I ran the entire model loader in Guard Malloc for two hours, I stared and yelled and felt bad about myself.
In the end, it turns out that glDrawArrays takes size to mean the number of vertices instead of the number of array elements, unlike every other function in OpenGL related to vertex arrays. I can't believe Afterglow and Novarunner/Complex ran for as long as they did without me ever noticing that bug occurring. I guess this time around, the models were just so large that they pushed into some other chunk of VRAM.
I made an Executive Decision to leverage the proclivities of Tokamak in order to test out physics, and it seems my teammates have agreed that is probably a good idea. Therefore, I went ahead and cracked open the source distribution and ported it to my Mac (YouTube video!) for no good reason whatsoever. But there it is running (with me massively misconfiguring the rigid body and hacking in groundplane collision).
You might even see a little car tooting around before the end of the week. Don't count on it, though -- there's exciting paperwork to be done.
Afterglow
I fixed the vertex buffer bug in Afterglow as well as did a little bit of tuning to prepare for corpses. This is maybe the only industry on Earth in which I can say the words "tuning to prepare for corpses."
Speaking of the industry, I'm starting to waffle back towards giving the games industry proper a try. Professional software development is stable and responsible and all, but there's no sense of fun, and it's just as badly managed (if not more so). If I'm going to be underpaid and overworked, I'd rather do it doing something that I like. More on this later, or maybe not.
Linkage
If you haven't checked out the aforementioned SHilbert's not-aforementioned blog, you should do it now. His XNA game is pretty awesome.
Some big updates here, people. Let's get right into it.
Afterglow
I spent a lot of time last night pulling out the guts of Afterglow's projectile system, swearing at my own ineptitude and working out a bunch of functionality in order to have it so that you can now kill NPCs and receive experience for their horrible deaths.
I decided against implementing the flags system for now, because I suspect that it will lead to a bunch of singletonitis if I just do it the way I did in Glow. I'll work on it some more.
Next may very well be corpses and gibs. I've got an idea for gibs but it might not be technically feasible.
Racist
I spent today working on the start of the rendering engine for my games class project; I've now got a white triangle rendering.
Nothing particularly special is happening yet on that side. Since I haven't discussed a game name with my group yet, I'm going to call it Racist for now. That might get changed later. In fact, it probably will.
So today, the industry chaps finished up their talk and made off for parts unknown. We also got introduced to a bit of the structure of the course proper (along with a demo from a previous student) and I thought about the renderer on the way home.
I haven't come up with anything solid, but while I was experimenting I noticed that my version of TinyXML was out of date, so I updated it and rebuilt Afterglow. That's about it for today; I'll most likely spend the rest of today implementing the Afterglow configuration and flags system.
Incidentally, if you have any ideas for how to architect a rendering engine for a racing game, let me know. I've never done anything like it before, but the hardware demands are so simple that I shouldn't need LOD or even proper culling. I'm mostly looking for an architecture that will make it easy to use complicated materials as well as (hopefully stencil) shadows.
I figured you would all like to know that I have my first iteration of zombie AI working. The zombie character just kind of mills around (because I've only implemented his idle state), but eventually I'll add some refinement to his shamblin' and allow him to viciously attack the player.
I'm also trying not to implement a lot of systems the same way as Glow, but it's kind of hard when you have something that works. Time will tell if I'm able to get the gameplay to the same level of fun.
The lectures for my games programming course started, and we've got professional developers giving us the entire course content over the course of this week. One of the things that I took out of their first day of presentation is the importance of metrics, so I went home and made a pointless FPS graph that does nothing really useful other than look super cool.
I'll probably have more soon. I think the sim concept is being rejected by my appointed team in favour of a Mario Kart-ish combat racer, but I'll try my hardest to steer (har har) it back into car bore territory.
As an attempt to pre-emptively destroy any hope of scheduling or reasonable expectations from this eventual project, I'm going to post my top wants out of this ahead of time:
Clean driving model -- Free of a lot of temporal aliasing and jitter, steering feels solid and tires feel grippy. I would also like to put in an entire transmission system, but I will probably have to hide it behind the scenes (autotragic) for keyboarders.
Upgradability -- I should be able to buy upgrades for my little car.
Multiple cars
Tile-based racetracks with an editor
Time will see how well this is pulled off, but I'm confident that I should at least be able to make a tiny buggy that will perform well.
If not, I can always use my nice new G25 with Live For Speed, or write my own sim. Wouldn't that be a terrifying concept? You'd get even fewer sexy screenshots and lots more boredom about differentials and gear ratios.
So I did a bit of work on Afterglow today. Big things that are on the docket:
The player getting injured notifies the game state. You get a nice red flash that isn't too distracting.
You can shoot NPCs. My poor twin assistant received many explosive bullets to the face from my modified HK-64 (now with more blowoff valve). You can see a video here. It's really short, but it gives a general idea of what's going on with a riff of Seabound in the background.
Player statistics affect gunplay. Something that's new for Afterglow is that I've changed the way your weapon skill affects your guns. In Glow, upping your weapon skill increased your accuracy as well as your maximum damage. This means that if you had something like all your points put into weapon skill, you could kill people with the worst guns in the game.
I've inverted this; in Afterglow, putting points into gun skill increases your minimum damage. In Afterglow, an HK-64 causes 15-25 damage for an untrained gun wielder; once you put a few levels into Weapons you will then cause 18-25 damage, and so on. I have to do some more playtesting before I figure out if this system sticks, but I like it for the realism even though it cuts into Glow's characteristic psychotic endgame. Trust me, though, there'll be plenty of opportunities to make pistols that cause 750 damage. You are talking to me after all.
For instance, notice how I now have explosive bullets. Is it possible you could find a Bonesaw and then modify it so it fires a wall of fast-moving high-explosive tipped bullets? No, that would be too crazy, right?
Hopefully your Christmas was good; if I had been earlier to the punch this wouldn't have been a 2009 entry, but I suppose you'll have to put up with my late entry.
Today, I implemented the player start entity (controls where the player is "spawned" when the game loads a new level) and made guns actually consume ammunition. Since the last update, I also cleared up some asset caching issues and fiddled some more with my rigid body functionality.
My AI actors are still pretty braindead. I have a half-finished implementation of a look ray going, but I am sensing that I will soon need to figure out a solution to the pathfinding problem.
Additionally, in case you haven't caught it yet, the source code responsible for the Zune lockup has been discovered and poked at. It should be a sobering lesson about trusting your supplier (i.e. don't do it).