When I started working on this project nearly a year ago, the frame rate rarely stayed consistent as the player moved around the world. The engine was simply allocating and discarding too much memory, resulting in frequent pauses in gameplay as the interpreter ran garbage collection. As I re-wrote more and more of the game engine, I came to understand exactly which types of objects and arrays I needed to allocate, where I could cut down on allocations, and where I might use an “object pool” to stash allocated objects for re-use.
Continue reading
I’ve been writing about an in-browser voxel game project of mine over at voxeling.tumblr.com. The game – if it can actually be called that (probably not) – is built on a JavaScript game engine for building minecraft-like environments. If you want to try it out, contact me.
The following screenshot shows a lava flow created in-game using lava and obsidian textures. Credit for the textures and lava flow goes to phionabrie.
Continue reading