Explain to me Scene Node/Manager

Started by
3 comments, last by Shaarigan 5 years, 2 months ago

Hello everyone, hope today's been nice.

I use C++ and trying to become better with game programming concepts. I was wondering if someone could perhaps explain to me more about SceneNodes/SceneManagers. I see how you would declare things such as a circle player (basic example) as a node, which could be anything from a Player or enemy and the scene manager would add this all to create a "Level". Even the Map would be a Scene. I have a great example of one (and 2 from a book), but for whatever reason, I can't understand what it replaces? What would make you say to yourself, "That would be a great idea to use for this!" Can anyone maybe explain this like you would a 5-year-old and tell me perhaps another way to think about this? I usually see this concept in games like Asteroids and I have a few books who use that as well! When I say like a 5-year-old I don't necessarily need to know how it works or the intricate details, but how you would use it, or perhaps, even prefer it?

A simple 2D engine setup I usually use is...StateManager (Splash, Menu, GameState), EntityManager, InputManager, AudioManager, TextureManager, Map class (tiles), and components for the entity. It seems to me these SceneManagers replaces your typical Map class with a Scene class and you use Nodes for your entities. Which is why I believe I'm having a hard time understanding when/why this is a great addition to have. It seems like it usually is fit with specific games. I realize a "Map class" could be done many ways but just think of this complete basic terms (might be hard for some of you experts) so to sum it up in this case just reads a file, creates an array of a Tile struct, sets the sprite for each tile, and displays the intended map.

I'll stop here before I go on. I hope this question makes SOME kind of sense. I don't feel I did a great job explaining my question. I have books that use it, I see how it works, but I have difficulty understanding it for my type of games (RPG/Old School Rogue) and if this is more of niche use. 

Thanks, everyone!

Advertisement

I recommend you go download Unity or Unreal and look at how assets get added to the world. 

Even a few video tutorials on Unity's Hierarchy window would probably be enough to clear it up.

Apology, I don't use GameDev regularly so I forgot all about this post. From what I researched it seemed like it really isn't for every game genre in general. That is an excellent idea though, despite having zero interest in either looking into it a bit more might be beneficial. 

I just find it interesting, the example is always a space game. I was able to set up an example I came across where you add one character (main node so to speak) and you could toggle to any character added, and adding additional character would allow you to move any character added under the toggled (highlighted) character you choose like a big chain. The first character added could move the whole chain.

Very interesting. Thanks for the suggestion.

The technology behind is the transformation matrix of position, rotation, scale vector. On every change in the tree those matrix is updated from those 3 and multiplied to each child attached to the node where's those childs do the same to their childs. This is why you are able to have parent child corrds in your scene

This topic is closed to new replies.

Advertisement