Jump to content
  • Advertisement
Sign in to follow this  
PasalicZaharije

3D data structures

This topic is 4769 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
What do you mean by 'organize data structures'? There are books available on 3D engine design such as '3D Game Engine Architecture' by David Eberly.

Share this post


Link to post
Share on other sites
OK. Yes. It is stupid question:

For now we used B3D to load our models, so structure of one model is hierarchy starting from RootNode and every node has its childs and siblings nodes. Most of nodes has mash (some are helpers without mesh).

What is particulary problem is where to plase Collision, AI and Phisycs parts in out data hierarchy. We decided to place Collision in every node of every mesh. Is it good/bad? (just to say that is flight simulator). Becuase we are begginers in game programming it is still confusing to put all together.

We write class Object that is base class for all objects that are on scene. Every object, eg ship has it's class Ship inherited from Object. What we wonna do with this is to make main loop that simply goes trough every Object and call: move-collide-render. It is good practice to keep using OOP? If not why?

This is what I mean with "data structures".

Thansk,
Zaharije Pasalic

Share this post


Link to post
Share on other sites
Quote:
Original post by PasalicZaharije
For now we used B3D to load our models, so structure of one model is hierarchy starting from RootNode and every node has its childs and siblings nodes. Most of nodes has mash (some are helpers without mesh).
I'll assume each root has a mesh and you're doing a mesh by mesh rather than a full bounding box / sphere, etc. Doing that is great for collision between characters or other limbed objects. For a plane, since it's pretty square anyways, I might suggest a huge box and placing your collision only in the root node.

Quote:
We write class Object that is base class for all objects that are on scene. Every object, eg ship has it's class Ship inherited from Object. What we wonna do with this is to make main loop that simply goes trough every Object and call: move-collide-render. It is good practice to keep using OOP? If not why?
This is a great practice, inhereting everything from an object class. Even the pros do it.

Personally, I suggest placing your AI & Physics in the root node. Your meshes don't need to think or react independently, so you only need a single instance. Placing that in your root would be the best place. IMHO, collision should be in the root as well, but that's how I'd do it, it's not necessarly the right way.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!