The scene structure of Godot is vastly different from any other game engine on the surface. In fact, the way you structure your game is a departure from the Unity Engine in a lot of ways. Now, let me tell you how.

 

The Big Difference

In the Unity Engine, scenes contain objects and like most games, you would create a flow from scene to scene. This is not the same in the Godot engine. In the Godot engine, scenes are more like tree structures with root nodes. For your non-Computer Science people, that essentially means, there has to be something that sits at the top of the hierarchy for the scene to function. Plus, multiple elements can be added to the tree to make it longer if needed. A good example of a tree structure is the concept of a branching story; each story branch comes from the main root of the tree. Now, in the Godot engine, scenes are quite special, because scenes can be pulled into other scenes and used as objects that you can interact with. This is similar to Unity’s prefab system but works on any scene in the game. Now, at first, you’re probably thinking that’s crazy, but it makes sense and becomes extremely flexible once you wrap your head around it.

 

Making Use Of Scenes

We can make use of scenes properly in Godot by compartmentalizing each aspect. We should consider each major game object with logic a scene. So, our player is a scene, our enemies, large set pieces with logic attached, and scenes themselves. This allows us to create a clean separation of concerns. In fact, that’s the key; think of Godot scenes as an expressive way to separate concerns. By separating concerns we can better organize our game logic and understand how each set piece fits into our game. For example, by creating an enemy scene, we can test and configure all the necessary properties of an enemy as a separate entity outside of any other scene unlike in Unity, where a single scene can get extremely unwieldy with all the objects and prefabs you may be creating; I would take that to heart in your Game Development journey when creating your structures in Godot.

With that in mind, this should give you a better understanding of the scene structure in Godot to make your own games.

Stay tuned for more posts coming soon.

 

%d bloggers like this: