Day 4 Game 4: 30 games in 30 days using Grids for GameMaker

[button url=”https://gamelogic.co.za/examples/30-games-in-30-days-for-gamemaker/Game04/” size=”large”]CLICK HERE TO PLAY GAME 4[/button]

[divider]

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

Developer: Griffiths Sibeko (Mircosoft AppFactory)

Game 4 is a version of the classic game Lights Out, with a couple of twists. We call it Power Out!

First, we used three cell states instead of two. The aim is still to get all the cells to the same state (in this case to turn off all the sparks), but you toggle the neighbors of a cell from red to green to off.

SingleCellThe second difference is in the cells that we used. Instead of coloring the entire face with one color, we made the cells black and then drew a line between two opposite edges of each cell (which we animated for the sparks). We created a mirror of this for the second cell and then placed them depending on checkerboard coloring. We used a rect grid and this created the appearance of a diamond grid.

Lastly, we changed the toggle neighbor funtion to make the mechanics of the game easier to understand (it was very tricky before this!). We changed it from neighbors of faces to neighbors of edges. This only applies to neighbors of edges where the diagonal line of the clicked cell touches. Therefore, clickling on a cell will toggle 6 neighboring cells.

ExplanationThis diagram illustrates how the neighbors work. The blue dot shows the cell clicked on, and the green dots show the neighbors that are toggled. You can see that only the sparks that touch the spark of the click cells are toggled.

[divider]

Click here to check out all 30 games 

[divider]

Scroll to Top