Add a scene manager #3

Closed
opened 2024-09-16 17:20:46 +00:00 by OddlyTimbot · 1 comment
Owner

The job of the scene manager is to keep track of everything currently on-screen in our game level.
For example, currently the player spawns bullets and adds them to the stage by referencing the "owner" object. It is a bad pattern for a child object to assume the conditions of it's parent.
Instead a scene manager should be told to spawn the bullet. This way it can keep track of things like how many bullets are in play, and it can re-use bullets rather than having to spawn them each time.
In the future, the scene manager will also be able to track things like how many bad-guys are on-screen, or how many collectable items remain to be collected, etc.
The SceneManager will be a Singleton instance, which is created in Godot by using the "unique instance names" feature.

The job of the scene manager is to keep track of everything currently on-screen in our game level. For example, currently the player spawns bullets and adds them to the stage by referencing the "owner" object. It is a bad pattern for a child object to assume the conditions of it's parent. Instead a scene manager should be told to spawn the bullet. This way it can keep track of things like how many bullets are in play, and it can re-use bullets rather than having to spawn them each time. In the future, the scene manager will also be able to track things like how many bad-guys are on-screen, or how many collectable items remain to be collected, etc. The SceneManager will be a Singleton instance, which is created in Godot by using the "unique instance names" feature.
Author
Owner

Complete!

Complete!
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OddlyTimbot/AugGodotGameCourse#3