Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace references from TileMap to TileMapLayer in documentation #102561

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Dowsley
Copy link
Contributor

@Dowsley Dowsley commented Feb 7, 2025

We have several important doc pages that still reference TileMap, when it is already deprecated, as well as code examples that do not work on the new TileMapLayers.

  • TileData
  • TileSet
  • TileSetAtlasSource
  • TileSetScenesCollectionSource

Pretty sure there are other places, but these are the most important since they're closely related to TileMapLayers.

@Dowsley Dowsley requested a review from a team as a code owner February 7, 2025 21:38
@AThousandShips AThousandShips added this to the 4.4 milestone Feb 8, 2025
@@ -656,7 +656,7 @@
</constant>
<constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
Diamond tile shape (for isometric look).
[b]Note:[/b] Isometric [TileSet] works best if [TileMap] and all its layers have Y-sort enabled.
[b]Note:[/b] Isometric [TileSet] works best if [TileMapLayer] has Y-sort enabled.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need feedback on this change.

Copy link
Member

@KoBeWi KoBeWi Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All sibling TileMapLayers and their parent Node2D need Y-sort enabled.

Copy link
Contributor Author

@Dowsley Dowsley Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if [TileMapLayer]s will work.

@AThousandShips AThousandShips requested a review from a team February 8, 2025 16:05
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TileSet" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Tile library for tilemaps.
Tile library for tilemap layers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refers to tilemaps in general, not the class, so it was probably fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

@@ -503,8 +503,8 @@
<param index="3" name="coords_to" type="Vector2i" />
<description>
Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
This can be used to replace a tile in all TileMaps using this TileSet, as TileMapLayer nodes will find and use the proxy's target tile when one is available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if TileMapLayer still supports proxies.
CC @groud

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I see in latest docs, not anymore.

if not alternate_id &amp; TileSetAtlasSource.TRANSFORM_FLIP_H:
# If tile is not already flipped, flip it.
$TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)
$TileMapLayer.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$TileMapLayer.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)
$TileMapLayer.set_cell(Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)

@Dowsley Dowsley force-pushed the docs/update-tilemap-references branch from 2ba555e to e53842e Compare February 8, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants