
Main Post
I thought it was about time that I wrote a little post about my game.
To be honest, I have hated this theme since it first started appearing in the theme voting many LDs ago. However, I don't shy away from LDs just because I hate the theme. My inspiration this time around was Minesweeper. In Minesweeper you start off with no information about the puzzle's layout and your first click will determine where you start from in solving the puzzle. So, I wanted to make a similar kind of puzzle game.
In tile.flip() your goal is to flip all of the tiles that do not contain bombs. However, each tile will also flip over a certain arrangement of adjacent tiles, indicated by a diagram on top of the tile. Nearby bombs are indicated by a red coloring on an adjacent tile.
The biggest challenge in making the game was writing the code for randomly generating puzzles. My first attempt involved generating random layouts of tiles and testing to see if they were solvable or not. However, there were so many unsolvable puzzles that it took way too long to find a solvable one. So, instead of generating a random completed layout, I generated a random layout of tiles, excluding bombs. I then found a subset of tiles that could all be flipped. If the subset was a proper subset, then the remaining tiles were turned into bombs. In this way, I got puzzle generation down to less than a second.
The second biggest challenge was life. Between two jobs, preparing for the academic job market, a 1 month old baby, and spending time with my wife, I only had about 6 hours to make this game. All things considered, I'm happy with what I made, flaws and all.
Link to Game
https://ldjam.com/events/ludum-dare/45/tile-flip
Addendum
If you like game jams, consider joining the Philosophy Game Jam taking place in about a week. https://itch.io/jam/philgamejam-2