Godot: TileMap Editor does not function properly

Created on 7 Dec 2017  路  13Comments  路  Source: godotengine/godot

Godot 3.0 - Linux

Issue description:
Placing tiles on a Tilemap in the editor is bugged.

Steps to reproduce:

  1. Create Tileset
  2. Create new scene with tilemap, and use the tileset above as the texture.

When placing tiles, after you let go of the mouse button, about half the tiles disappear. With every subsequent click and release of the left mouse button on the tilemap, more tiles randomly disappear:
tilemap

bug hero wanted! editor

Most helpful comment

Alright, I opened a PR with the change @MarianoGnu suggested and can confirm that it did fix the issue. I also renamed the DataFormat enum members per @akien-mga

All 13 comments

cc @MarianoGnu

holy sh...

@MarianoGnu I saw this behavior as well a couple of days ago. I'm not sure exactly what caused it, but it wasn't happening last night when I tested it again. I'll see if I can figure out what the cause is tonight, but I don't have much time.
@gururise Does this happen for you all the time, even with different tilesets/tilemaps?

I also think it got fixed very recently, let me check.

@CyanBlob I just pulled and built a new build today.
image

I created a brand new tileset & tilemap (new project) and got the same results so it seems like the bug is not fixed:
image

I am using tilesizes of 32x32 if it make any difference. I am also on Linux.

Attached is the sample project.
tileProject.zip

Ok, so I just checked. The bug only seems to happen just after creating the TileMap node. Closing and re-opening the scene seems to fix it permanently.

I can confirm @PJB3005's comment after some brief testing. After adding a new TileMap node, the bug occurs until the scene is reloaded (I used Scene->Revert Scene to test).
I also occasionally got this error:
scene/resources/tile_set.cpp:394 - Condition ' !tile_map.has(p_id) ' is true. returned: false
Which is inside the TileSet::tile_get_is_autotile function

@PJB3005 @CyanBlob i'm very sure of the cause of this bug is the code i wrote to allow open 2.1 tilemaps.
https://github.com/godotengine/godot/blob/master/scene/2d/tile_map.cpp#L963
https://github.com/godotengine/godot/blob/master/scene/2d/tile_map.cpp#L1012

adding this line to get_tile_data() might fix it.
format = FORMAT_2_1_5;
will give it a look if i get some spare time, meanwhile, hero wanted!

What are those 2_1_4 and 2_1_5 formats? The numbers seem kind of arbitrary, shouldn't it be FORMAT_1 and FORMAT_2?

they are on tile_map.h, i didn't know how to name them but since they are not exposed to gdscript it doesn't matter, they can be renamed anytime.

Alright, I opened a PR with the change @MarianoGnu suggested and can confirm that it did fix the issue. I also renamed the DataFormat enum members per @akien-mga

Can also confirm the PR submitted by @CyanBlob fixed the issue.

Fixed by #14454.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

testman42 picture testman42  路  3Comments

kirilledelman picture kirilledelman  路  3Comments

blurymind picture blurymind  路  3Comments

EdwardAngeles picture EdwardAngeles  路  3Comments

SleepProgger picture SleepProgger  路  3Comments