Open Nodragem opened 3 months ago
I'm also interested in this feature, I think having the GridMap Editor more consistent with other tools, especially TileMap given the similarities in use-case, makes a lot of sense. I'm interested in the potential of having Terrains in GridMap like with TileMap, and it seems like laying out the GridMap Editor pane more like the TileMap editor one may be conducive to those kind of changes. It may also be useful to have a bottom panel editor for working with the MeshLibrary resources similar to how the TileSet Editor works, but that would be a different proposal with different considerations.
I started playing around with moving the GridMapEditor pane to the bottom (CreatedBySeb/godot@9ec248e) using the TileMapEditorPlugin for reference, which wasn't particularly difficult to accomplish and works reasonably well.
Moving the controls currently on the menu panel to a toolbar in the pane also seems pretty doable, I've played with just moving the controls as they are (floor scroller and Grid Map dropdown) down to a toolbar in the pane, which works fine, and I'm going to look at expanding them out into buttons now while preserving the existing functions and shortcuts.
I started playing around with moving the GridMapEditor pane to the bottom (CreatedBySeb/godot@9ec248e)
That's amazing!! I was planning to start doing exactly that this week after I am done with wrapping up the first story beat of my starter kit. I will have a look at what you've done later this week. Thank you for getting this started!
I'm interested in the potential of having Terrains in GridMap like with TileMap
yes, so I think this will come as part of having brushes (resource?). A simple step forward would be to have brushes that can randomly sample from a few "meshes"/"tiles", and be of different size and shapes. For instance, I might have 3 variants of a floor mesh, and it would be helpful to have my brush or fill tool sample automatically from them. Then further down the line, we can have brushes that also draws the walls at the borders of the floor area.
Also, I would like to clarify a little my current take on how to improve the Gridmap. There seems to be 3 different workflows that people uses at the moment: 1) Voxel-like workflow (e.g. cubes, slopes) 2) 3D tiles workflow (e.g. a corner tile with ceiling, a corner tile without ceiling, a corridor tile with ceiling, etc) 3) 3D on-grid modular assets workflow (e.g. walls, ceilings, floors)
Studio like Bethesda initially used worflow 2) and then they discovered workflow 3). You can see a summary of the difference in my brush proposal here: https://github.com/godotengine/godot-proposals/issues/9612. It's a bit like the "dual grid" idea for Tilemap, but even more flexible.
My focus is on improving the workflow 3), because it covers the workflow 2) and simplify it. What I mean is that in workflow 2), it can be hard to think of tiles in 3D and for the end-user to create a full set of 3D tiles. It is cumbersome to have to prepare every single tiles that could exist, and maintain them/update them every time we want to add some variants. Workflow 3) is easier to use, and facilitate flexibility/changes/variability.
What it means for me and my contribution to Gridmap is that I don't see Gridmap has a one-to-one replication of TileMap2D in 3D. We might have similar features (e.g. Terrain Brush), but the implementation might be different. What do you think?
a bottom panel editor for working with the MeshLibrary resources similar to how the TileSet Editor works, but that would be a different proposal with different considerations
Would definitily be useful to be able to delete and add new meshes, and edit their collision shapes in editor. But yeah, it is an all other beast! Not even speaking about the Navigation Mesh 😄 !
No problem, I was very eager to get into the GridMapEditor UI to understand how it works and think about how to incorporate new features. I have also had some success with starting to split out the Grid Map menu options out into buttons, though I think some options may be trickier to convert into buttons as icons do not exist for them and it may be tricky to create clear icons for them.
Currently I've been keeping the options and shortcuts as they are rather than swapping them, since re-working the GridMap tooling to be more similar to TileMap with split out tools (as in your OP) is probably separate to moving the GridMap Editor pane to the bottom panel (which also seems to be what happened to TileMap in Godot 3 -> 4, so should be uncontroversial).
I agree that similar features may need different considerations in the 3D space, so they shouldn't necessarily just be one-to-one ports of the TileMap equivalents, however some TileMap features work very well so can provide good inspiration for similar features in GridMap. Implementation specifics are probably better discussed in other specific proposals like yours or that main GridMap issue though.
Cool! I should be able to start working on this from Thursday. I will have a look at what you've done so far and try to progress from there.
here is some of my progress. Using your code as a starting point, I added some buttons on the left and I replaced the size slider with a zoom widget.
The issue below will be solved by this proposal.
With the change in shortcuts I suggest (not relying on right-click for erase mode
), the user will be able to use the Freelook mode
using the Gridmap. That is actually awesome. But it also means that we will need to ignore Gridmap shortcuts when the user is in Freelook mode
. Hence, it will solve the issue below.
https://github.com/godotengine/godot/issues/87487
Edit: by the way, my fork can be found here: https://github.com/Nodragem/godot/tree/move-gridmap-panel-to-bottom
Progress of the day. I moved to the toolbar the following tools:
https://github.com/user-attachments/assets/a8b6c52b-c738-4442-a55f-68a3de81b01b
Next stop: I will make the cursor look different depending on the tool mode (e.g. transparent blue cube for selection, red cube for eraser).
Describe the project you are working on
I am working on a Twinstick Shooter starter kit: https://github.com/Nodragem/twin-stick-shooter-starter-kit I've used Gridmap for making the levels, using Kaykit's prototype bits.
Describe the problem or limitation you are having in your project
Gridmap is a very useful tool for putting static, grid-based, modular parts of a level together. It deserves a lot of love 😸 !
This proposal tries to make the UI of Gridmap a little bit better, and more consistent with the other nodes:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Done above.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I have built a little mockup here. Maybe the tool icons are not matching one-to-one to the current tools (I just copy-pasted the one in Tilemap); but that's the idea.
Here the full list of tools, with possible shortcuts:
In terms of implementation, I'd try to stick to the current behavior of the current tools.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
It is a core feature.