New Web/Mobile Retro Arcade Game Engine
August 6, 2013
It’s been a while since I posted anything, so I thought it’s about time I let everyone know what we’ve been up to.
The last few weeks have been spent working hard on our new game engine. Ever since getting the opportunity to work on The Cabin in the Woods Facebook game we’ve wanted to collect together and do a big rewrite on most of our game code we’ve amassed over the years. The idea being to put together a fairly high level game engine that’ll make the process of developing retro style 2D arcade games much easier and take the emphasis off coding for us, so we can concentrate more on the game design and artwork side of things.
Because we’re using Flash/AS3 as the base, it also means we can easily export to both native iOS & Android apps (via Adobe AIR) and the omnipresent Flash web player, from the same code. The whole engine is being built with this in mind, so we can produce both mobile games and online games with minimal changes and both just work. We’ve also included the automatic addition of on-screen configurable gamepad controls for the mobile version of the game.
The whole engine is built around using tile maps for levels and retro pixel art visuals (which get automatically upscaled to produce crisp pixel art on the destination device, so create universal mobile apps). Using low res retro pixel art is something I’ve wanted to move towards for a while, having first started to get serious about computer artwork myself with Deluxe Paint, back in the day. This also has the added bonus of saving on file size and allows us to forgo the annoyance of having to create different resolution image assets for various mobile device screens.
It’s fully compatible with the Tiled map editor, which we use for level designs. We did start to create our own editor, but why re-invent the wheel.
Above all we’re working hard to make it as easy as possible to get up and running. Game levels are designed in the editor, including placing player character start positions, NPC spawn points, level goal zones, etc. This makes it easy for us to visually design and tweak level layouts, then quickly be able to test them in the current version of the game.
We’ve written our own GPU friendly spritesheet animation system that works with spritesheets exported from Flash CS6, including (amongst other things) a global framebuffer to avoid frame duplication and the ability to set frame labels and play animations with familiar AS3 gotoAndPlay() & gotoAndStop() functionality (effectively emulating the Flash timeline).
But it’s really not going to be necessary to dig into this stuff too much, because we’re designing it in such a way that minimal coding will be needed. Once all the assets and levels are imported, just setting a bunch of game and character parameters should be enough to get the basics up and running. Whether it be a side scrolling platform game or beat’em-up or a vertically scrolling shoot’em-up, we’re working hard to make sure all the basics are already covered. Then it’ll be possible to go in and extend code for game specific things, such as enemy AI.
There’s a long way to go and lots of features left to implement, but it’s certainly getting there and running great on both desktop and Android mobile at up to 60 frames per second (not that we’re ever likely to need to go above 30fps). Next step is to finish off the sound controller and collision detection (where we’re hoping to have configurable hit areas on a frame by frame basis – useful for beat’em-up games with hand-to-hand combat or weapons).
I’ll try and post some updates as and when we get closer to finishing the first usable version. Then we’re hoping to fully road test it by using it to build a couple of games on our to-do list (a swashbuckling platform game, another horror beat’em-up game in the style of Splatterhouse and of course Fyoozd 2, the sequel to our popular puzzle game Fyoozd).