diff --git a/tutorials/2d/using_tilemaps.rst b/tutorials/2d/using_tilemaps.rst index 2b68f59f6..6df7f67f9 100644 --- a/tutorials/2d/using_tilemaps.rst +++ b/tutorials/2d/using_tilemaps.rst @@ -18,18 +18,18 @@ First, they make it possible to draw the layout by "painting" the tiles onto a grid, which is much faster than placing individual :ref:`Sprite2D ` nodes one by one. Second, they allow for much larger levels because they are optimized for drawing large numbers of tiles. Finally, you can add collision, -occlusion, and navigation shapes to tiles, adding additional functionality to +occlusion, and navigation shapes to tiles, adding greater functionality to the TileMap. .. note:: - Godot 4.0 has moved several per-tile properties from TileMap to TileSet, such - as tile rotation. Individual tiles can no longer be rotated while in the + Godot 4.0 has moved several per-tile properties, such as tile rotation, from + TileMap to TileSet. Individual tiles can no longer be rotated while in the TileMap editor. Instead, the TileSet editor must be used to create alternative rotated tiles. - This change allows for greater design consistency, as not every tile makes - sense to be rotated or flipped within a TileSet (from a visual standpoint). + This change allows for greater design consistency, as not every tile needs to be + rotated or flipped within a TileSet. Specifying the TileSet in the TileMap ------------------------------------- @@ -39,7 +39,7 @@ have a TileSet resource that is built-in to the TileMap node. This is good for prototyping, but in a real world project, you will generally have multiple levels reusing the same tileset. -To reuse the same TileSet in several TileMap nodes, it is recommended to save +The recommended way to reuse the same TileSet in several TileMap nodes is to save the TileSet to an external resource. To do so, click the dropdown next to the TileSet resource and choose **Save**: @@ -52,12 +52,12 @@ resource and choose **Save**: Creating TileMap layers ----------------------- -Since Godot 4.0, you can place several *layers* in a single TileMap node. For +As of Godot 4.0, you can place several *layers* in a single TileMap node. For example, this allows you to distinguish foreground tiles from background tiles for better organization. You can place one tile per layer at a given location, which allows you to overlap several tiles together if you have more than one layer. -By default, a TileMap node automatically has one layer created. You do not have +By default, a TileMap node automatically has one premade layer. You do not have to create additional layers if you only need a single layer, but if you wish to do so now, select the TileMap node and unfold the **Layers** section in the inspector: @@ -101,7 +101,7 @@ the left of the entries in the **Layers** section. Opening the TileMap editor -------------------------- -Select the TileMap node then open the TileMap panel at the bottom +Select the TileMap node, then open the TileMap panel at the bottom of the editor: .. figure:: img/using_tilemaps_open_tilemap_editor.webp @@ -184,12 +184,12 @@ From left to right, the painting modes and tools you can choose are: Selection ^^^^^^^^^ -Select tiles by clicking a single tile, or holding down the left mouse button to -form a rectangle in the 2D editor. Note that empty space cannot be selected: if -you create a rectangle selection, only non-empty tiles will be selected. +Select tiles by clicking a single tile, or by holding down the left mouse button to +select multiple with a rectangle in the 2D editor. Note that empty space cannot be +selected: if you create a rectangle selection, only non-empty tiles will be selected. -To append to the current selection, hold :kbd:`Shift` then perform a selection. -To remove from the current selection, hold :kbd:`Ctrl` then perform a selection. +To append to the current selection, hold :kbd:`Shift` then select a tile. +To remove from the current selection, hold :kbd:`Ctrl` then select a tile. The selection can then be used in any other painting mode to quickly create copies of an already-placed pattern. @@ -212,8 +212,8 @@ then performing a selection. Paint ^^^^^ -The standard painting mode allows placing tiles by clicking or holding down the -left mouse button. +The standard Paint mode allows you to place tiles by clicking or holding +down the left mouse button. If you right-click, the currently selected tile will be erased from the tilemap. In other words, it will be replaced by empty space. @@ -241,13 +241,13 @@ the left mouse button. Line ^^^^ -After selecting rectangle paint mode, any drawing will be performed in a line -that is always 1-tile thick (no matter its orientation). +After selecting Line Paint mode, you can draw in a line that is +always 1 tile thick (no matter its orientation). -If you right-click while in line paint mode, erasing will be performed in a line. +If you right-click while in Line Paint mode, you will erase in a line. If you have selected multiple tiles in the TileMap or using the Selection tool, -they will be placed in a repeating pattern across the line. +you can place them in a repeating pattern across the line. You can toggle this mode temporarily while in Paint or Eraser mode by holding :kbd:`Shift` then drawing. @@ -261,50 +261,50 @@ You can toggle this mode temporarily while in Paint or Eraser mode by holding Rectangle ^^^^^^^^^ -After selecting rectangle paint mode, any drawing will be performed in a -axis-aligned rectangle. +After selecting Rectangle Paint mode, you can draw in an axis-aligned +rectangle. -If you right-click while in rectangle paint mode, erasing will be performed in +If you right-click while in Rectangle Paint mode, you will erase in an axis-aligned rectangle. If you have selected multiple tiles in the TileMap or using the Selection tool, -they will be placed in a repeating pattern within the rectangle. +you can place them in a repeating pattern within the rectangle. You can toggle this mode temporarily while in Paint or Eraser mode by holding :kbd:`Ctrl` and :kbd:`Shift` then drawing. -Bucket fill +Bucket Fill ^^^^^^^^^^^ -After selecting bucket fill mode, you can choose whether painting should be +After selecting Bucket Fill mode, you can choose whether painting should be limited to contiguous areas only by toggling the **Contiguous** checkbox that appears on the right of the toolbar. -If you enable Contiguous (the default), only matching tiles that touch the +If you enable **Contiguous** (the default), only matching tiles that touch the current selection will be replaced. This contiguous check is performed horizontally and vertically, but *not* diagonally. -If you disable Contiguous, all tiles with the same ID in the entire TileMap will +If you disable **Contiguous**, all tiles with the same ID in the entire TileMap will be replaced by the currently selected tile. If selecting an empty tile with **Contiguous** unchecked, all tiles in the rectangle that encompasses the TileMap's effective area will be replaced instead. -If you right-click while in bucket fill mode, matching tiles will be replaced by -empty tiles. +If you right-click while in Bucket Fill mode, you will replace matching tiles +with empty tiles. If you have selected multiple tiles in the TileMap or using the Selection tool, -they will be placed in a repeating pattern within the filled area. +you can place them in a repeating pattern within the filled area. .. figure:: img/using_tilemaps_bucket_fill.webp :align: center - :alt: Using the bucket fill tool + :alt: Using the Bucket Fill tool - Using the bucket fill tool + Using the Bucket Fill tool Picker ^^^^^^ -After selecting picker mode, you can pick existing tiles in the 2D editor by +After selecting Picker mode, you can pick existing tiles in the 2D editor by holding :kbd:`Ctrl` then clicking on a tile. This will switch the currently painted tile to the tile you've just clicked. You can also pick multiple tiles at once by holding down the left mouse button and forming a rectangle selection. @@ -317,7 +317,7 @@ Eraser ^^^^^^ This mode is combined with any other painting mode (Paint, Line, Rectangle, -Bucket fill). When eraser mode is enabled, tiles will be replaced by empty tiles +Bucket Fill). When eraser mode is enabled, tiles will be replaced by empty tiles instead of drawing new lines when left-clicking. You can toggle this mode temporarily while in any other mode by right-clicking @@ -328,10 +328,9 @@ Painting randomly using scattering While painting, you can optionally enable *randomization*. When enabled, a random tile will be chosen between all the currently selected tiles when -painting. This is supported with the single, line, rectangle and bucket fill -tools. For paint randomization to be effective, multiple tiles must be selected -in the TileMap editor, or you must use scattering (both approaches can be -combined). +painting. This is supported with the Paint, Line, Rectangle and Bucket Fill +tools. For effective paint randomization, you must select multiple tiles +in the TileMap editor or use scattering (both approaches can be combined). If **Scattering** is set to a value greater than 0, there is a chance that no tile will be placed when painting. This can be used to add occasional, non-repeating @@ -346,13 +345,13 @@ Example when using Paint mode: Selecting from several times to randomly choose, then painting by holding down the left mouse button -Example when using Bucket fill mode: +Example when using Bucket Fill mode: .. figure:: img/using_tilemaps_bucket_fill_scatter.webp :align: center - :alt: Using bucket fill tool with a single tile, but with randomization and scattering enabled + :alt: Using Bucket Fill tool with a single tile, but with randomization and scattering enabled - Using bucket fill tool with a single tile, but with randomization and scattering enabled + Using Bucket Fill tool with a single tile, but with randomization and scattering enabled .. note:: @@ -386,10 +385,10 @@ any painting mode, then left-click somewhere in the 2D editor: Placing an existing pattern using the TileMap editor Like multi-tile selections, patterns will be repeated if used with the Line, -Rectangle or Bucket fill painting modes. +Rectangle or Bucket Fill painting modes. .. note:: Despite being edited in the TileMap editor, patterns are stored in the TileSet resource. This allows reusing patterns in different TileMap nodes - after loading a TileSet resource saved to an external file. + after loading a TileSet resource saved to an external file. \ No newline at end of file diff --git a/tutorials/2d/using_tilesets.rst b/tutorials/2d/using_tilesets.rst index 07b9847dd..0292f95d4 100644 --- a/tutorials/2d/using_tilesets.rst +++ b/tutorials/2d/using_tilesets.rst @@ -8,12 +8,12 @@ Introduction A tilemap is a grid of tiles used to create a game's layout. There are several benefits to using :ref:`TileMap ` nodes to design your levels. -First, they make it possible to draw the layout by "painting" the tiles onto a -grid, which is much faster than placing individual :ref:`Sprite2D -` nodes one by one. Second, they allow for much larger levels -because they are optimized for drawing large numbers of tiles. Finally, you can -add collision, occlusion, and navigation shapes to tiles, adding additional -functionality to the TileMap. +First, they let you draw a layout by "painting" tiles onto a grid, +which is much faster than placing individual :ref:`Sprite2D +` nodes one by one. Second, they allow for larger levels +because they are optimized for drawing large numbers of tiles. +Finally, they allow you to add greater functionality to your tiles with +collision, occlusion, and navigation shapes. To use tilemaps, you will need to create a TileSet first. A TileSet is a collection of tiles that can be placed in a TileMap node. After creating a @@ -23,7 +23,7 @@ TileSet, you will be able to place them :ref:`using the TileMap editor To follow this guide, you will need an image containing your tiles where every tile has the same size (large objects can be split into several tiles). This image is called a *tilesheet*. Tiles do not have to be square: they can be -rectangular, hexagonal or isometric (pseudo-3D perspective). +rectangular, hexagonal, or isometric (pseudo-3D perspective). Creating a new TileSet ---------------------- @@ -63,9 +63,9 @@ Set the tile size to 64×64 in the inspector to match the example tilesheet: Setting the tile size to 64×64 to match the example tilesheet -If relying on automatic tiles creation (like we're about to do here), setting -the tile size must be done **before** creating the *atlas*. The atlas will -determine which tiles from the tilesheet can actually be added to a TileMap node +If relying on automatic tiles creation (like we're about to do here), you must +set the tile size **before** creating the *atlas*. The atlas will +determine which tiles from the tilesheet can be added to a TileMap node (as not every part of the image may be a valid tile). Open the **TileSet** panel at the bottom of the editor, then click the "+" icon @@ -140,8 +140,8 @@ You can adjust properties for the atlas in the middle column: The following properties can be adjusted on the atlas: - **ID:** The identifier (unique within this TileSet), used for sorting. -- **Name:** The human-readable name for the atlas. It's recommended to enter a - name here for organization purposes (such as "terrain", "decoration", etc). +- **Name:** The human-readable name for the atlas. Use a descriptive name + here for organizational purposes (such as "terrain", "decoration", etc). - **Margins:** The margins on the image's edges that should not be selectable as tiles (in pixels). Increasing this can be useful if you download a tilesheet image that has margins on the edges (e.g. for attribution). @@ -204,8 +204,8 @@ TileSet resource, choose **Merge (Keep Original Atlases)** instead. Adding collision, navigation and occlusion to the TileSet --------------------------------------------------------- -We've now successfully created a basic TileSet that we could start using in the -TileMap node now. However, it currently lacks any form of collision detection. +We've now successfully created a basic TileSet. We could start using in the +TileMap node now, but it currently lacks any form of collision detection. This means the player and other objects could walk straight through the floor or walls. @@ -229,7 +229,7 @@ value in the inspector to edit it then unfold **Physics Layers** and choose Creating a physics layer in the TileSet resource inspector (within the TileMap node) -If you also need navigation support, now is a good time to create a navigation layer as well: +If you also need navigation support, now is a good time to create a navigation layer: .. figure:: img/using_tilesets_create_navigation_layer.webp :align: center @@ -286,7 +286,7 @@ In this tile collision editor, you have access to all the 2D polygon editing too - Pan in the editor by middle-clicking or right-clicking. (Right-click panning can only be used in areas where there is no point nearby.) -The default rectangle shape can be used to quickly create a triangle-shaped +You can use the default rectangle shape to quickly create a triangle-shaped collision shape by removing one of the points: .. figure:: img/using_tilesets_creating_triangle_collision.webp @@ -299,9 +299,9 @@ You can also use the rectangle as a base for more complex shapes by adding more .. figure:: img/using_tilesets_drawing_custom_collision.webp :align: center - :alt: Drawing custom collision for a complex tile shape + :alt: Drawing a custom collision for a complex tile shape - Drawing custom collision for a complex tile shape + Drawing a custom collision for a complex tile shape .. tip:: @@ -317,10 +317,10 @@ Assigning custom metadata to the TileSet's tiles You can assign custom data on a per-tile basis using *custom data layers*. This can be useful to store information specific to your game, such as the damage -that a tile should deal when touched by the player, or whether a tile can be +that a tile should deal when the player touches it, or whether a tile can be destroyed using a weapon. -The data is associated to the tile in the TileSet – all instances of the placed +The data is associated with the tile in the TileSet: all instances of the placed tile will use the same custom data. If you need to create a variant of a tile that has different custom data, this can be done by :ref:`creating an alternative tile ` and changing @@ -406,7 +406,7 @@ deselect tiles that were already selected (without affecting the rest of the selection) by holding :kbd:`Shift` then clicking on a selected tile. You can then assign properties using the inspector in the middle column of the -TileSet editor. Only properties that you change here will be affected on all +TileSet editor. Only properties that you change here will be applied to all selected tiles. Like in the editor's inspector, properties that differ on selected tiles will remain different until you edit them. @@ -437,7 +437,7 @@ to "paint" properties onto tiles. Painting tile properties using the TileSet editor -Tile property painting is especially interesting to use with properties that are +Tile property painting is especially useful with properties that are time-consuming to set manually, such as collision shapes: .. figure:: img/using_tilesets_paint_tile_properties_collision.webp @@ -453,7 +453,7 @@ Creating alternative tiles Sometimes, you want to use a single tile image (found only once within the atlas), but configured in different ways. For example, you may want to use the -same tile image, but rotated/flipped, or modulated with a different color. This +same tile image, but rotated, flipped, or modulated with a different color. This can be done using *alternative tiles*. To create an alternative tile, right-click a base tile in the atlas displayed by @@ -465,8 +465,8 @@ the TileSet editor, then choose **Create an Alternative Tile**: Creating an alternative tile by right-clicking a base tile in the TileSet editor -If currently in Select mode, the alternative tile is selected immediately for -editing. If not currently in Select mode, you can still create alternative +If currently in Select mode, the alternative tile will already be selected +for editing. If not currently in Select mode, you can still create alternative tiles, but you will need to switch to Select mode and select the alternative tile to edit it. @@ -512,4 +512,4 @@ and right-clicking it to choose **Create an Alternative Tile** again. When creating an alternative tile, none of the properties from the base tile are inherited. You must set properties again on the alternative tile if you - wish those to be identical on the base tile and the alternative tile. + wish those to be identical on the base tile and the alternative tile. \ No newline at end of file