Portponky / gridmap-plus

Godot plugin to give some love to gridmaps.
The Unlicense
16 stars 1 forks source link

Feature request: visualize the full scene in Build Mode (and a big thank you) #1

Open diegopau opened 2 weeks ago

diegopau commented 2 weeks ago

Hi.

First of all thanks a lot for releasing this essential plugin. I am just getting started with my project but from the beginning I realized even if gridmaps are very useful for my project, they are a pain to work with. I was coming from doing voxel based models with MagicaVoxel, and I was wondering why the gridmaps do not allow a similar way of building levels (MagicaVoxel allows building in a similar way to Minecraft). This solves that issue and it is beautifully implemented too (looking forward to those control styles since I am so used to the MagicaVoxel controls with E for fly upwards and Q for fly downwards).

In my specific case, but I imagine that it could be a common scenario, some levels will be fully build using a gridmap, but some other levels will use regular MeshInstance3D for the level structure and a gridmap for placing other blocks that are breakable, pickable or decorative. The reason is performance. My game is a voxel based game, with small blocks and performance tanks with very big levels that might have a million blocks or so, but since I don't need any block to be destructible, I just make the base structure as a regular MeshInstance3D. image

In this situation, if I use GridMap+ I will not be able to see that level structure, because is not part of the GridMap and I will be quite lost about where to place the blocks. If it was possible to see the full scene (just as it happens with Godot's built-in GridMap editor) this would be easy. Of course it could also lead to confusion, since the MeshInstance is not part of the GridMap and would not allow to place blocks attached to its geometry... but I think this could be solved by giving a couple of options like darken everything that is not the gridmap or a toggle to hide/show the rest of the scene.

Another situation where I think is useful is that I noticed that some projects prefer to use not one but two or more gridmaps to build a single level (as if in working with more than one layer) so they would also benefit from seeing the other gridmaps even if they can't interact with them).

I have no idea if this is possible or maybe very hard to do, so please take this as a suggestion and not a complaint about not being possible yet!

Another little thing I noticed is that (by a bad habbit) if I exit the editor doing ALT+F4 (in Windows) then the editor closes but Godot is kind of hang, without showing the mouse cursor, so I have to fully close Godot and open it again. It would be better if the plugin could capture the ALT+F4 order and maybe treat it as the same as pressing ESC (options to save or discard changes).

Thanks again!!

Portponky commented 2 weeks ago

Thanks for using the plugin.

Allowing control customization is on the todo list, though I'm not sure when I'll get around to it. For now you can just alter the plugin code if you really need to change what controls it looks for. Fixing the Alt F4 is a good idea too.

Adding other level content is a great idea, I'm not sure exactly how I would go about doing that - maybe with another button that opens a tree allowing you to toggle which nodes you would like to duplicate. Perhaps a key could toggle it on and off. Holding multiple gridmaps and editing them as layers would be really sweet too. All of these need more specific scene management - at the moment the plugin just knows about the gridmap you clicked on, rather than being able to read/manipulate the whole scene. I haven't looked into how to do this, but it must be possible somehow.

I'm working on another project right now, but when I get some time I will look into these things. Tthe plugin is open source (gdscript) so feel free to tinker with it and if you get something useful, a PR is always appreciated.

diegopau commented 2 weeks ago

As a first step, just being able to render the current scene (the same in which the GridMap node is on) and toggle it on/off would already probably cover most of use cases. Because even if the use case is having multiple GridMaps, you can always switch from one "layer" to another by closing the GridMap+ editor, selecting the other gridmap and entering the GridMap+ editor.

I am quite new to both Godot and game developer so I am not very confident of being able to do any useful PR, but if I happen to modify your plugin in a way that can help others, I will surely add a PR with the changes.

All the best with that other project and thank you for your reply.