Engine progressing slowly but not-so-steadily..

Once again, I've been improving the platformer engine. I have done a lot of internal restructuring which isn't directly visible on the screen. Remember, this project started as a quick hack testing JBox2D, so the oldest parts of the code were a total mess. Cleaning it up, I implemented modules, that the engine keeps processing. These modules (e.g. GameModule, MenuModule, OptionsMenuModule) are basically separate states and can be ran separately of each other. They also support transitions, so a title screen could fade into the main menu, which could then roll off the screen presenting the actual game. Currently I have an initial loading screen that fades into the game. Yes, all this doesn't sound very exciting (and in reality it isn't), but it makes the code much more cleaner and modular. Hopefully, one my biggest pet peeves — which is writing the menus after the game is complete — will be a more pleasant experience with these module supports in place. 🙂 I still have some old physics related code there which needs some refactoring love, so there's still work to be done..

I also did the different rendering path thing I was talking about earlier. The best rendering path allows for some neat shader effects, I did initial tests with a distortion shader — it was nice but didn't work with the bloom effect, something I hadn't realised before. I guess I will need to implement somekind of a post processing subsystem, that does the bloom among other effects. Oh well. 🙂

Another thing I added is an ingame profiler. While extremely simple, it still presents some very useful data so I can see what part of the game takes most time at runtime. So far the slowest thing is the text rendering. Luckily that won't be a problem, since I don't plan having much text on screen in the game (apart from dialogue, but that can be prerendered into a texture). In the current demo I draw the yellow text with a nice shadowy border around it — that is a very brute force approach which just draws the same string a bunch of times. That's very slow. Also the text rendering could probably be optimized more, should the need arise.

I've been also improving the controller support (yes, the game will support game pads! That's the first time in my [released] games — better late than never, right! 😉). The basic support was actually added months ago, I just forgot to mention about it earlier. It's still pretty much unusable, since the buttons cannot be assigned: it just uses the first two buttons on the game pad. And that varies per model, a lot. On mine they're positioned logigally, but on another pad they were almost unusable.. So the game needs a controller configuration screen, where the player can assign the actions to the preferred controller buttons. But that's thinking way too much ahead, I need the game first! 😛

One more thing: I made a simple test release of the engine, so that I could collect some data on how it works on different machines. (I mainly test it on two computers, which isn't that much.) Head over to the JavaGaming.org forums and take it for a spin! Hopefully somebody confirms it works on Mac OS X as well.. 🙂 [Update: Yes it does!] By the way, I will probably take the thing down in some time, since it's still in very early stages and doesn't have any gameplay in it anyways..

That is all this time, stay tuned for more! EDIT: I just realised I had used this very same line to end the previous posting.. Am I really this unoriginal!? Apparently, yes. Yes I am.