Game Development Community

Collision between cars

by Rafael Rico · in Torque Game Engine · 01/11/2007 (10:09 am) · 9 replies

Hi everybody.

In the first place please excuse my bad english.

I'm developing a single player car game, and found a bug with the car collisions between the player car and the AI cars.
When I drive at the same speed and collide with an AI car the screen start to skake and the collision to repeat.

First of all i simplified the collision mesh (is a box right now) with no luck.

In the forums i read that this issue is a network lag.

I think is the same problem that Ward De Langhe described in this plan:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8550

and also Mathieu Lopez:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5617

Then I changed the pref::net vars (increasing PacketRateToClient and PacketSize even in NetConnection::checkMaxRate), and tried several engine modifications i found in the forums to change the client prediction system of torque, again without luck.

Here is a couple of videos:
www.ingenieriaoarte.com/juegos/video2.avi(7mb)
www.ingenieriaoarte.com/juegos/video1.avi(37mb)

Has anybody some sort of solution ?

Thanks.

#1
01/11/2007 (10:57 am)
I don't think there is an easy solution. There are problems with both the collision detection and collision resolution code. In my game I have managed to tweak and hack using an array of different fixes, and the results are mostly ok now - serious bugs and crashes are gone, at least, which was the worst problem. But stock Torque rigid body collision code is pretty bad, to be honest.
#2
01/13/2007 (10:09 am)
Oo just wanted to say nice car game looks pretty almost finnished. ( cant help with the bug sorry )
#3
01/13/2007 (10:48 am)
@Sam Thanks for your answer.

@Saska Thanks, yes the programming work is almost finished (it's a simple freeware game made for fun and learning purposes) but only have 3 levels. I'm working to get to 10 or 15 different races.
#4
01/13/2007 (10:48 am)
Aye, what Sam said. Sorry.

I'm not sure if anything is going to be done about it, but there's supposed to be a physics pack coming out. Again, not sure if it will fix it - but one can hope.
#5
01/13/2007 (11:15 am)
Yes, Joshua Dallman did mention it ("Physics for Torque"). I hope it will improve vehicle physic behaviour.
#6
01/16/2007 (2:04 am)
Rafael mind sending the game you got so far? id love to play it :) Oh yes and the physics pack will be a great pack ive heard.
#7
01/16/2007 (4:26 am)
This is the reason I stopped working on that racinggame back then. We also had a lot done (cars, simple AI, tracks, checkpoints, weapons, race position, etc etc), but I quit working on it after I realized I couldn't fix that bug. If you ever fix this, let us know, and i'll dig up that project again ;)
#8
01/16/2007 (6:09 am)
@Saska. I'll send you the next beta download link. It'll be released before the end of the month. But please, don't expect too much. This project really started to make something quick and easy and stop for a while other projects.

@Ward. Sure. I would love to contribute to the community. If I find some sort of solution or workaround I will let you know.
#9
01/18/2007 (2:12 am)
Thanks ok ill be waiting.