So I had some time on my hands this weekend and made major headway on porting the PC version of Spelunky to HTML5. You can play it here.
A lot of people don’t know this, but the original Spelunky was made in GameMaker, and almost a year ago, YoYo Games released GameMaker HTML5 (now GameMaker Studio). This lets you take a GameMaker game and compile it to JavaScript so that it runs in a modern web browser.
Spelunky HTML5 is ported directly from the original Game Maker version, so the methods are exactly the same as in the original game. You get the sceptre by killing the mummy on floor 13 and picking it up. While Spelunky does a great job of randomizing its levels, there are certain rooms that repeatedly appear. One of the best rooms to find is the snake pit. It’s a high pit that has green and blue snakes protecting a pile of rubies at the bottom. The rubies are nice but the real value here is. Download Now Spelunky PC Game Free Torrent Spelunky PC Game Free Torrent is a platform video game. This is a different random phased platform that presents new challenges every time you play. Travel the country and discover incredible places filled with all kinds of demons, monsters, nets, and gold. If you live in a completely Read More ». Spelunky HTML5 Date Added: 2016-06-15 Genres: Cool Games,HTML5 GAMES Description: Spelunky is legends HTML5 online game about Colossal Cave. Play in new tab.
In theory this should be a one-button process, but for a complex game like Spelunky it’s a bit harder.
- Ripped out the entire sound system. It had an external dependency on a DLL, which clearly doesn’t play nice with HTML5
- Fixed some bugs related to the compiler assuming the original programmer was being very careful with their GMScript.
- In particular, in GMScript you can (though it is not recommended) do “foo.bar = baz” without checking to see if “foo” exists. It just fails silently. The compiler does not wrap this in a check to see if “foo” is defined, so JS complains when it’s not. (Note: this may not be an issue in GameMaker Studio. I’m using the last version of GM HTML5 before they switched to Studio.)
- Repaired the rendering pipeline. For dark levels and a few other effects, the original game uses some draw modes that aren’t supported in GameMaker HTML5, so I had to take those out. I will eventually go in and reimplement them using globalCompositeOperation. For now, dark levels are not dark.
- Made some horrible, wretched hacks for bugs I couldn’t track down. For instance, there was a bug that happened when your character spawned on the right-hand side of the level, so I hard-coded it so you only spawn on the left.
The whole port took about three hours. I’m still working on it — I need to reimplement sound, redo all the custom graphical effects, and track down some collision/math issues that are a pain in the ass to reproduce. I also need to add persistence using LocalStorage (right now it doesn’t save your scores).Update Aug 3 2012: a million thanks to the YoYo Games team for taking my three-hour port and fixing a bunch of the bugs (sound! saving! better performance in general!) and polishing the hell out of the game. I mean: look at that art framing the game!