
Hero Character in Blender
Once we’d figured out our implementation details, we needed to pick the tools to get us there. We quickly determined that Blender was well suited to our needs. Blender is an open source modeling program, whose abilities span modeling to video editing to being an entire game engine. It has most of the features of 3dsmax or Maya, all of the useful ones, and many more to boot. Of course, the fact that it’s free helps a great deal. But honestly, out of all of the open source alternatives I’ve tried over the years (Gimp, Open-office, Thunderbird) Blender is the model of “getting it right” (Alongside, perhaps, Firefox).

Particle Effect in Blender
Our modeling and rigging is done in Blender, and textures are created in Photoshop. From there, we render out a series of individual frames in the standard 8 directions to a PNG format. We then use ImageMagick, a command-line tool that comprises a lot of the functionality of Gimp or Photoshop. ImageMagick gives us the ability to run batch manipulations on the images, and compose them together in interesting ways.
From the resulting PNG format, we compress to PVR, using apple’s texturetool program. PVR is an interesting format; in a nutshell, it’s a highly regular compressed image format that can use either 4 bits or 2 bits to represent pixels. The huge advantage to this format is that the iPhone supports it natively, and can render directly from the compressed format. We found that PNGs didn’t work because a) decompressing the PNG format takes up a ton of CPU time and b) when uncompressed, a 1024×1024 image will be stored at its native size of 4MB. When you only have 20MB or so to work with, that’s pretty limiting. For comparison, a 4bpp PVR of the same image is only 512kb – yes, that’s 1/8th the size. However, for small images the compression artifacts become very noticeable, so for those we actually double the resolution of the initial images. For those keeping track, the compressed double-resolution image is still only ½ the size of the original resolution uncompressed image.
BlenderNation also has a quick writeup on us.
Posted in Design, Gaming, Prophetic Sky, Software Development, Townrs Defender
We’ve had a lot of requests for insight into our toolset and development process here at Prophetic Sky, so I thought I’d write a few entries to summarize some of what we do here. We’re typically a Windows/Linux workshop, and so we had to make a few adjustments to work on an OSX platform for iPhone development. Fortunately, OSX overlaps a great deal with Linux, and we tend to use a lot of great open source tools.
There aren’t a lot of real statistics for the performance of the iPhone out there, but you can get a rough feel for it by just looking at the existing games out there. Our tests let us to conclude that 3000 triangles/second was a good maximum (we’ve read 6000, but couldn’t reproduce that to be comfortable with it). Even assuming our physics, game logic, AI and special effects didn’t eat into that time at all, if we wanted to fit 20 characters on the screen at once, each character had to be 150 triangles or less. That’s not terrible; many games run with those limitations. But once you realize you still have to fit terrain, trees, towers, walls and spell effects in there, it starts to become very cramped.

Better detail, but less flexibility
So we turned to sprite assets. There are many advantages to sprites – namely that 3000 triangles equates to 1500 sprites on the screen at a time. Also, we can render the characters in much higher detail initially, from source models in the thousands of triangles. The feedback that we’ve gotten on the game leads us to believe that this was the right choice; universally we hear that the game looks beautiful.
There were drawbacks, as well. While we aren’t limited by the rendering power of the iPhone, we are limited by the available memory, and sprites take up a lot of space. In addition, it means our art is limited to running at a fixed frame rate, and in fixed directions – the characters can only run in one of the 8 standard directions, for example. Also, we cannot change the perspective – moving the camera will just show that the sprites are flat.
Posted in Design, Prophetic Sky, Software Development, Townrs Defender