Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Pulling a trailer Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Nitrotrigger

March 29, 2005, 07:53 AM

Iīm making a 2D game where the player pulls a trailer with a tractor for 100 meters. In europe this is called Tractor Pulling. I really don't know if
they race in america?

Well the problem is how can I simulate a tractor pulling a trailer?
I use Visual Basic 6.0 and DirectX8.

I didn't know where to post this so I thought this belongs to "physics" or something?

 
Wernaeh

March 29, 2005, 03:03 PM

This depends on what you actually wish to simulate, and how the race actually is setup.

As far as I recall, tractor pulling is just having various tractors with an anchorlike trailer appended. Now, this anchor automatically is tracted more and more into the ground the further away you go, and the restraining force it creates gets larger with the tractors distance. This goes on until the tractors engine fails to create enough force to continue moving.

This physically means moving forward on a straight line without any curves, and with two forces on your object. It probably simplifies to just the normal equations for movement, that is
a = (F - x * C) / m (a being the acceleration on your object, F the pulling force the tractor creates, m the mass of your tractor, and x * C a value indicating the restraining force created by the anchor).
Then, you just use a time interval (see variable or fixed step time models for details) to determine the time which passed between two frames of your physics system, and then do
newv = a * t + oldv; (where oldv is the current velocity of your object, and newv is the resulting velocity for the next frame)
and
newx = a * t * t + oldv * t + oldx (where newx and oldx are the positions of your object)

However, doing it this simple way is not probably making a fun game (since there is actually no skill involved, considering that you can do an optimal race by just accelerating)

Now, you could either implement a more complicated course (curves, etc), though that probably does not resemble what you call Tractor Pulling.

On the other hand, you could add some simulation of the various gears of a tractor, or allow tractor engine modding to somehow add more "game" to your program.

Cheers,
- Wernaeh

 
Victor Widell

March 29, 2005, 06:46 PM

The main point of this kind of racing is the engines of the tractors. The sprot is not as much about driving, as about building and perfecting the tractor.

The champions in this sport use extremely powerful and customized wehicles with bizarre solutions, like 5 parallell connected V-8 engines, or maby a jet-turbine. A piston engine won't need any cooling, since the fuel itself will have enough flow to absorb the heat.

Just to give you an idea about the kind of machines we're talking about...

 
Nitrotrigger

March 30, 2005, 11:44 PM

Well I already knew how does the trailer work but the problem is that if the tractor turns then how does it affect to trailer? How can I calculate the rotation and location of trailer?

I think it would be boring to play if the tractor just go straight.

 
amh

March 31, 2005, 01:02 AM

Firstly, you should thank any contributors for their efforts even if they did not answer your vague question to your "standards". The reasons for doing so are hopefully obvious.

Secondly, since your question is so vague and all-encompassing, you should start with the fundamentals and work from there. Start first with a book ("Physics for Game Developers") or a website tutorial (http://www.gamedev.net/reference/list.asp?categoryid=28) to learn about physics, the implementation of, and the application within. You can also read up on physics (dynamics) here: http://en.wikipedia.org/wiki/Dynamics_%28mechanics%29

Remember - when seeking help you must incite a desire for others to want to help you. You cannot simply expect someone to provide an answer for you. And displaying appreciation is a great place to start.

Wish you luck.

 
Nitrotrigger

April 02, 2005, 07:01 AM

amh you are right. Well thanks to Wernaeh and Victor Widell for answering. I noticed that you know something about Tractor Pulling. If I need help about this in future I should ask you. :D

Iīm not very good in english and you noticed it when I didnīt remember to thank becouse I concentrate on my language and not what Iīm writing about. Sorry.


Well now I will explain you more accurately about what Iīm doing and what I need to know.

So, I love engines and therefore cars, motorcycles and tractors.
First I tried to make a car game but nobody was intrested about it becouse
theres a lot of cargames nowadays. Well I havenīt ever seen a one single tractorgame so I thought I should try...
My 3D programming skills are practically zero so I had to start with 2D and DX8 & VB6.
As Victor Widell knew, Tractor Pulling isnīt just racing (=pulling :D) so there will be lots and lots of possibilities of tune and modify the tractor in the game.

Well since the racing-part would be very boring if the tractor just go straight I wanted that player could turn the tractor so the trailer must follow it. This is what I like to do realistic but for that I need some physics and thats where I need help.

Thanks.

 
Victor Widell

April 02, 2005, 05:36 PM

If you want tuning and customization, physics will not be the hard part...

Creating a system like that is vary difficult. You can't just give the user a "Engine power"-setting because averyone will of course just set the power to max.

To make the game interesting, you need to provide a lot of choises, wich have no obvious optimal setting, but can work out well or worse together. (One choise could be One Big Engine or Many Smaller Engines. They give the same number of HP:s, but many small ones could give a lower Center Of Gravity while one big is probably lighter. And lighter engines means better accelration, but less traction etc.)

The point is, there can be very many local optimas in the graph of performance. The player can try to find the global optima, but it is not obvious, and might depend of his/her driving style.


For the physics itself, I saw a thread about 2D physics here just a few days ago. Could be useful.

 
Nitrotrigger

April 03, 2005, 10:25 AM

I tried the Wernaehīs thing where the anchor creates a force that slows down the tractor but there happens a funny thing, the tractor starts to move backwards at a very high speed when the resisting force is big enough.

 
Reedbeta

April 03, 2005, 03:36 PM

This is a common problem with using drag and Euler integration - check out this article for solutions (free registration required):

http://www.gamasutra.com/features/20000215/lander_01.htm

 
Vast

April 03, 2005, 10:46 PM

Just a question:
Where in europe do they do tractor pulling?
And what is the point? I mean, do you design your own tractor or something?


Thanks,
Tim

 
Nitrotrigger

April 04, 2005, 06:57 AM

Well in finland where I live they do and in germany I think.

 
Nitrotrigger

May 19, 2005, 07:38 AM

Well I have done the game to the point where I need to write code about how the tractors wheels spin and how it affects to the force that pushes the tractor and the trailer forward. I got that trailer simulation work. Now it works perfectly.

Do you recommend me any links where I should start reading and maybe learning something about the solution to my problem or could somebody help me here?

 
Chris

May 19, 2005, 08:40 AM

In Germany, definitively. Though it's not done regularly, don't think of it as my nation's favourite sport :-) It's more of a show event.

Besides that, every nation has something similar. They throw tree-trunks, or fight bull whilst bathing in tomatoes, etc.

 
Victor Widell

May 19, 2005, 04:17 PM

The spinning wheels are actually a central part of this sport. The spin of the weels make the tires expand pretty much, giving the tires a greater traction. So everyone spins the wheels at high speeds instead of just using a low gear.

I have no clue on how it actually works, though.





Chris wrote: (...) fight bull whilst bathing in tomatoes, etc.


LOL.

 
This thread contains 14 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.