Box2D Forums

It is currently Sun May 19, 2013 1:35 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Oct 18, 2007 11:33 am 
Offline

Joined: Thu Oct 18, 2007 11:29 am
Posts: 2
Hi

Im doing a topdown 2d rpg with vehicles and buildings, rocks, trees, other vehicles etc you bump into. Would box 2d work for this? I have a huge gameworld and you move around freely pretty much like in a diablo hackn slash.

My idea is to have a system where vehicles and objects coming close to the player they "start operate as physics objects" and when being at a distance (like they are most of the time) they are simply ignored by box 2d. For excample in my testmap i have 6000 trees and that will be rather heavy to simulate right? Could this work?

Should i move the physicsworld to always be around the player or should i have a frikkin huge physics-world that covers my entire gameworld? Is it smart to make my unit-objects spawn a "shape n body"-child when close to action and scrap it once they leave the parimeter?

Thanks
Erik


Last edited by suliman on Thu Oct 18, 2007 12:11 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Oct 18, 2007 12:04 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Right now Box2D handles almost 64K shapes. For performance you shouldn't have more than a few hundred bodies moving at a time.

Box2D should work for that type of game, but I haven't seen it done before. Give it a shot and let me know what features you need.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2007 1:34 am 
Offline

Joined: Thu Oct 18, 2007 11:29 am
Posts: 2
this might be a bit more complicated/or simple then first imagined...

I already control movement and turning of my vehicles and most other objects are statics like boulders, buildings etc. Will this pose a problem? I mean what i need is basically the "push-force" that applies to a body when it hits another, i still wanna control where the bodies move since i have a system already for engine, breaks and slides.

Can this be done or is box 2d set up so i leave it to the simulation and thats it?

Thanks for you help Erin
Erik.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2007 9:58 am 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
For now you can make your game controlled objects static (zero mass) bodies that you move around. Later, you might consider a using physics model for your vehicles. I'd be happy to collaborate with you on this, in terms of Box2D features to support these kinds of vehicles.

What kind of dynamic effects are you looking for?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Exabot [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group