Character classes and dungeons.
Progress has been slow but steady. A lot of work has gone to streamline the asset production process, and I think it's paying off.
I bit the bullet and just animated the three additional character classes plus a snake-like monster. I'm getting faster at it, it helps that I can use existing sprites to build new ones from with just alterations.
Meet the classes. You've probably met them before.
So we have a rogue (which will be the primary PC) plus a tank, mage, and healer class. There may be others (I would like to make a ranger class, for example, with pets), but for now those will do to fill out the party of 4.
I have created the foundation for the skills system, and implemented two basic activated skills so far: the tank has a pbaoe "shout" to attract aggro, and the healer has a targeted "minor heal" that heals up to 5 points of health on a targeted ally.
Tank about to take one for the team. Or eight.
The AI will automatically use these skills when in "speed" mode, where the player controls only one character and the AI decides the other characters' moves. (I really have to figure out a better name for this). They cannot yet be manually activated; I'm still trying to decide on the best way to implement the UI to do this.
The engine now supports multiple map files, and there is preliminary support for "zoning" to different maps. Originally, I was planning on one large, seamless map with dungeons integrated. However, having multiple maps allows greater flexibility to add on content after release and possibly tack on multiplayer features in the far, far future. I am also incapable of pre-planning the topography of the world to accomodate for the size of dungeons. It is much easier [lazier] from a design perspective to make the world up out of a bunch of smaller maps that can be connected in arbitrary ways (stairs, portals, or simply "east of that other map").
So, here is the first simple dungeon, with lighting based on light sources.
Thanks to the sacrifice of the tank, they made it out. Also note the torches are light sources.
I hate snakes.
Boring performance issues
- The light maps are generated when the level loads. Apparently, just because something happens instantaneously on a Core i7 does not mean it doesn't take 30+ seconds on an Apple A4 or whatever the iPod touch uses. So these need to be precalculated. No big deal, they should compress well. And since I can take my sweet time computing them, I can occlude based on obstacles or do other effects. I do plan to implement dynamic lighting (for carrying torches, light spells, etc), my plan is to index into a small static lightmap offset by the coordinates of the PC with the light source, that should be fast enough.
- The font rendering is a serious performance hit when the text starts flowing. It doesn't help that each character is rendered (I think) 10 times.. 9 times for the black outline and once for the center. So the first step is to have the bitmap font already have a black outline. I imagine this will yield a 10x speedup. As well as fix the text fading to grey instead of just purely becoming transparent. If that doesn't help enough I can cache the rendered text as its own bitmap, it doesn't change every frame.
- If you run really far away from enemies that are chasing you, the performance will begin to seriously suffer as A* degrades. I need to cap the map search distance and enemies should give up once you've gotten far enough. They should give up anyways once aggro degrades enough, I need to look into that as well. I could also "leash" the enemies to a spawn point like in an MMO.
Thank you for taking the time to read my rambling, posting these journals helps keep me motivated. It is also nice to look back and see how much crappier this used to be, and wonder how much less crappy it can become.