godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Implement LogicNode #11105

Open CarpenterBlue opened 2 weeks ago

CarpenterBlue commented 2 weeks ago

Describe the project you are working on

Horror sidescroller, a point and click adventure game to promote a webcomic. The game is groundhog day loop mostly happening in a single room with small changes happening depending on the player's actions.

Describe the problem or limitation you are having in your project

I have moderately large main scene with ton of sprites and other nodes everywhere. Lot of semi transparent overlays and Area2D's and Other Physics Objects. The tree is basically useless for navigation now because it is so large and sprawling, currently, the only remedy is use the editor's 2D view to locate the nodes visually however that is now growing also hard to do when lot of the logic nodes are blocked by semi transparent overlays sprites and CollisionShapes.

image What you can't see is a Shader overlay that slowly colorshifts the hue of parts of the scene, several control nodes that serve as clickable areas. All of these are in the way.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

What is a LogicNode?

  1. It is node like Sprite2D but doesn't render when in the game, only in the 2D viewport. It should also render on top of everything else too. image
  2. It also shouldn't render when it's a part of a nested scene as to not clutter the viewport. image
  3. It should have some Sprite by default to make easy to find in the viewport. image
  4. Has Special Selection tool to be easily found and worked with in the massive scene trees. image
  5. By itself, it does nothing, all the logic has to be implemented by the user.
  6. It cements the idea of composition in Godot image

This will ensure that making logic for the game never becomes overwhelming battle against million nodes.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  1. User selects a new tool in the toolbar image
  2. then can click onto the icons positioned around the 2D viewport without worrying about the other nodes. image
  3. User is free to work on the game now without fiddling.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No this proposal requires to add new selection tool, possibly extend Sprite2D to hide when the game is Run. That is already non-trivial amount of code, especially if you realize it's boilerplate you have to do each project. It would require custom editor plugin.

Is there a reason why this should be core and not an add-on in the asset library?

This is currently a major usability issue in Godot, un-adressed hole in the user experience and something likely even simple projects face.

RedMser commented 2 weeks ago

This is very similar to Source engine's point entity system. While I like working with them in the Hammer editor, I'm not sure Godot needs this out of the box. Most games can likely make do with Marker nodes instead, or just Node if it's something that doesn't need a position in the level. You'd also need to support both 2d and 3d for completeness.

CarpenterBlue commented 2 weeks ago

Can you explain Source's point entity system? How does it differ? How is it similar?

You'd also need to support both 2d and 3d for completeness.

I considered that but in 3D it's much less of a problem since things don't really overlap all that often.

passivestar commented 2 weeks ago

Markers could have different render modes like in Blender:

image

Would help if you could choose a picture for 2d nodes (which would cover this proposal) and a mesh for 3d nodes (I believe unreal engine has that because I remember cameras being drawn as complex shaded meshes)

Would also be very useful if one of those draw modes was "Node Name" which would draw a label with the node's name, I loved that in Unity:

image
CarpenterBlue commented 2 weeks ago

I thought about this further and while I still think LogicNode would be great to have, but perhaps, it would be better to add ability to filter viewport selection by type/group instead for even better usability.

girng commented 2 weeks ago

bit confused, forgive me. but what is the point of the logic node? cause you can do the same with a tool script and set the texture using setget to look just like that, then simply delete them when you run the scene

also, if your scene is getting cluttered like that, you can hold down the alt key and move the item you have selected. it helps immensely. hope that helps if you didn't know

passivestar commented 2 weeks ago

then simply delete them when you run the scene

I wouldn't wanna ship my editor sprites and gizmos with a game. Godot needs proper editor-only nodes tbh for custom marker graphics to make sense

girng commented 2 weeks ago

then simply delete them when you run the scene

I wouldn't wanna ship my editor sprites and gizmos with a game. Godot needs proper editor-only nodes tbh for custom marker graphics to make sense

aww yes, because an editor only sprite, ( in this case, a 1kb texture ) will impact the player? and no, it's not shipping editor sprites, it's whatever texture you set with the tool script. the engine doesn't export out editor icons on release builds anyways