godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.98k stars 21.16k forks source link

Godot 4 TileSet does not support editing galleries that contain tiles of different sizes. #68299

Open qq715152910 opened 2 years ago

qq715152910 commented 2 years ago

Godot version

4.0-Beta4

System information

GLES2

Issue description

Starting with Godot 4 (the current version of Beta 4), TileSet still does not support editing galleries that contain tiles of different sizes. I can't edit it from the TileSet editor and can't find the associated API. It's supported in Godot 3 TileSet, which caused me to run into an unachievable bottleneck when migrating my project to 4.0. When I split the atlas into AtlasTexture and import it into Godot 4 TileSet, a total of 13M resources, when it ran it took up 350M of running memory, which is obviously not normal. On Godot 3, it only takes up 28M of running memory. Key points of the issue: So far, Godot 4 does not support editing atlases that contain tiles of different sizes. I hope you can pay attention to this problem. Thank you very much.

Steps to reproduce

  1. Import an image set containing blocks of different sizes
  2. New TileMap
  3. New TileSet
  4. Create TileSetAtlasSouce
  5. I found that I could only create blocks of one size, and I hit a bottleneck.
  6. When I split the atlas into AtlasTexture and saved it locally, and then repeated this step, it took up a lot of memory, more than 20 times the size of my resources.

Minimal reproduction project

暂无

KoBeWi commented 2 years ago

Tiles of different sizes are supported, but big tiles need to be constant multiplies, e.g. base size 16x16, big tiles 16x32, 32x32, 64x64 etc.

qq715152910 commented 2 years ago

Tiles of different sizes are supported, but big tiles need to be constant multiplies, e.g. base size 16x16, big tiles 16x32, 32x32, 64x64 etc.

No, the block size in the atlas should be completely open and free, it should not be limited to a certain size, such as Godot 3.x, or a top-down MMO, RPG type of game, such as containing large and small houses, while the Godot 4 TileSet atlas can only fix one size block. This makes the whole game development difficult and leads to bottlenecks, and I think it should go back to the TileSet of Godot 3.X, where the user is free to create size and implementation is always greater than efficiency.

qq715152910 commented 2 years ago

Tiles of different sizes are supported, but big tiles need to be constant multiplies, e.g. base size 16x16, big tiles 16x32, 32x32, 64x64 etc.

I'm talking about different sizes, totally irregular blocks, not what you're talking about. For example, 120x102, 45x80...... It cannot edit and create blocks of different sizes in a single diagram set.

KoBeWi commented 2 years ago

Arbitrary tile sizes makes no sense and are the reason why 3.x tile editor is a mess. In almost all cases, you want tiles to be multiples of the same size. Such constraint makes working with them infinitely easier, because you can just assume they are on a single grid and it allows to support tile palette and tile patterns among many other things.

I'm talking about different sizes, totally irregular blocks, not what you're talking about. For example, 120x102, 45x80........

This is supported using tile patterns. You can fit your irregular tiles within a rectangle.

qq715152910 commented 2 years ago

Arbitrary tile sizes makes no sense and are the reason why 3.x tile editor is a mess. In almost all cases, you want tiles to be multiples of the same size. Such constraint makes working with them infinitely easier, because you can just assume they are on a single grid and it allows to support tile palette and tile patterns among many other things.

I'm talking about different sizes, totally irregular blocks, not what you're talking about. For example, 120x102, 45x80........

This is supported using tile patterns. You can fit your irregular tiles within a rectangle. mask_1

Like this atlas, I can't use it in Godot 4TileSet, it's not as simple as you say, I think Godot should be more than just making small games. test_0001

The red area in the screenshot is causing the bottleneck,How do you comment on that?

qq715152910 commented 2 years ago

In Godot 3.x, it is completely possible, for example:

test_0002

test_0003

KoBeWi commented 2 years ago

The purpose of tiles is to organize pieces of textures into easily repeatable and drawable patterns. The TileSet you presented goes against that in every way (and to me personally it doesn't look usable at all). I think it can be pieced together and laid out properly, but maybe for your use-case using sprites instead of tiles would be better.

In any case, this goes against fundamentals of the new tile editor and is very unlikely to be supported. This issue is probably better fit for a proposal, if you have an idea how it can be implemented with the current system.

qq715152910 commented 2 years ago

The purpose of tiles is to organize pieces of textures into easily repeatable and drawable patterns. The TileSet you presented goes against that in every way (and to me personally it doesn't look usable at all). I think it can be pieced together and laid out properly, but maybe for your use-case using sprites instead of tiles would be better.

In any case, this goes against fundamentals of the new tile editor and is very unlikely to be supported. This issue is probably better fit for a proposal, if you have an idea how it can be implemented with the current system.

This is the map's mask layer,Leyer 2, which is placed at a certain point on the map. There are flowers, grass, houses, fences, trees, etc., which are used to cover the player's body and give it a layered look.