Design - Physics body and Scene node

I'm designing my own 2d game engine. I've wrote the PhysicsBody class and currently it works for collisions only.

For scene partitioning I use QuadTree and is used for decrease the number of collisions to be checked. I think i can use it for decrease the number of SceneNode to be drawn too. So the SceneNode would ineherit from PhysicsBody.

In the Scene class i'd have 2 QuadTrees 1 for physics and 1 for scene culling. When the user add a SceneNode to the Scene, it has the option to add the SceneNode to the QuadTree for physics or for scene culling.

The Camera class would has 1 box shape for check collisions in both QuadTrees.

Should I use this approach??

Replay

Category: engine Time: 2016-07-30 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.197 (s). 12 q(s)