Coming from Godot: How to setup a centralized state machine for a Player Character

That is so amazing to hear! Because I was using what is called “GDExtension” in Godot, which basically allows me to use C++ to create my own nodes that would compile and link with engine. Then I could place the nodes I created into the SceneTree.

I guess what I am more confused on is this. In Godot, you would rely very heavily on the SceneTree to get things done. Need to spawn an enemy? Spawn it in the “EnemySpawnPoint” Node3D Node position. Need to have a state machine that manages your Player instance? Make the Player instance a child of the Player_Manager state machine. This hierarchy is the standard, and “proper” way to set up your Scenes (Levels) in Godot.

In UE it seems there is much less attention given to the actual structure of nested Components and Actors in the Outliner. At least it seems that way from what I have gathered so far! So, is there a “proper” or standard way I should be structuring Actors and Components in the Outliner?

In a finished game, the player is not present in the Outliner from the start, instead they would be instanced into the world, right? So, would it be “proper” to just make the Player_Manager exist at all times and have it spawn in the Player instance, but not make it a child, instead just let it sit wherever it is in the Outliner and keep a reference (pointer) to the Player instance for the Player_Manager to use to dereference the instance. Since order and structure in the Outliner is not imperative?

Or would it be better that something like a Level_Manager is what creates the Player instance, and inside of the Player instance is a state machine component called Player_Manager? I would like to know how you would do it!

1 Like