Box2D Forums

It is currently Sun May 19, 2013 7:35 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Tank
PostPosted: Thu Nov 29, 2007 4:27 pm 
Offline

Joined: Wed Nov 28, 2007 9:46 pm
Posts: 34
Working on a tank game. Trying to get realistic effects with traction and the treads.

http://www.mechascientific.com/Tank.html

I tried a lot of ways to move the tank. The first was to apply angular velocity to the wheels, but this didn't give much traction. Then I tried applying torque, worked well but I didn't realize applying torque was additive! I was building up some crazy torque. Finally I made it so as long as the left or right arrow button is pushed down, torque is added to each wheel, but if neither is down, torque is set to 0. Any other suggestions?


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Thu Nov 29, 2007 6:13 pm 
Offline

Joined: Sun Sep 23, 2007 2:35 pm
Posts: 803
Just so you know, something's wrong with your version detect - I have Flash 9 rev 47, but your site won't show me the Flash file, it thinks I have no player installed. Running PPC Mac OS X 10.4 + Firefox, if that helps.


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Thu Nov 29, 2007 7:07 pm 
Offline

Joined: Sat Nov 24, 2007 7:54 pm
Posts: 11
I played around with your demo, and it was pretty fun. I like the way the tank moves for the most part. The objects slip when you try to run them over, that's good. Try playing with the weight of the tank and objects. Tanks are really heavy, the objects should be relatively light.


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Thu Nov 29, 2007 7:59 pm 
Offline

Joined: Tue Sep 11, 2007 7:26 am
Posts: 95
Same here..doesn't think I have the right version..
Got it to work using
http://www.mechascientific.com/Tank.swf
Really neat!
Mike


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Thu Nov 29, 2007 8:06 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Are you applying an equal an opposite torque to the tank body for each wheel?

You can also use a joint motor to achieve a target wheel speed up to a specified torque limit.


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Fri Nov 30, 2007 9:28 am 
Offline

Joined: Wed Nov 28, 2007 9:46 pm
Posts: 34
Thanks for the input guys.

As far as the player goes, not sure what's going on there. Could be the result of having some flex and flash beta software on my box. My day job is programming Flex apps.

As for the tank itself, there's no limit on the torque for now, and I'm applying the same amount to both wheels. I need to figure out how to apply some kind of counter force to the wheels so that the tank doesn't coast, or roll down slopes.

How do I increase the weight? Is changing the density the only way to do that?


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Fri Nov 30, 2007 9:40 am 
Offline

Joined: Mon Sep 17, 2007 8:31 pm
Posts: 40
I think one big main problem is that the treads aren't in any way attached to the wheels, so when you move the treads just sort of slide around the wheels.


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Fri Nov 30, 2007 9:08 pm 
Offline

Joined: Wed Nov 28, 2007 9:46 pm
Posts: 34
Entar: how would I fix that?

UPDATE:
exploding blocks
http://www.mechascientific.com/Bombs.html


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Fri Nov 30, 2007 9:54 pm 
Offline

Joined: Sat Nov 24, 2007 7:54 pm
Posts: 11
Heh, the explosions mess the tread all up. It gets all crooked and vibrates horribly when they're on the wheels. You should let the joints in the tread break too. Also, reset (the r key) doesn't work right, it doesn't delete all the old boxes.


Top
 Profile  
 
 Post subject: Re: Tank
PostPosted: Sun Dec 02, 2007 10:57 am 
Offline

Joined: Mon Sep 17, 2007 8:31 pm
Posts: 40
ninjascience wrote:
Entar: how would I fix that?

Sorry, don't know. I'm a bit of a noob myself, just thought that might help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group