Sign in to follow this  

Physics of a Custom Vehicle Design

This topic is 2658 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

I'm just starting the development of a game which allows the player to create custom vehicles.

Given the shear number of physics engines available, and each with different strength and weaknesses I was wondering if someone could advise on the areas of the physics engines which would be required to implement the functionality I need and possibly advise on which of the free physics engines are strongest in these areas?

So, here's a little more detail on my custom vehicles and what I need to consider:
1. The player could potentially create unstable vehicles. e.g. very tall vehicles with a small footprint.

2. Players could potentially create structurally unsound vehicles. For example, a very long thin vehicle with wheels at either end. I'd like to see this type of vehicle flex and bend as it drives over my landscape. If the stress gets too much then ultimately the vehicle should snap!

3. The vehicle suspension should be accurately modelled, so that the wheels and springs move as the vehicle drives over bumps in the terrain. These forces are then transferred to the body of the vehicle. If the suspension travel is exhausted (e.g. if you hit a big bump) then we should simulate hitting the suspension bumpstops.

4. Vehicles should be able to realistically get airborne (jump), just like a real vehicle would (e.g. hitting a bump at high speed, or driving off of an edge).

5. Realistic power/speed/acceleration and handling. Including analysing the aerodynamic profile of the vehicle and using this is air resistance calculations.

6. The vehicles are made of different parts. Different parts have different weights, so its possible for a vehicle to be designed for example with a lot of weight at the rear of the vehicle and therefore it would have a tendancy to oversteer when cornering. This should be simulated too.

7. EDIT: I forgot to mention, I also need to support articulated vehicles. i.e. there could be 2, 3, 4 or even more parts to a vehicle joined together by a ball and socket joint.

8. I also need to simulate vehicles bottoming out. For example if a player creates a long vehicle with small wheels at the front and back and then attempts to drive this vehicle over a rough landscape then they could potentially get a rock/mound or something between the front and rear wheels, thereby bottoming out the vehicle and making it unable to move and potentially rocking back and forward like a seesaw.

I think most of the physics is relatively simple. For example, when simulating accelation you'd just use F = MA but also extend this so that there is an air resistance force in the opposite direction (Which is probably the speed squared multiplied by the air resistance factor for the vehicle).

However I suspect simulating vehicle flex will complicate things significantly?

Any advice would be appreciated.

BTW, in looking for a physics engine I'd ideally like an engine that can use any brand GPU for acceleration.

Thanks
Ben

Share this post


Link to post
Share on other sites
As far as I know, most of the things you mention are really only solvable using spring physics (bridge builder, if you ever played that), which behave realistically due to their nature... there is a game that does exactly what you mention somewhere on the internet, can't remember the name though. But it had articulated vehicles in arbitrary shapes, even airplanes, based on springs.

However, spring physics are not all good, they are complicated to work with "as-is" and depending on the wanted stiffness and accuracy might become very expensive to simulate. It's also very hard to control the behavior other than what comes naturally.

Share this post


Link to post
Share on other sites

This topic is 2658 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.

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

Sign in to follow this