Delta Engine Blog

AI, Robotics, multiplatform game development and Strict programming language

Lost Squadron, Day 10: Editor finished

I was working still on the Editor today, not that much editor features were missing, but a lot of other stuff eat up a lot of development time. Drawing lines for example is really bad in DirectX, either you just draw some primitives and get slow when drawing a lot of them and have a lot of overhead each time setting all states (and recovering from some crazy states the caller might have left, nothing is working as espected) or you use this stupid Line class wrapper thing, which will cut your framerate by the factor 2 or 3 (really great, no wonder noone uses it). Or you can just draw stuff with vertex buffers, but thats also very annoying because you have to create the vertex buffer and handle all that vertex creation, and also obviously not the right approach for a single line.

So I ended up writing a nice LineManager class, which collects all lines draw each frame and put them in a vertex buffer and because the lines are only changed when some big change happens, the vertex buffer can stay the same for a long time and thats really fast. Everthing gets rendered at the end of the frame (used for on screen controls and other stuff anyways). Same thing for filled boxes, color blending effects, etc. lots of helper classes.

The texture blending (as you can see in the image) was also not a piece of cake, but the blending over 5x5 vertices is now a nice technique. The textures are not really fitting good together, when you just put them besides each other, but with this blending technique it looks really good (or maybe I'm just to tired to tell anymore ^^). Another bonus is my new vertex format, which is compatible with a test shader I wrote 2 days ago (which didn't run correctly back then, I only managed to do some basic stuff). Seems like some arguments where missing and the vertex shader wasn't complaining, but crashing some time later (after couple of calls, not really funny to debug).

There isn't much time left, so maybe some features might have to be put on hold because I really want to finish the base game this week (just 1-2 missions, only basic features to see if its really as much fun as I imagine). If its playable a small demo or some sort of beta-version will be available before chrismas this week. Anyways, till new-year the game and the final demo-version should be finished, lets see. Maybe in the next couple of days things can be done more quickly because all the base classes and the complete framework are now completed.


Day 10:
Yup, yesterday no screen, I was too tired. The editor is now finished, only setting objects and the roads is missing, but that should be easy. All the other sub menus and UI is now complete too, even the multiplayer stuff has a UI now waiting for implementation (dunno if there is enough time this week for that, would be nice though). Time for some gameplay this week :-)
Comments are closed