Times, trials, and turbulence.
I can’t believe it’s been two months that I’ve been working on this gosh-darned map editor, but I’m very happy to say that it’s done (the Alpha release, that is) and just about ready to be distributed. I can hardly wait to jump back into development on the actual game itself. 😉
(Battleforge — nearly ready to go!)
The last feature missing, which was mini-map generation, is now implemented. I ended up using a slightly different approach from the one I outlined in my previous entry. The original plan was to render everything to a bitmap in memory and then save it as a PNG to disk for later usage in-game. It was a nice thought, but just plain impractical if I wanted to do any kind of nice effects on it, such as the alpha-blending needed for patches and (one day) lighting effects. That would end up taking perhaps over a minute to generate! Hoy!
I settled instead for “cheating” a little bit. Not only is it much easier than writing software-rendered equivalents for all of my existing OpenGL-based drawing, but it’s far faster. In fact, there’s no longer any need to save the mini-map data to disk at all anymore — it’s fast enough to be done on-demand upon each map load. All that happens now for the generation is simply rendering the whole map all at once, without any off-screen culling, but at a 1/8th scale. The final image fits within a 512×512 box on-screen, and I directly copy the pixels from the backbuffer into memory, where a texture for the mini-map is then created. After that, it was just a matter of drawing on dynamic objects (crates, players, etc) in real-time over top of the mini-map texture.
(The mini-map in action. Edges will likely be clamped in the future to avoid showing the black ‘void’ beyond the map area)
Webstart Adventures Ahead
Although the editor is complete, I really want to get Skirmish — that implies both editor and game — Webstart-ready. This will make the distribution and setup of the game far easier on players, and it will also automatically check and administer game updates every time it is launched.
I’ve never used this technology before, though, so it will take a little bit of doing before the transition is fully made. Webstart requires all resources (graphics, maps, audio, etc) be packaged inside of JAR files and digitally signed, and imposes a strict means of loading data within the app. What’s more, users need to “accept” my digital signature the first time through in order to allow Skirmish security permissions such as file i/o and network access. A little bit of an annoyance, but in the long run I’m adamant that the gains greatly overshadow the downs. It’s been a great asset for many popular Java games, such as Wurm Online.
In summation: for those of you interested in trying out the alpha version of Battleforge, the Webstart-ready version should be ready to go in the very near future, barring massive Earth-shattering disaster on a cosmic scale. 🙂