![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 1
Rep Power: 0
![]() |
Making my own sim
So I'm doing a tractor pulling game (pulling a sled trailer with tractor as long as you can in 100 meters long track) in 2D and I'm using Visual Basic 6 and DirectX 8. I have nearly done the physics engine but it needs still modifying.
First problem which I have is that in my code I calculate the amount of slip like this: Slip Ratio = (Wheel Angular Velocity * Wheel Radius - Tractor Longtitudinal Velocity) / Tractor Longtitudinal Velocity Well, how could I calculate the amount of slip if the tractors speed is zero? I think it is impossible to divide by zero? Or if I don't have to then how could I calculate the coefficient of friction if I don't know the slip ratio? Then a little smaller problem: How could I make a rev limiter? It couldn't be done like limitting only the revs becouse the wheel angular acceleration is still positive. I really appreciate your effort. |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Jun 2005
Location: |\|[][]B |_4|\|D
Posts: 41
Rep Power: 0
![]() |
on the slip ratio you could have an if on the front so that it only works out that way if it doesn't equal 0, i don't know how to do that but that might work... erm as for the rev limiter i have no idea.
|
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
yo
shouldn't slip decrease as speed?
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#4 |
|
Expert Programmer
|
Yeah, isn't slip equivalent to inefficiency which would be 1 - (Useful Work/Total Work) which as it's a quotient is the same as 1 - (Useful Tractor Velocity/Total Wheel Velocity). Also, useful tractor velocity is the total speed in the positive direction minus the effects of towing, wind etc. Total wheel velocity at the edge is in fact (Pi * Radius * 2)/(Time for one complete rotation).
|
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
good lord.
We're not talking about "the sims" video game.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#6 |
|
Programming Guru
![]() |
lol, i think someone has found it via a search on google for the sims
![]()
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#7 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
try thesims.ea.com
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#8 |
|
Programming Guru
![]() |
What in the hell is wrong with people today? Don't they know how to use a damn search engine?
__________________
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|