Dec 2013

Scourge, Part V: And Miles To Go Before I Release

Wherein the pendulum analogy completely breaks down

Hello, I’ve returned. No, I didn’t forget to blog– I’ve just been busy. How busy, you ask? Well, Scourge now runs on Flash, HTML5 and on native targets, and on top of that it looks super great, so, pretty damn busy.

Scourge on Flash
Scourge on HTML5

It doesn’t look like much until you type in the “makeGame” command. If you follow it with a number, or with the word “circular“, you can see the game “running” with some slightly different parameters. I suggest this one:

makeGame 4 circular

Anyway. How exactly has Scourge changed in the past eight months?

  • It’s up to date. Haxe 3 and NME (rebranded as “OpenFL“) have both updated, and the Scourge takes advantage of both in lots of places.

  • It’s cleaner. Scourge’s core game code is more readable, with improved Pointers and Nodes, and its graphics package is solid. (Nodes, in particular, have been broken down into two types: Node and Locus. One handles state and the other handles spatial relationship. Together, they represent a space on the game board, but separating them makes it easier to operate on them.)

  • It’s more efficient. Objects are being pooled wherever possible to keep garbage collection at bay. The game runs way under-budget, except when the AI and such are working. I’ll throw them into Worker threads sometime soon.

  • It’s more powerful. The ROPES is more flexible now, and the game can now display a simple board, regions of text, an interactive console, and many other neat things.

  • It’s looking more awesome. Text can be hard to get right, and my game is all text for now. Since it’s my first real attempt at anything 3D, I treated fonts as textures to apply to quads, and that sort of worked. There was always a problem with legibility and sharpness, though. A 2007 paper from Valve details an alternative for rendering glyphs and vector graphics; I tried that, and not only does everything look better and read better, it’s also granted me the ability to tweak individual glyphs’ blurriness and fatness.

  • And it’s running on Mac, HTML5 and Flash. The OpenFL rebranding in May included temporary changes that removed support for Flash’s Stage3D API. Panicking, I ported the game to WebGL, and then to the 64-bit Mac C++ target. With a hack I inherited from Ronan Sandford (aka ‘wighawag‘), I was then able to compile non-Flash shaders to Flash. As things currently stand, I can build Scourge for Flash, HTML5 or the Mac easily– though non-ASCII text has proven to be an interesting obstacle, which I may make the subject of a future post. In the meantime, I’ve contributed code to the OpenFL project that’ll make cross-platform development of 3D games a little easier.

    Long story short, a brief hiccup in the OpenFL API motivated me, for better or worse, to make Scourge the first (I think) cross-platform 3D OpenFL project. Had I just waited a couple weeks for Josh Granick– perhaps the hardest-working programmer I know– to update his freely available library, I wouldn’t have made the jump so quickly, but it’s totally worth it!

Earlier this year, I described my attention as a “pendulum”, swinging between the game’s core code and view code. Now that they’re integrated, and newer challenges appear, it doesn’t make sense to maintain that analogy. Throughout its development, my main focus has been on making the game playable as soon as possible, and that’s the direction it’ll continue to grow in.

Anyhow, that’s where the game is currently at. I may take some time away from it to clean up this blog, though– I’ve realized that it’s mostly a project journal, so it would be cool to simplify it, plug it somehow into my Git repo, and style it to look more Scourge-related. More importantly, I need to learn how to properly embed images in this thing!

You can leave a response, or trackback from your own site.

Leave a Reply