Originally posted to dev.to/mrlopis
When this year's theme came out ('BACK'), I decided I wanted to make a game about the crew of a ship that wrecked on an island and is trying to go back home. The would need to collect resources to re-build the ship, in a game that would be a mixture of Cookie Clicker, Minecraft and that old Grow flash game.
I immediately started prototyping an island generation algorithm. It was gonna have everything: ocean, sand, grass, trees, ores, animals, fresh water lakes, maybe even rivers (my favourite prototyping tool is https://codepen.io/).
Except I've never done anything remotely like this. After two days of frustrating results, I gave up on the game and went to bed.
The next day I realized all the time I spent on the failed island generator didn't get me closer to the game I set out to build at all. So I scraped everything and started over. What was I set out to make? I sat down with a notepad and wrote.
Most projects I came up with are a result of trying to balance and rebalance the game.
I had totally scraped the plans for a map generator. But I wanted some kind of UI. I decided to keep the log from the prototype and create a sort of small "map" to hint the player to what is happening. I gave the game elements and controls animations to make everything more satisfying to watch (also a bit more chaotic, but that's ok (I hope)). I made the island using SVG. SVG in the times of HTML5 is both a blessing and a curse. But more about that in another article.
The game is hecka confusing at first. You start playing, your people die after two days because everything happens too fast; so your shout at the screen and refresh. You try again, you get distracted reading the project descriptions; every one starved. You refresh. You try again. It's so annoying to refresh the page to restart a game. Quick-death games need to also be very quick to restart. So I added a restart button that resets the game. Adding the reset button was also a very refactoring exercise because it forced me to gather all the game data in the same places and initialize them properly.
Finally, my game needed a reward. I felt that the result win/lose was a sad ending and not very engaging. So I developed a score equation:
In case you're wondering, my best score so far was 349 points
I believe I managed to make a small entertaining game and I'm looking forward to next year's challenge. Let me know if you can finish in 30 days! I believe it's possible!
I developed my game using Typescript but never got around to actually using types. I used gulp to build my game and to zip my files.
I coded on VSCode, on Ubuntu, on an XPS13.
I worked about 15 hours per week 5 to 6 days per week since day one of the competition.
Apart from the gulp project builder, I made the game from scratch without any libraries. I'm still writing a more technical post-mortem.