Recently, I was thinking about how complete beginners could discover Godot, and for what I’ve seen, it’s mostly starter templates for some genres, and of course tutorials. But for someone who just want to put a sprite and make it move, or for other pretty standard behaviors in video games, like a bullet moving straight forward or a rpg party member following another character, I couldn’t find anything like that which doesn’t require also a whole template.
When I tried GDevelop, I noticed its approach to set a preprogrammed default behavior to an actor. That was pretty straightforward and easy to understand for complete beginners. But it as also the advantage to not have to reinvent the wheel for a game genre, yet without forcing the developer to adopt a whole framework.
And I thought that Godot, with its ability to add children nodes to add features to a parent node, would be very capable to do something similar. Something like this scenario: add a sprite, add a default platform controller behavior node to the sprite, run the game and you have control of the sprite. Then move the behavior node to a kinematic body with a sprite and a collision shape, and suddenly you control that body with collision.
Just drag and drop a behavior node on an appropriate node and it suddenly has that standard behavior. Very straightforward and beginner friendly.
Sure, it hides the code from the developer and it only implements basic standard behaviors. But that’s the whole point to give something to start with, of course very biased but it “just works”. And it’s not the same idea as programming a character with tons of decorator nodes. The idea here is not to implement complex features, rather just drag n drop very common behaviors in video games, like GDevelop does.
So, I gave a try and made a prototype with 2 behaviors: one that is a topdown controller like a zelda game, and another is a behavior to follow an object in the same way a party member follows the player in a jrpg, using the snake algorithm. And the result was indeed as I thought very easy to use and it’s totally modular. You can simply use whatever behavior you want and not use the rest. With a bit of work, a whole library can be made, and I think that if it’s well documented, it could be very useful for complete beginners who don’t want to code too much, but also for prototyping where the dev don’t want to reimplement some common behaviors. My inspiration was the Phantom Camera plugin, which is also a ready to use node for a camera that works well out of the box.
So, I wondered if similar tools exist already. Also, I wonder what you think about that approach. You think it would be useful to have default basic behaviors that are added as decorators? Or do you rather use decorators only for things like health bar and additional information?