Jump to content

Component based or hierarchy based engine?

What's the best way to handle game objects? hierarchy or component based design?

What design do you think it's better for large projects?

Online I'm finding a lot of mixed opinions on it, and I still can't decide how I should design mine.

 

 

Link to comment
https://linustechtips.com/topic/312265-component-based-or-hierarchy-based-engine/
Share on other sites

Link to post
Share on other sites

If opinions are mixed, that means that there probably isn't a best way. Which means that you need to examine the pros and cons of each method and decide which would be most advantageous to you in terms of implementation and later on maintenance. If it doesn't really make a difference as far as you can tell, just pick one and go to town.

Link to post
Share on other sites

SSL hit this bang on.  Both options have cons and pro's, I personally have tried both and I'm leaning towards component based since it allows for huge amounts of flexibility. But the draw back is complexity since your engine needs to be able to handle each component or data type. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to post
Share on other sites

If opinions are mixed, that means that there probably isn't a best way. Which means that you need to examine the pros and cons of each method and decide which would be most advantageous to you in terms of implementation and later on maintenance. If it doesn't really make a difference as far as you can tell, just pick one and go to town.

SSL hit this bang on.  Both options have cons and pro's, I personally have tried both and I'm leaning towards component based since it allows for huge amounts of flexibility. But the draw back is complexity since your engine needs to be able to handle each component or data type. 

Ok guys, thank you for the answers, I'll try both and see which one to use.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×