New game, projects and templates
The New game dialog step by step, with Rules or code or Blocks and the seven kinds of game; the templates, what a project is and which files it has, and how to open, duplicate, rename or trash it.
DescribesEditor 0.4.0 For creating without programming
On this page
A game starts in the New game dialog: you pick how it is programmed, the kind, how many play, a template and a name. The editor creates a folder with everything needed and opens it.
The New game dialog#
Press New game on the home screen. If you do not have any game yet, the Create my first game button opens the same dialog.
The dialog starts with a row that has no number, How it is programmed, and goes on with three numbered steps.
How it is programmed#
The first row offers two ways of giving the game its logic. The dialog opens with the first one selected.
| Option | What the dialog says |
|---|---|
| Rules or code | "When this happens, then that" sentences, or hand-written code. |
| Blocks | Pieces that snap together, with the code they write in view. To learn programming. |
The three steps#
- Kind of game. Pick one of the seven cards: Third person, First person, 2D platformer, Top-down, Isometric, 2D / 3D hybrid or Open world. The kind decides which camera the game is played with. What each one is, is in Kinds of game. Below the cards, under Players, pick Single player or Local multiplayer. Online multiplayer is in view, but disabled and with the label "coming soon": it cannot be picked.
- Template. Pick what the game starts with. The templates change with how it is programmed, the kind and the players.
- Game name. Type it. Below, the dialog shows the folder it will create.
To finish, press Create and open.
Each kind card carries its description. These are the ones in the dialog:
| Kind | Description |
|---|---|
| Third person | 3D world with the camera behind the character. |
| First person | 3D world seen through the character's eyes. |
| 2D platformer | Side view: walk and jump on a plane. |
| Top-down | Seen from above, with no perspective. Click to move is possible. |
| Isometric | Block world seen diagonally, with no perspective. |
| 2D / 3D hybrid | Switches views during play, with switch zones. |
| Open world | A world of cubes that builds itself, with biomes. Break and place blocks. |
If you pick Blocks#
A project is made with Rules (or code) or with Blocks, not with both: it is decided here, when you create it. With Blocks selected, the dialog changes in three places.
| Where | What changes |
|---|---|
| Kind of game | 2D / 3D hybrid is greyed out, with the label not with blocks. The other six kinds can be picked. |
| Players | Local multiplayer is greyed out, with the label on the Game card, after creating. |
| Template | There are now five, all of them blocks templates. |
The dialog explains it below the cards: "A blocks game uses a single view and pieces, with no tile maps; the open world also brings its cube terrain. You can switch it to code later, but not back from code to blocks."
The created project opens on the Blocks tab, the Rules panel is renamed Blocks and the AI assistant is turned off. All of that, with the five templates and the canvas, is in Blocks mode. The rest of this page describes the dialog with Rules or code selected.
The templates#
In third person#
With Third person and Single player there are six templates. The descriptions are the ones in the dialog.
| Template | What it has |
|---|---|
| Blank | A floor, a start and a goal. To start from scratch. |
| Collection | Collect every coin before time runs out. Lava on normal and hard. |
| Platformer | Jump from island to island, ride the moving platform and reach the goal. |
| Race | A track with a turn, a ramp and barriers. Best time wins. |
| Puzzle | A button opens the first door and three keys open the second. |
| Coins against the clock (with code) | The toolkit template: the same collecting game, but with a hand-written script. For those who want to code. |
The first five are made with Rules: their logic is read and changed in the Rules panel, without writing code. The sixth is made with code.
The Blank template has four pieces (the floor and the three of the goal), a meta zone and two rules: "When the player falls off the world: play the caida sound." and "When the player enters anything tagged "meta": end the game (win)." It is the starting point of the tutorial.
In the other kinds#
First person, 2D platformer, Top-down, Isometric, 2D / 3D hybrid and Open world each have a single template: a playable example of that kind, made with code. It is named after the kind followed by "example", carries the label With code and the dialog describes it this way: "The toolkit example for this kind of game: a short level the bot can finish, with a hand-written script. Edit the scene and the code; no-code Rules can be turned on later."
The one for the Open world kind is Open world example. The examples are described in Kinds of game, and the cube terrain in Open world.
With Local multiplayer#
When you pick Local multiplayer, the template is Coin rush for several players. See Local multiplayer.
What a project is#
A project is a folder on your computer. There is no account and no cloud: the home screen puts it this way, "Each game is a folder on your computer. Nothing leaves it unless you decide so."
Projects are kept in the Green Games/proyectos folder, inside your home folder. The full path appears at the foot of the home screen and in Settings. The folder name is the game's id: the name you typed, in lowercase and with hyphens. "Coin Yard" ends up in coin-yard.
A project made with the Blank template has these files:
| File | What it is |
|---|---|
juego.json | The game card: name, description, author, version, difficulties and controls. |
escenas/principal.json | The scene: pieces, zones, spawn points, lights and environment. |
scripts/principal.ts | The script. In a game made with Rules, the editor writes it. |
recursos/ | The cover. When the game is created it is a drawn cover; when you take it from the scene it is saved as recursos/portada.jpg. |
pruebas/bot.json | The test bot's route. |
editor/ | What belongs to the editor: the rules, your saved content, the undo history, the conversation with the assistant and the panel layout. |
Everything except editor/ is the game, in the same format the command-line tools use: see Scripts. The editor/ folder does not go into the exported .ggx.
A blocks project also has the bloques/ folder, with the blocks document (bloques/proyecto.json). It does not go into the .ggx either: what travels is the script those blocks write.
In Full mode, the Project panel (Alt+2) shows these files, and File > Show the project in its folder opens the folder in the system's file manager.
The project list#
Each card shows the game's thumbnail, its name, the id and the date of the last change.
| Action | What it does |
|---|---|
| Open | Opens the project. A click on the thumbnail works too. |
| Duplicate | Creates a copy in another folder, with the id ending in -copia and "(copy)" in the name. The copy starts with its own undo history. |
| Rename | Changes the game's name. The Also rename the folder box changes the id too; the editor warns that saved scores then start over. |
| Folder icon | Show in folder: opens the project folder. |
| Trash icon | Move to trash. |
With the Search a game box you filter by name, and the dropdown sorts by Most recent or By name.
Opening a folder#
Open folder… opens a game that is anywhere else on the computer: for example, one made with the command-line tools, or a project someone gave you. You pick the folder that contains juego.json.
The game stays in the list with the label external folder. It is edited where it is: the editor does not copy it to the projects folder.
The trash#
Move to trash asks for confirmation and deletes nothing: it moves the project folder to Green Games/papelera. From there you can recover it by hand, moving it back to Green Games/proyectos.
On an external-folder project the button says Remove from list: the game stops showing on the home screen and its folder is left untouched.
Where everything is kept#
| What | Where |
|---|---|
| Your projects | Green Games/proyectos/<id>, in your home folder. |
| Exported games | Green Games/exportados/<id>.ggx. |
| Projects you sent to the trash | Green Games/papelera/. |
To take a project to another computer, copy its whole folder. For someone else to play it, the project is not needed: you export a .ggx, as Game card, export and share explains.
Next#
- Kinds of game: what changes between one view and another.
- Blocks mode: the game programmed by snapping blocks together.
- Your first game: from the Blank template to a finished game.
- Scene and Details: start placing pieces.