Minehunter project

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By genete
:warning: Old Version Published before Godot 3 was released.

Hi,
I’ve started to learn to create games with Godot a few weeks ago. This project is just a way to understand the way that Godot handles the game creation. It is a clone of the classic old Minesweeper game so I think it doesn’t need presentation at all.

Link to code

Although the it could seem that it would be easy to create a clone of minesweeper you’ll realize that there are some interesting tricks to make it easier to code.

Notice that the game should take account bombs and flagged bombs around the mouse target tile to decide what to do in each moment. Also, the game can be designed in two ways:

  1. Letting the master script handle all the tiles as passive data and
    changing its status based on the input and the bombs and flags
    values.
  2. Letting the tiles decide its own behavior based on its own
    status and sending to the rest of tiles signals of the new
    situation.

I decided to go for the second solution by the use of groups. Groups are full powerful to send tasks to all components of the groups without need to write many code. Also, the ability of a node to belong to many groups at the same time allows to send common signals as well as individual signals to certain groups without much effort. It is interesting also to discover how well works the signals to groups even if you remove nodes from the notified group in real time.

I think this game exercise could be good as example of groups usage to complete the documentation of the GDScript and nodes behavior.

Feed back is welcome.

Here are some screenshots:

10x10 image
enter image description here

My game was originally gonna be a minesweeper clone >.> Then i just kinda went “Naaaah” and turned it into a different game using the same resources so far

The_Duskitty | 2016-03-30 17:05