GDY Tutorial - Making Sokoban

Note

It’s recommended to follow the short GDY Schema tutorial which will help validate any issues with GDY files as they are being created.

This tutorial will take you through building a simple game with GDY. At the end of this tutorial you will have recreated the Sokoban game in Griddly.

The tutorial comes in three main stages which represent each of the three main configuration stages, Enviroment, Actions and Objects.

The top level of GDY files always look like this:

Version: 0.1
Enviroment: ...

Actions: ...

Objects: ...

Enviroment - Define all the objects that might exist and how they will be rendered on screen.

Actions - Define the mechanics of the environment. This is how the different objects interact with one another.

Objects - Define how the player (or players) interact with the environment and design the levels.

Afterwards the environment can be loaded by Griddy and used in other projects. In this tutorial the environment will be loaded into an OpenAI gym wrapper and can be played with using your keyboard.

–> How to play the tutorial game