Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Free Code - Top down driving game system

Author
Message
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Jun 2012 17:40 Edited at: 20th Jun 2012 13:36
This is far from a complete system but I dug it out for another post and thought it might be useful for anyone wanting to make a top down physics based driving game like those parking lot games you see on miniclip etc.



It could easily be altered to make more complicated vehicles like trucks with trailers etc. No media required for this version...

Hope you can find it useful!!



this.mess = abs(sin(times#))

Attachments

Login to view attachments
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Jun 2012 17:58
Not bad, although the skid button is a bit of a cheat. A brake button would be better I played about with a similar thing a bit ago but making the brake work properly and skidding when it should was a hard one to get working. I didn't use individual body and wheels though, just the direction the car was moving in, and the target direction it was aiming for.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Jun 2012 18:04
Yet another great coding example from our local hero baxslash!

Cheers,
Ancient Lady
basjak
13
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 19th Jun 2012 18:20
Thanks baxslash. I was trying the same thing last month. It's good to see what someone else has done.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Jun 2012 18:33
Quote: "Not bad, although the skid button is a bit of a cheat. A brake button would be better"

What if I just called it a brake button? It was just to see how easy it would be to reduce the lateral damping on demand really. It would be better to edit the lateral damping based on velocity, braking, surface type and probably a number of other factors for a finished engine.

Quote: "Yet another great coding example from our local hero baxslash!"

Not really great coding but it might help someone with their own system. The lateral damping function is actually a bit of a hacked attempt, although it does seem to work fairly well.

I just hope it helps someone struggling with the concept.

BraindeaD
15
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 19th Jun 2012 18:35
Thanks for the code, Baxslash,
A few days ago I began with a parking game and the car's physics was driving me crazy.

Regards!
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 19th Jun 2012 19:38
Add it to the codebase
Nice bax!
DennisW
15
Years of Service
User Offline
Joined: 15th Jun 2008
Location: Ohio
Posted: 20th Jun 2012 03:41
I could pickup a lot of useful tips on this if I could just stop playing it.

Ham and Eggs Breakfast
The Chicken was involved the Pig was Committed
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Jun 2012 16:07
It's way to easy to have fun with the 'simple test' stuff.

While testing new bits in my WIP game, I set it up so that it was way too hard to get to the next level and laughed myself silly trying.

Cheers,
Ancient Lady
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jun 2012 17:04
Yes, the temptation to "play" when we should be "working" is a hard one to avoid. It's also pretty hard to distinguish between the two sometimes when making games


this.mess = abs(sin(times#))

Login to post a reply

Server time is: 2024-03-28 11:10:26
Your offset time is: 2024-03-28 11:10:26