4 ms·
For those who didn't watch the stream: The game is a Zelda-inspired, first person, 2.5D dungeon crawler written in Java. __Modus operandi:__ 1) He first buil
by pygy_ 15y ago
For those who didn't watch the stream:
The game is a Zelda-inspired, first person, 2.5D dungeon crawler written in Java.
__Modus operandi:__
1) He first built a robust engine, very powerful from a game developing standpoint. Building the various types of blocks (walls/grounds/objects) and entities (player/ennemies/bullets/boulders) needed remarkably little code afterwards.
2) He used Paint.NET as a level editor, and color-coded the blocks and entities. He used the alpha channel to identify the switches, the doors, the ladders and the ennemies (from 255 downwards). Doors and switches are automatically linked by id. This allows to put all the level design logic on the map.
3) The most important: short iterations. He spent more time play testing the game than writing it, systematically retesting the old stuff when he introduced a new feature, or even after changing a detail.
4) He's sharp, knows his tools, edits the code very fast and makes few mistakes. He also has a lot of experience, which allowed him to make good initial decisions that facilitated the development process.
__The platform:__
Java+Eclipse turns out to be an excellent platform for writing games.
While it doesn't have a REPL, its debugger allows to patch the code while it is running, offering a very dynamic environment, especially to tweak the gameplay. It felt very lightweight. I wonder if the other JVM languages have similar debugging facilities.
The simplicity of the language makes the code easy to read and modify (provided you have a sound initial code base). Once you get used to it, the boilerplate becomes transparent (like the parentheses in Lisp).
The refactoring abilities of Eclipse are excellent.
The speed of the JVM allows to write fast low level code, and its object system make it straightforward to organise the high level logic.
__Some tricks/hacks:__
All textures are drawn in 4 shades of gray, then colored when they are loaded. It allows to reuse the wall textures for all levels, and to differentiate the bosses from the normal ennemies, at no cost, etc.
His playsound function creates a new thread every time it is run.
If I counted properly, there is at most one level of inheritance, even where more would have made sense from an orthodox OO design standpoint. There's some code duplication, but he only duplicated robust, well tested code.
The low resolution and limited palette allows the rudimentary graphics to look good (old school). The animations have only two frames.
.
.
On a side note: Did someone save fist few hours of the stream, when he wrote the 3D engine? I couldn't watch the process, and his Livestream account has been deleted.
- ordinary 15y agoHe wrote that while on Livestream, so it's not on Justin.tv or Twitch.tv. Unless he also wrote to a local file, there's a good chance that part is gone for good.
- Zolomon 15y agoHis livestream account seems to have been deleted, did anyone download the streams? I didn't get a chance to watch the first few hours of making his engine.
- tydok 15y ago(I can't access YouTube at the moment to verify the link) Notch coding "Escape" - 20.8.2011 livestream www.youtube.com/watch?v=QYBUCYUNn3Q
- pygy_ 15y agoAwesome :-) Thanks a bunch!
- DamagedProperty 15y agoAwesome! Glad someone was thinking and recorded it.
- mbrzuzy 15y agoThanks for the link!
- jannes 15y agoUnfortunately, this video is not available in Germany because it may contain music for which GEMA has not granted the respective music rights. I hate these music industry pricks. Why did they block this? Because he's listening to some web radio in the background? That's ridiculous.
- jmcejuela 15y agoSame problem :(, in Germany too. Do you know any other source? Could somebody post it on another page?