collectables

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
ron
Posts: 44
Joined: Sat Dec 11, 2010 7:25 pm

collectables

Post by ron »

hiya,,
i have 89 game collectables in my game
i am planning to uses box entity for collectables, but as there are 89 collectables in the game so i'll have to make 89 box entities,plus i have entities for the level ,creeps as well as the main character
any alternative for collectable making?
it would be really helpful
:)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: collectables

Post by Norbo »

I wouldn't worry about having 89 entities from a performance perspective. I assume they're either always asleep or static with collision events that cause them to temporarily disappear now and again. Either way, that should be pretty cheap.

If you don't want to use entities at all, you could just brute force bounding box tests between the player and the collectables. Or, create a new BroadPhaseEntry child class that lives in the broad phase and detects collisions or is queryable by the BroadPhase.QueryAccelerator- this would require more work, though.
ron
Posts: 44
Joined: Sat Dec 11, 2010 7:25 pm

Re: collectables

Post by ron »

thnks
Post Reply