Javascript Gauntlet
Tue, Apr 30, 2013As a kid, my 3 favorite arcade games were Donkey Kong, Outrun, and Gauntlet. Last summer I had a go at making an Outrun-style racer that turned out reasonably well, so next up was Gauntlet.
I’ve been poking at it on-and-off for a couple of months and I think its in a reasonable state to share with the world… with one really, really, important caveat:
IT’S SINGLEPLAYER ONLY!
I know, that’s utterly ridiculous, how can you make a Gauntlet game without multiplayer? But there are only so many hours in the day (full disclosure, I also didn’t have time to do any cheesy speech synthesis - so no “elf needs food badly” - sorry).
Now, I fully intend to build a multiplayer version, but I probably won’t get the time to tackle that until later in the summer, but I didn’t want that to stop me from putting the single player version up and writing up a few ‘how-to’ articles while it’s still fresh in my head.
So, with that mea-culpa out of the way, let’s play Javascript-Gauntlet:
- play the game now
- view the source code
- read more about how it works
Features
- Play as Warrior, Valkyrie, Wizard or Elf (press 1-4 to start a new game)
- ARROW KEYS to move
- HOLD SPACE to fire
- ENTER to use potion
- Lots of monsters - Ghosts, Demons, Grunts, Wizards and DEATH
- Destroy monster generators before they spawn more monsters
- Find the exit to the next level
- Use keys to open doors
- Eat & drink to restore health
- Collect treasure for high score
- Use potions to kill all monsters in view
- 8 Training Levels
- 10 Dungeon Levels
- Music & Sound FX
For those of you who’ve never played Gauntlet before (for-shame, go watch the original arcade version in this video), its basically
- kill or escape the overwhelming hordes of monsters
- find the exit
- survive as long as possible
- get a high score
This version is not intended to be an exact Gauntlet-Clone. It’s my personal interpretation, mostly based on my vague memories of the arcade and c64 versions. The levels are different, the graphics and sounds are different, and the gameplay is different, but it follows the same pattern and is, I think, unmistakably Gauntlet.
If you are looking for an exact Gauntlet clone, you should go download the MAME emulator and find the Gauntlet rom and go play it - it’s still awesome fun to play (way more than my version).
Limitations
Here are a couple more caveats to admit:
- Modern browsers only - Chrome, Firefox, IE9/10
- NO mobile support - If I wanted to build mobile I would go 100% native.
- NO touch support - no mobile, no touch
- NO endgame - exit from Dungeon Ten and you get a simple fade-to-black.
- NO multiplayer - already talked about this one :-)
- Performance - might be occasional stutter during garbage collection
How-it-works Articles
I’ll be at RailsConf in Portland all of this week (Apr 28th - May 2nd) with the LiquidPlanner dev team, partaking in a whole-load of Ruby and Rails Web development chit-chattery, but when I return, I hope to have some time to write up a number of “How-To” articles over the coming weeks, covering such topics as:
- Game Foundations - fixed step game loop, resource loading, sprites, etc.
- Game Level Maps - Using a simple image to define levels.
- Game Entities - data driven entities.
- Game Collision Detection - simple grid collision detection.
- Game Logic - state machines and pub/sub event handling.
Until then, enjoy your Dungeon Delving!
Related Links
- play the game
- view the source code
- read more about game foundations
- read more about game level maps
- read more about game entities
- read more about game collision detection
- read more about game logic
Attributions
All music is licensed, royalty-free, from Lucky Lion Studios for this project only. If you re-use this project for your own purposes you must license your own music please. All sound effects are licensed, royalty-free from Premium Beat for this project only. If you re-use this project for your own purposes you must license your own sound effects please.
Background tilesets (walls, floors, doors) are provided by
Entity sprites (players, monsters, treasure, etc) are almost certainly ripped from an old (s)NES console ?