Martin2k Forums

Board index Digital Media Game Development

2D car physics engine feedback wanted

Are you an Indie Games Developer? So are we! The Martin2k Games Development forums include projects and discussions from various platforms, including Construct 2 and Multimedia Fusion 2.

2D car physics engine feedback wanted

Postby pixeldriver » Sun May 06, 2012 11:20 am

Our lass was away last night and daughter in bed so thought id have a bash at making the handling engine i used for zombies brains automobiles abit more stable. Managed to nearly eradicate the snapping back to the correct angle issue, it now usually slides back smoothly for most of it. Added instability when braking so you can brake and to make the car slidey. Mostly stopped the issue were if you drive in a straight line the tap an arrow key it would slide right to one side which looked really lame.

If you touch the kerbs it makes your car loose grip and the car back fires depending how your driving it :D

See what you think.

http://dl.dropbox.com/u/22197067/cargame.exe
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: Another bash at perfecting my car handling engine

Postby Hoj » Sun May 06, 2012 7:46 pm

Did you develop this yourself?
"I searched through the alterable values of flug gb.mfa but couldn't find Eric, Hoj, Alex or the Spaghetti Monster. Therefore Eric must exist, but Hoj, Alex and the Spaghetti Monster must not exist."
Hoj
Administrator
 
Posts: 4103
Joined: Tue Oct 20, 2009 2:54 pm
Location: OC
Medals: 2
6 Star (1) Flug Collaboration (1)

Re: Another bash at perfecting my car handling engine

Postby pixeldriver » Sun May 06, 2012 9:40 pm

Yup all my own doing although took ages for it to click in my head how to do the sliding part. I remember when me and louie was doing that micro machines game and he told me the theory of how to make a car skid but i cudnt work it out myself and i dont like to just paste other peoples code ya know.

Its using the original race car movement, but lots of events and also a fake and real car object for the sliding. Like i said its a more polish version of the one i made for Zombies, Brains and Automobiles.

Update

Did some work tonight, made it really hard to steer while on the brakes, also if you go onto a track kerb it also makes it harder to steer now.

Do you like it?
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: Another bash at perfecting my car handling engine

Postby pixeldriver » Mon May 07, 2012 1:06 am

another update

did abit more research into car physics to see what else i can achieve. Once it's all done I will post it for anyone to use in there games if they fancy making something from it or maybe a collaberation with someone. Ok so changed the speed in the latest build so it works alot better. Another thing to make it abit more realistic is that if your accelerating then left off the accelerater the weight shifts making it more likely to slide aswell.

I'm going to keep researching into this stuff to keep adding bits till it's as realistic as you can get in a 2D game

http://dl.dropbox.com/u/22197067/car%20 ... e%20v2.exe
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: Another bash at perfecting my car handling engine

Postby Svart likdöd helvete » Mon May 07, 2012 1:22 am

Nice! Are you using another object for the skids like most people do?
User avatar
Svart likdöd helvete
Level 4
 
Posts: 2160
Joined: Tue Dec 28, 2010 10:38 am
Location: Eumerica
Medals: 1
6 Star (1)

Re: Another bash at perfecting my car handling engine

Postby Hoj » Mon May 07, 2012 11:05 am

It's a pretty nice edit of the race car movement engine. Why don't you try to create on from scratch using a static object? I'm not sure how difficult that would be, with the directions etc? It can't be easy having to hack the race car movement either :)
"I searched through the alterable values of flug gb.mfa but couldn't find Eric, Hoj, Alex or the Spaghetti Monster. Therefore Eric must exist, but Hoj, Alex and the Spaghetti Monster must not exist."
Hoj
Administrator
 
Posts: 4103
Joined: Tue Oct 20, 2009 2:54 pm
Location: OC
Medals: 2
6 Star (1) Flug Collaboration (1)

Re: Another bash at perfecting my car handling engine

Postby pixeldriver » Mon May 07, 2012 11:22 am

Oh no i couldnt handle doing a static engine as wouldnt even know were to start. It is abit complicated messing with the car movement but at least it gives me a base to work from. Ive added some meters now aswell so you can see whats going on as your driving.

I think what i like about this is its like an inbetween version of albins crazy complex 360 car movement which i couldnt understand any of. I wish i could be bothered to work on doing gt challenge again as loved that. I need someone who enjoys track design and stuff like INI and all that.

Any ideas on how to make this better?
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: Another bash at perfecting my car handling engine

Postby pixeldriver » Mon May 07, 2012 2:28 pm

Update

Added instability at high speeds, so if you come to turn at high speed you will slide alot more.
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: Another bash at perfecting my car handling engine

Postby pixeldriver » Mon May 07, 2012 4:40 pm

update

added understeer, if your accelerating and come to turn if your going to fast your car will run wide as in real life. The parameters might need altering as its abit hard to go around the course without either understeer or oversteer.

I've also changed the turning point so its abit closer to were the front axel would be instead of in the center as before.

Let me know your thoughts

http://dl.dropbox.com/u/22197067/car%20 ... e%20v3.exe
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: 2D car physics engine (07/05/12)

Postby pixeldriver » Tue May 08, 2012 10:03 am

Uploaded a video to youtube last night to show some of the physics and how to do them.
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: 2D car physics engine (07/05/12)

Postby Hoj » Tue May 08, 2012 11:44 am

I am playing this btw :P

I think you should make GTM3.
"I searched through the alterable values of flug gb.mfa but couldn't find Eric, Hoj, Alex or the Spaghetti Monster. Therefore Eric must exist, but Hoj, Alex and the Spaghetti Monster must not exist."
Hoj
Administrator
 
Posts: 4103
Joined: Tue Oct 20, 2009 2:54 pm
Location: OC
Medals: 2
6 Star (1) Flug Collaboration (1)

Re: 2D car physics engine (07/05/12)

Postby pixeldriver » Tue May 08, 2012 12:54 pm

Haha Ah great stuff! What do you think to the latest version?
Also whats GTM3?
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: Another bash at perfecting my car handling engine

Postby pixeldriver » Tue May 08, 2012 12:57 pm

Svart likdöd helvete wrote:Nice! Are you using another object for the skids like most people do?


Yeah im using a fake car which follows the real one which has race car movement. I alter the angle of the fake car for the skidding part. Is that what you meant albin?

Btw thanks for the great response, anything you can see to improve on it?
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: 2D car physics engine feedback wanted

Postby pixeldriver » Wed May 09, 2012 3:25 pm

Come on guys give it a bash please
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am

Re: 2D car physics engine feedback wanted

Postby Hoj » Thu May 10, 2012 1:08 pm

I have. I'm waiting for it to all be static O_O
"I searched through the alterable values of flug gb.mfa but couldn't find Eric, Hoj, Alex or the Spaghetti Monster. Therefore Eric must exist, but Hoj, Alex and the Spaghetti Monster must not exist."
Hoj
Administrator
 
Posts: 4103
Joined: Tue Oct 20, 2009 2:54 pm
Location: OC
Medals: 2
6 Star (1) Flug Collaboration (1)

Re: 2D car physics engine feedback wanted

Postby pixeldriver » Thu May 10, 2012 2:16 pm

What difference is it been static going to do? Surely im still gonna have to rotate the object to turn into a corner aint i? I dont get how it would be different. Confused.
Karmageddon Khaos powered by the Retrolistic engine by Pixeldriver and Sumo

viewtopic.php?f=24&t=1979

http://www.facebook.com/karmageddonchaos
User avatar
pixeldriver
Level 2
 
Posts: 540
Joined: Sat Apr 17, 2010 3:12 am


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest