Game Development Community

dev|Pro Game Development Curriculum

Good and bad news

by Very Interactive Person · 08/23/2005 (2:38 pm) · 20 comments

Some good and bad news. Lets start with the goodies:
Quit some time ago someone posted a resource with some code for rigid shapes (sorry, forgot who it was, if anyone knows, please post, the guy deserves some credit ;) ). Now at first sight this looked like a fun resource to add to the game, but upon closer inspection it turned out the rigid shapes were a heavy load for the network. Adding 4 or 5 to the game would slow it down, 10 to 15 would simple kill the game (no matter where they were in the map).
But the guy who's helping me out with the engine code, Micheal Mastracchio, did a great job by changing that resource in a clever way. Now it no longer is a heavy load for the network, and we can have crates and barrels etc on the side of the road.
Here's a video of some crates:
Crate video

And here's another video showing some race shots, and i know, bad quality video, and I had to cut a lot, so there's not much to see

Race video

So now the bad news:
I've been strugling with a bug for quit some time now. Tought I'd post it here and see if other people experienced the same problems and maybe someone found a fix. Or maybe this will be fixed in 1.4?
The thing is this. When I drive at approximately the same speed as another car in the race and then collide with it, so strange "lag" occurs. Like the client and the server are fighting over where both cars should be. Everything just starts shaking. Its network related, becuase the framerate seems to stay stable.
Anyway, here's a video, it might explain the problem better then my poor explanation:
Bug!

I think I remember someone from Bravetree mention things like this, but i'm not sure they were talking about the same thing. So is this something that will be fixed in 1.4? This seems to be typically Torque. I really need this fixed or else we can forget about this game. This is the only thing i can't hanle myself. Michael will now take a look at it, so I really hope he finds a solution. Anyway, if anyone has anything to say about this problem. What causes it? How can it be fixed? Fixed already?.... Let me hear!


Oh, and before I forget. Here's another shameless plug:
Some of the textures in this game are for sale here.

#1
08/23/2005 (3:36 pm)
Quote:
I think I remember someone from Bravetree mention things like this, but i'm not sure they were talking about the same thing. So is this something that will be fixed in 1.4? This seems to be typically Torque. I really need this fixed or else we can forget about this game. This is the only thing i can't hanle myself. Michael will now take a look at it, so I really hope he finds a solution. Anyway, if anyone has anything to say about this problem. What causes it? How can it be fixed? Fixed already?.... Let me hear!

I heard (think Stephen Zepp said it, but don't quote me on that) that 1.4 could have some fixes for physics related problems in TGE.
Hopefully your problem will be solved there. Even more hopefully, hope the crashes and collision handling gets improved generally.
#2
08/23/2005 (3:50 pm)
there's a simple fix for this:

don't crash cars ;)

(sorry, couldn't resist)

videos are looking awesome, I want to play!!

and that texture pack is a steal for ten bucks!
#3
08/23/2005 (4:49 pm)
Hmm, interesting bug. I'll try to take a little time to look at it. It looks like the camera is messing up much more than the vehicles are. Do you have the same issue when the camera is in 1st person mode?

There was a huge long discussion a while ago about a similar issue. You might want to track that down.
#4
08/24/2005 (12:36 am)
Looking really cool...

There's a resource to keep missiles at a fixed height... You must put that in...

EDIT: Saw the "bug" video now... It's because the Camera is Fixed to the cam-node...
That means when you roll the car, the cam goes underneath the surface.

Use the Advanced Camera resource to 'disconnect' it and modify that...

I had the same problem when playing with vehicles...

Another quite irretating thing you'll find is the that the Camera's X-axis and Y-axis
changes. You should always be looking sorta down to the car and terrain...
Look at any high-quality car games...

I'll go see if i still have those changes... But I think i wiped it when i moved to TGE1.3.
#5
08/24/2005 (1:22 am)
This bug looks like the stuff I have with my flying vehicles - same problem.
#6
08/24/2005 (3:22 am)
@Burning: I think you have the wrong idea about what i'm talking about. I'm not talking about the camera going below the surface (but offcourse it'd be nice to see that fixed too). I'm talking about the lag. This also happens when the car doesn't roll. It feels like network lag. The screen start shaking. Like the server and client don't agree where the cars (and the camera since its mounted on the car) should be. Then after some shaking, i finally get kicked back.
Now, i noticed the cars bounding box on the client seems to be in a different location then where you expect it to be.... so maybe the client thinks a collision occured, but on the server there's no collision yet? Must be something like that...
#7
08/24/2005 (3:54 am)
Aaaa.... now I see what you talking about...
#8
08/24/2005 (11:53 am)
I'm happy you liked the rigid shape stuff. It would be very interesting to see the changes you made and/or even releasing it as a resource!! *nudge* *nudge*

;-)

Looking forward to seeing these videos - cant download them from home (GPRS..... for 4 more weeks)
#9
08/24/2005 (12:46 pm)
Really nice videos. Looks like quality (and how is that for a statement...). Will there be a demo avaible?
#10
08/24/2005 (2:42 pm)
The plan was to first release an open beta, but we're far past the deadline we set for ourselves for that one ;), then after that a release, and yes, with a free, but limited demo.

@Thomas: Ah, you're the one who made the original rigid shapes ;) I don't really know exactly what was changed in the code, just the idea behind it, and it seems to work fine. I'll see if Michael wants to shed some light on the matter.
#11
08/25/2005 (12:20 am)
Or dump me the code (if you want to share it), and I can port it into the old resource (with proper credits naturally). Then I'll sort out the cleaning up and what changed part.

But its your code, and you decide.
#12
08/25/2005 (12:02 pm)
@Thomas: I really didn't add any huge changes to it, i just basicly added a if statment in front of the integrate call in the code... and i just basicly only allow it to run when a collision is detected... and when the rigid shape stops moving it disables the code... But of course this prevents the code from constantly calculating the phsyics forumla's which was causing a huge performance loss. Like I said nothing special I'll post the code changes here when i get some time to figure out where all the changes i made where...
#13
08/25/2005 (12:28 pm)
Well i got lazy and just decided to post the entire file here.. You shouldn't have any problems figuring it out. My orginal plan was to put tree's into our game using this code, so when you hit them with our car they would go flying off... But I havn't got to that point yet.


Edit: "Code Deleted!"
#14
08/26/2005 (6:16 am)
Not sure GG is happy about having engine code in here. Better delete it. I got it cut'n'pasted and will update the resource. Thanks!
#15
08/26/2005 (12:36 pm)
Ya just relized this was a public blog, hehe...
Tell me what you think of the fix when you get it all put together.
#16
08/27/2005 (1:16 am)
Sure thing!

From the sound of it all, its a beautiful, nice little hack to save CPU cycles. Simple and effective.

Games are all about illusion, so if the illusion holds up, then its a winner.

May I include it into the resource with proper credits to you?
#17
08/27/2005 (2:53 am)
Sure, that would be awsome if you included it into your resource.

I believed I got all the bugs worked out of it, but if you notice anything feel free to tell me and I can fix it or you can fix it yourself. I've put it through all the tests I could think of so it should be bug free... but you never know...
#18
09/15/2005 (5:59 am)
Ward - I can't find a public email address for you. Can you please email me at chrislabombard[AT]hotmail[DOT}com.
#19
01/23/2006 (7:04 am)
Hey War I read somewhere you and your developer came up with some sort of a fix for the objectviewer and its problems with properly mounting wheels. I was hoping you might share it with us.
#20
03/04/2006 (1:42 pm)
Ward - can I get on your beta test list? I love driving games...ddunlap@3dlanguage.net