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.
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.