Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Car physics? (http://www.alice.org/community/showthread.php?t=9382)

MaverickLeader 07-17-2012 01:01 AM

Car physics?
 
Hello there,

I'd like to learn how to make my car move like the cars in this video of one of my favorite arcade racers: Wangan Midnight Maximum Tune 3DX+
[URL="http://www.youtube.com/watch?v=tFyPXu7cWVE"]http://www.youtube.com/watch?v=tFyPXu7cWVE[/URL]

Thanks in advance!

drellem 07-17-2012 03:31 AM

I don't have time to investigate now, but here are my initial thoughts:
1.That game doesn't have very realistic physics.
2.When you turn the game seems to: turn your car, adjust the camera to stay behind the car, and tip the car very slightly.
3.In reality your car would also keep moving in the original direction proportional to your speed.

I suggest copying these actions (3) optional, depending on what you want, and set a variable world.speed.

You will also need to have acceleration. One way to do this is to have an event like:

While the key 'w' is pressed
Begin: None
During: if world.speed < 100
World.speed = world.speed times .001 +0.1

End: None

You will want to have an infinite loop throughout your game something like:

While true
Car.move forward world.speed
if world.speed > 0.5
world.speed = 0
Else: world.speed = world.speed/1.11

You can adjust these numbers to whatever. Hope this helps you.

MaverickLeader 07-17-2012 12:26 PM

Thanks, but what do you mean "tip lightly"? Also the game isn't supposed to be realistic. After all, it is an ARCADE racer :)

drellem 07-17-2012 01:01 PM

I meant tip slightly.


All times are GMT -5. The time now is 01:28 AM.

Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.