Top Down Car Simulation (Demo & Code)

Because a couple of people have been asking about this in the past few weeks.

I also hosted it for your convenience: http://files.noio.nl/wheeledcar.swf
sure, now you post this, after I have my game out! 😆

thanks for the code! I was going to spend some time and update my game, but now I only have to spend a little time ctrl-c ctrl-v. 😀
Ooh, cool! Thanks for the contribution =).
nice! Does weight distribution have any effect? Can one make wheels skid upon greater lateral forces?
zappBrannigan wrote:nice! Does weight distribution have any effect? Can one make wheels skid upon greater lateral forces?

At this moment, wheels do not skid, because it is not friction that is applied to the wheels, I just call "SetLinearVelocity" every frame. I did not really think about it long enough to come up with a way that friction should be applied. (If an opposing force is applied in stead of SetLinearVelocity, some very chaotic behavior starts occurring). Feel free to come up with a way though! That would be much nicer!
thanks for sharing.
one problem I cant catch is why the "car" moves faster in X direction? you can hold right + up to see what I mean.
I don't really see what you mean actually.

But Boris has created a better solution for simulating the wheel behavior, in stead of the rather crude 'kill orthogonal velocity'. http://www.box2d.org/forum/viewtopic.php?f=8&t=1567
well, here it looks like while the car speeds up at the top/bottom of circle (when it moving horizontally) and slows down at sides (when it moves vertically). you can see jagged motion where you would expect smooth motion.

this probably became more apparent when I tweaked settings such as HORSEPOWERS up to 300, etc. looks like some kind of resonanse.
Hi again guys,
after moving from my old apartment, i'm back in business and struggling with my top-view car game

i've built a first demo on top of the idea of android and it worked well, but then i noticed the problems thack mack also noticed.
The car seems to go faster at some angle and sometimes it steers faster then normal. I guess it has something to do with the killOrthogonalVelocity function, but i wasn't able to find out a solution.

Now I've read about the lib created by Boris and I'm trying to integrate the previews demo with that.
Someone already tried that and have some suggestion about how to implement it?
Hi lads.

I too am interested in this.

One of the things i am confused about, is that people are forwarding to a post related to bouyancy, tensor and gravity by our talented Boris.

I might just be missing something, but how is this related to top down car phyiscs? I am sure it is of course, but from playing with the demos i see no relation between this example and boris's work.

Thanks.

Original thread: https://box2d.org/forum/viewtopic.php?t=1547