Utility code for my ludum dare entry.