Day 1 Game 1: 30 games in 30 days using Grids

[button url=”http://www.gamelogic.co.za/examples/30-games-in-30-days/game01/index.html” size=”large”]CLICK HERE TO PLAY GAME 1[/button]

[divider]

[slogan]This is what Grids did for us today. What can Grids do for you?[/slogan]

Game 1 is a riff on Lights Out (a game we also implemented on a few grids for our examples) and is played on a hex grid. Instead of trying to switch off all lights, you are trying to trap the monsters.

The controls work the same as Lights Out. Left click on a cell to change it, and all the neighboring cells will change as well.

The implementation is similar to vanilla Lights Out. You start from a solution state, and toggle cells to form a puzzle. Working backwards from a solution ensures there is a solution. The puzzles are all procedurally generated. Using only random puzzles produces ugly, unsatisfying puzzles, so we make the puzzles symmetric. This involves two steps:

First, we select the monsters to be symmetric when possible. We have different algorithms for different types of monsters:

  • One monster: Position is selected randomly.
  • Two monsters: One position is chosen randomly. This is reflected about one of the horizontal axis or vertical axis.
  • Three monsters: One position is chosen randomly. We rotate this by 120 and 240 degrees to get the other two positions.
  • Four monsters: One position is chosen randomly.  The other three are obtain by reflections about the horizontal and vertical axes.
  • Five monsters: You can’t get five monsters in the game 🙁
  • Six monsters: One position is chosen randomly; to get the rest, we rotate this position by 60, 120, 180, 240, and 300 degrees.

Second, we select the cells to toggle with the same scheme as above, except that we select randomly whether how many cells (2, 3, 4, or 6) to toggle for each randomly chosen toggle position. The possible cells that can be toggled is selected from the initial cells that are in a “closed” state, and all their neighbors.

We have played quite a few versions with the toggle-mechanic. Here are our observations:

  • You can learn a few basic principles to solve most puzzles (and possibly all – we are not that good yet ;)) One principle involves shapes of connected cells that can be moved as units – we call these “gliders”, which shapes can destroy which other shapes, and which shapes can be destroyed against the walls.
  • The different grids have the same basic principles, but finding the gliders and destroyable shapes becomes the challenge.
  • Presentation matters, at least in two ways. First, whether or not to toggle the central cell does not change the game mathematically (although the puzzles look different when they are generated in the same way). But recognizing the shapes is quite different. Once you are trained in the one mode, it is extremely difficult to play the game in the other mode. Second, when making the eye-games (see for example this one), it was initially very strange for the center cell not to be toggled – with the eyes… it just felt wrong. But somehow, putting in mouse-over effects fixed it!
  • Many games uses pre-designed puzzles. This allows the player to learn new techniques more progressively. When the patterns are generated procedurally as we have done here, the experience changes from “playing against the pattern” to “playing against the algorithm”, and indeed, knowledge obtained about the algorithm can be exploited to solve problems more effectively.
  • Having the player find solution patterns (as opposed to just clearing all cells) makes the game more difficult. At one stage we had the monsters moving: this made the game almost impossible.

[divider]

Click here to check out all 30 games 

[divider]

Scroll to Top