I think I am confused as to the differences between a Scene and a Screen Element as mentioned in the book and how they are used. Both are inherited by the ScreenElementScene class (inheriting Scene and IScreenElement) which is only a component of the HumanView class where it is a component twice, once as a pointer to itself and once as a list of IScreenElement's. I'm also not really sure why its included as a pointer as it is only referred to in the constructor, but not used anywhere else and the list is what appears to call Scene's functions through the ScreenElementScene class.
Here is my understanding thus far:
Scene:
- Container/manager for SceneNodes with each node representing a rendered game object
- I see this as a container for what is in the current level, area, etc, allowing for different scenes to represent different levels of objects. When a new level or area is loaded its corresponding scene is used.
Screen Element:
- "anything that draws and accepts input" (pg 284 of book)
- from what I can tell it appears to be mainly used for menus, buttons, and other UI elements, but on page 285 it says that "other games use multiple screens to set up the characters or misison." This would imply that it is involved with game objects as well, not just UI.
Both have functions that render, restore, update, and what to do on lost device. Some questions that will hopefully help clarify/organize my confusion:
1) What is the relationship between a Screen Element and a Scene?
2) Why not implement screen elements as scene nodes? Each menu could be a node with sub-menus and other elements as children nodes.
3) If they are to help divide the UI and main menu from the game world and its objects why the combo class (ScreenElementScene)?
Here is my understanding thus far:
Scene:
- Container/manager for SceneNodes with each node representing a rendered game object
- I see this as a container for what is in the current level, area, etc, allowing for different scenes to represent different levels of objects. When a new level or area is loaded its corresponding scene is used.
Screen Element:
- "anything that draws and accepts input" (pg 284 of book)
- from what I can tell it appears to be mainly used for menus, buttons, and other UI elements, but on page 285 it says that "other games use multiple screens to set up the characters or misison." This would imply that it is involved with game objects as well, not just UI.
Both have functions that render, restore, update, and what to do on lost device. Some questions that will hopefully help clarify/organize my confusion:
1) What is the relationship between a Screen Element and a Scene?
2) Why not implement screen elements as scene nodes? Each menu could be a node with sub-menus and other elements as children nodes.
3) If they are to help divide the UI and main menu from the game world and its objects why the combo class (ScreenElementScene)?