A deconstruction of Cave Story's game engine