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

Rename GridMap to MeshMap or TileMap3D and add actual GridMap node #789

Open
Shadowblitz16 opened this issue May 2, 2020 · 7 comments
Open
Labels
breaks compat Proposal will inevitably break compatibility topic:core
Milestone

Comments

@Shadowblitz16
Copy link

Describe the project you are working on:
Tower Defense

Describe the problem or limitation you are having in your project:
I currently have to write a custom grid and tile class for saving and loading due to there not being a actual grid map for nodes.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Rename Gridmap to MeshMap or Tilemap3D and add actual Gridmap node for both 2d and 3d games.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
basicly it current Gridmaps would be renamed to something like Meshmap to be more clear and a true GridMap and GridMap2D would be added

the new Gridmaps would basically be Tilemaps or Meshmaps but would accept any node structure as long as the root was a Node2D for GridMap2D or Node3D for GridMap

this would allow people to still use old TileMaps or MeshMaps is they need performance

If this enhancement will not be used often, can it be worked around with a few lines of script?:
This would be used quite often and while it could be worked around its not something that should be.

Is there a reason why this should be core and not an add-on in the asset library?:
it would basicly be a better version of the Tilemap and current Gridmap but not limited to only sprites and meshes.

#747

@Calinou
Copy link
Member

Calinou commented May 3, 2020

I think it makes sense to rename TileMap to TileMap2D and GridMap to TileMap3D.

@bojidar-bg
Copy link

This has come up multiple times in the past, both on IRC and on GitHub.

Reduz mentioned that "problem is that tile is a very strict 2D concept" -- and that MeshLibrary could also be used "for terrain painting if we ever add that too" (can't link to logs).

I still feel it makes sense to unify those two, given that many people already refer to tileable 3D meshes as "tiles" (see https://www.kenney.nl/assets/tower-defense-kit and https://twitter.com/dwtw/status/810166761270243328) and that terrain painting might want to use a more complicated format (which specifies, say, permissible scales, custom instance variables/colors, etc.).

There is also a comment from Akien in the above-linked IRC log:

<Akien> Someone proposed TileMap2D and to rename GridMap to TileMap3D, but that doesn't make sense, they serve similar use cases but the APIs are different.

And indeed, if GridMap and TileMap are unified, their APIs would likely have to be unified too. With the plans to rework the tileset/tilemap to be more user-friendly and usable, unifying them would imply giving similar treatment to both.


This proposal has one more element: adding an "actual GridMap" which would allow efficiently placing 3D nodes on a grid. Some have argued that "Snap to Grid" already covers that, others have proposed allowing both meshes and non-meshes in the current GridMap node. For the moment, I will just link some discussions I can find.

@Shadowblitz16
Copy link
Author

if you do add a grid map PLEASE allows us to specify a size for it.
infinite tile maps and grid maps are good in certain cases but sometimes we want to limit where things can be placed

@Calinou
Copy link
Member

Calinou commented Sep 18, 2020

infinite tile maps and grid maps are good in certain cases but sometimes we want to limit where things can be placed

Are you exposing editing tools to players? In this case, you're most likely writing your own editor where you can apply any restrictions you wish.

@Shadowblitz16
Copy link
Author

@Calinou yes it was going to be a 3d ship builder. but the issue is that to limit to a specifies area I need to know the starting point of the grid (0,0) which is not easy with infinite grid maps.

also its a pretty basic feature to set the size of a grid. your basically already doing it internally.

@Calinou Calinou added the breaks compat Proposal will inevitably break compatibility label May 15, 2022
@Calinou Calinou added this to the 4.0 milestone May 15, 2022
@Mickeon
Copy link

Mickeon commented Sep 6, 2022

What's the consensus on this PR, 2 years later?

@Calinou
Copy link
Member

Calinou commented Sep 6, 2022

What's the consensus on this PR, 2 years later?

Since feature freeze is ongoing, GridMap will be kept as-is for 4.0. Any significant changes will have to be made for 4.1, where some compatibility breakage will be tolerated as long as an upgrade path is provided.

Despite having a lot of users, GridMap doesn't have a whole lot of contributors interested in improving it, so any proposal about it will take a while to materialize (if ever).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks compat Proposal will inevitably break compatibility topic:core
Projects
None yet
Development

No branches or pull requests

5 participants