3 ms·
The huge switch statement is probably because that's the easiest thing to do with a simple 48 hour game. There is no point in wasting time writing clean mainta
by Impossible 15y ago
The huge switch statement is probably because that's the easiest thing to do with a simple 48 hour game. There is no point in wasting time writing clean maintainable systems with a lot of glue code when you're writing a simple game in 48 hours that you are the only developer of and will probably never look at again after the compo. Even in a larger commercial game it wouldn't be too hard to maintain that stuff (maybe clean it up by defining constants). I've written similar code for LD48 map loaders.
There is a good chance that the "engine" that's rendering the maze for him is something he wrote during the competition. Its not too hard to write a simple maze renderer using OpenGL or even an oldschool raycast software renderer like wolfenstein's pretty quickly. All final LD48 entries must submit source as well, so once Notch is done you could take a look at what he's doing. Probably not anything you can easily turn into a library or reuse :).
- rch 15y agoOne thing I've noticed is that he tends to put a little extra energy into the quality of everything - say 20% more than the minimum. And I mean Everything - from consistent naming and semantics to the visual touches (like the color of the cloud over the moon). This fractional boost to the quality of so many components really adds up.
- rayval 15y agoAlso, the switch statement is easy to add incrementally and change. Every so often, he'll go back to it and add some new values and a couple of lines of code.