Timer scheduling, dangerous lasers and some low-end animation

Updates with this edition: Lasers now destroy ships as they should, and if they hit multiple ships, they only destroy the closer one, not whichever was spawned first.  Of course, I haven’t plugged in any damage values yet, so everything is a one-hit-kill weapon, so the laser will just destroy the second ship in line one millisecond later, but whatever.  It’s in there.
More importantly: The timer scheduling code is done and functional.  That was some pretty tricky code.  Ships now “explode” when destroyed, though the explosion animation is pretty terrible due to my lack of artistic skills.
Also: Projectile code generalized a little bit more.  Now supports projectiles bouncing off the walls and/or having a set lifetime before they expire, all set by flags on each individual projectile.  Also added a “fake” projectile type, to handle purely visual fragments from explosives (which are not in yet).
Added a texture to bullets
So I’ve got the event queue programmed in, which allows me to have animations (or, at least spinning, shrinking, expanding, changing transparency over time, stretching, that sort of thing), so now the problem is making the animations not look stupid.  I’m working on explosions right now, and it’s… kind of difficult.  I can pretty much do everything that the UDK can do in textures (except I have to hard code it instead of dragging boxes around and drawing lines between them like you can in the UDK), so I’m planning on analyzing a lot of their techniques, though obviously not using their actual textures.  One interesting thing about this whole experience is I’m learning a lot of what’s behind those magic boxes you can drag around in the UDK- I’m realizing now that a _lot_ of them are basically directly translated into one-line function calls (assuming DirectX is like openGL), plugging in the values you type into the box for the arguments to the function.  At least, that’s true for the texture stuff.  To a large degree, a lot of the UDK is a pretty, graphical, drag-and-drop UI for writing code, especially graphics code.  Which makes sense given my theory that it’s intended for artists so they don’t have to constantly wait for programmers to progam in their art.

For next time: Add in an always-on call to a LUA function to the event queue, to act like a “heartbeat” hook for LUA.  Want to write some LUA that will execute once per frame?  Stick it in that function.
Add projectile fragments to the explosion, and maybe change it to expand rather than shrink and spin.  Change the explosion to flip through a bunch of textures, maybe. Change the ship image from a placeholder to what I actually want it to look like.  This will proably take a while to get right. And, I guess now that the timer queue is in, the next big missing chunk is AI.  So I should start thinking about that.

ver9

This entry was posted in State of the Game. Bookmark the permalink.

Comments are closed.