Retrospective: Bun-Fu Development

Looking back on our first Android game, Bun-Fu: Way of the Rabbit – we want to share some early development shots in the hope that this will kick off a regular feature on this blog showing work-in-progress, beta and pre-alpha images from early stages of various projects, and in future posts, we’ll reveal images from a new game currently in development so you can watch it grow into a finished product.

Starting with the finished game (below), we’ll be going backwards in time to the earliest test shot. So this is what the game ended up looking like…

The finished game you see here had some very humble beginnings as we learned about the challenges and limitations of mobile game development.

The finished game you see here had some very humble beginnings as we learned about the challenges and limitations of mobile game development.

The final look of the game came about over several iterations and experimental changes to the tile-set, which was still being drawn right up until the last minute, and some decorative items like bushes were a handy way of hiding seams in the background. In the beginning of the project, it was unclear how far we could push the humble Android, so a lot of detail was added to test the limits of the tile-map renderer.

Earlier maps had less detail and some placeholder graphics, such as the ugly torch-flame you see here.

Earlier maps had less detail and some placeholder graphics, such as the ugly torch-flame you see here. An unfinished HUD shows the delta-timing value in the upper-left.

Using OpenGLES 1.1, the maps were drawn with quads that could be arbitrarily sized and positioned on 3 axis (z for draw-order from back-to-front) so while platform tiles conformed to a strict grid, decorative tiles in the foreground and background could be placed anywhere, which allowed some creative freedom in levels.

Tilemap editing was done in a custom-made editor that used a single layer for all foreground objects, and pre-sorted them by draw-order to reduce work by the game engine.

Tilemap editing was done in a custom-made editor that used a single layer for all foreground objects, and pre-sorted them by draw-order to reduce work by the game engine.

A custom in-house tile-map editor was quickly built, allowing levels to be exported, optimized and tested on a real device in minutes. Instead of exporting distinct layers, tiles were pre-sorted by draw-order and given a z value, which told the game engine if a particular tile was collide-able (z: -1 = background, 0 = collide, 1 = foreground). Any tiles currently inside the view frustum were then dynamically batched and drawn as triangle-strips to keep things nice and fast.

Overlapping tiles were exported in the correct draw-order instead of having distinct layers. This caused some issues early on, but allowed an unlimited number of overlapping tiles giving plenty of detail in environments.

Overlapping tiles were exported in the correct draw-order instead of having distinct layers. This caused some issues early on, but allowed an unlimited number of overlapping tiles giving plenty of detail in environments.

The image above illustrates how tiles were not constrained by a strict grid (unless they wanted to be) and below, how it all begins to make sense with textures applied…

With tiles loaded in and displaying properly, the game began to take shape.

With tiles loaded in and displaying properly, the game began to take shape.

The screenshot below is the very first test shot taken the day we finally got the tile-map renderer working. At this stage there was no frustum culling or draw-call batching, so frame-rates quickly hit the floor as the maps grew in size, so optimizing the game was an on-going concern during the first few levels.

This is the earliest test-shot of the game, still at the concept stage and running in an emulator.

This is the earliest test-shot of the game, still at the concept stage and running in an emulator.

We dropped OpenGLES 1.x after this project due to its limitations, so the Bun-Fu engine will be gathering dust never to be used in future games, but we’re now working on an in-house 3D engine based on OpenGLES 2.0 and the kung-fu bunny will likely re-appear in some form or other.

One thought on “Retrospective: Bun-Fu Development

Comments are closed.