Skip to content

Commit

Permalink
Merge pull request #55 from endlessm/manuq-patch-1
Browse files Browse the repository at this point in the history
Docs: Update tile painting level creation
  • Loading branch information
dsd authored Jan 27, 2025
2 parents 383246a + 67e723e commit d7d0639
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/GameDesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _Unconventionality:_ When a player or enemy reaches the right or left edge of th

In addition to being a neat, fun, unconventional little game, this project aims to provide an arena for introductory Godot & Git learning experiences.

The game permits creation of Extra Worlds alongside the main game. A World is a sequence of levels that exists in parallel to the original game. When starting the game, player can choose to play the original headline game, or to play one of these extra worlds. We envision a great many extra worlds being added to the game.
The game permits creation of Extra Worlds alongside the main game. A World is a sequence of levels that exists in parallel to the original game. When starting the game, the player can choose to play the original headline game, or to play one of these extra worlds. We envision a great many extra worlds being added to the game.

World & Level creation is intended to be as simple as possible. We wish to enable the creation of these extra worlds without having to read or write any code. Level creation is done by using Godot [TileMapLayer](https://docs.godotengine.org/en/stable/classes/class_tilemaplayer.html), meaning that levels can be created by drag-and-drop usage of TileMaps. Some supporting code is used to automatically convert the player and enemy tiles to dynamic objects that carry out the functions of the game. We strive to make level & world creation as easy as possible and would generally be opposed to game engine changes that increase the difficulty for a future novice contributor to create their own world.

Expand Down
14 changes: 10 additions & 4 deletions doc/WorldBuilding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ First, choose a name for your new world. This should be as descriptive and creat

Copy the `Worlds/Sample` folder to `Worlds/Flying Cow Party`. You can do this from Godot's FileSystem view by right clicking on `Sample` and selecting `Duplicate`. Run the game: you should see “Flying Cow Party” in the world selection menu.

Now, you can adapt the existing sample levels and add new ones within `Worlds/Flying Cow Party`. The levels will be sequenced through a case-insensitive, natural order sorting of their filenames. In other words, if you maintain the naming scheme of `1.tscn`, `2.tscn`, `3.tscn` and so on, the levels will play in this order.
Now, you can adapt the existing sample levels and add new ones within `Worlds/Flying Cow Party`. Only the scene files that start with a number in the filename are considered levels, and a natural order sorting is applied to their filenames. In other words, if you maintain the naming scheme of `1.tscn`, `2.tscn`, `3.tscn` and so on, the levels will play in this order.

Each level should be a numbered scene file, with a single `TileMapLayer` node. Each level should have the player tile in exactly one cell, and one or more “goober” tiles. When the level is played, they will be replaced with the player and goober scenes, offset horizontally by half a tile.
Each level should be a numbered scene file, with the following node structure:

- Level (Type: Level)
- Map (Type: TilemapLayer)
- Goobers (Type: Node2D)

The easiest way to create levels is by painting tiles. Select the Map node. The TileMap panel will open at the bottom. Each level should have the player tile in one cell, and one or more “goober” tiles. When the level is played, they will be replaced with the player and goober scenes, offset horizontally by half a tile.

The first level in the sequence (typically `0.tscn`) is treated as the start screen. This level is treated specially by the game: the player cannot move, and pressing Jump starts the game proper. Similarly, the final level (typically `999.tscn`) is treated as the end screen.

Expand Down Expand Up @@ -36,7 +42,7 @@ Now your customised start, end and level progression screens will be used in you

3. Open the first level in your world in the Editor's 2D view.

4. Select the `TileMapLayer` from the Scene Dock. In the Inspector, locate the `Tile Set` option under `TileMapLayer`.
4. Select the `Map` node from the Scene Dock. In the Inspector, locate the `Tile Set` option under `TileMapLayer`.

5. Click the ⌄ there and select `Save As`. Save the resultant `TileSet.tres` in your world's folder.

Expand All @@ -50,7 +56,7 @@ You will also need to apply your customised `TileSet.tres` to all other levels i

1. Open the next level in the Editor's 2D view.

2. Select the `TileMapLayer` from the Scene Dock. In the Inspector, locate the `Tile Set` option under `TileMapLayer`.
2. Select the `Map` node from the Scene Dock. In the Inspector, locate the `Tile Set` option under `TileMapLayer`.

3. Locate your world's `TileSet.tres` in the FileSystem view.

Expand Down

0 comments on commit d7d0639

Please sign in to comment.