Today is the start of the 2016 Seven Day Roguelike Challenge, which prompts people to try making a roguelike game in seven days — this year I’m giving it a go with a game I’m calling Leaves Underfoot. I’ve tried a #7drl a couple of times before and never quite managed to finish in time, but this year I have a couple of advantages over previous attempts:
- Before the challenge started, I wrote some handy functions for handling display, input, and some other basic framework stuff — which is not only allowed but encouraged;
- I have the entire week off work, and a clear schedule to sit and drink tea and code non-stop.
The player wanders semi-aimlessly around an infinite forest, killing monsters and collecting treasure. There’ll be a score, and an end goal — probably fetching an amulet in true roguelike style, but I haven’t decided yet. It’s very, very simple, but then it will be the first roguelike I’ve ever finished. I have some ideas for a somewhat un-roguelike combat system that should make it a little different, and the graphics (with thanks to Quale’s Scroll-o-Sprites) are adorable enough to make it interesting for a quick play through.
I’m not planning on blogging every day throughout the week, but I am more or less live-tweeting as I go along, and at the very least I’ll do a recap here at the end of the week.
Pre-challenge code written
- HTML/CSS framework for displaying maps
- Logging function for displaying basic messages
- Function to display a graphical tile at a given location in foreground or background
- Function to display a map based on pre-fetched data
- jQuery listeners for keyboard input
- Rudimentary map generation and critical pathing
- Sprite sheet coloured in (this is the best bit)
Day one recap
- Finished map generation, including an endlessly frustrating rewrite of the critical path function which chains maps together and gives the player a “guaranteed” route through the woods
- Maps are saved to server via AJAX/JSON — in theory I could twist this to make the game very un-roguelike and have all the players share the same persistent world map
- Monsters appear on or near the critical path — just rats for today, but I have tiles for bats, spiders, skeletons, goblins and all kinds of things prepared
- Rats move according to something so simple I daren’t even call it AI
- Game recognises when a player/rat or rat/player bump happens to initiate combat
- Basic launch/front page for the game