Network frustrations
by Michael Bacon · in Torque Game Engine · 10/31/2007 (5:41 am) · 1 replies
I'm a complete n00b when it comes to networking, especially within a gaming environment. Don't get me wrong, I've played my share of WarCraft (I,II,III), Quake III, RtCW, etc. But programming for networked play is something entirely new to me.
So first off can you guys point me to some informational resources? I've read what I could off the TDN and what I could find here but the searching facilities here leave much to be desired (what a shame in this day and age). I've probably overlooked alot of information.
Now in particular the whole thing in the player code about warp ticks and catching up to the server eludes me. I understand the concept. I've played MMOGs. When I lag out, I keep running however I want, but when the server catches up, it warps me back to where it thinks I should be (which usually means I ran in a straight line right into a hoard of monsters or off a cliff).
Finally, I again understand what client side prediction is, but I'm not at all sure how to implement it.
I finally found a post where somebody mentioned that the Transform was the server info and RenderTransform was the client info. This helped alot (while my description is not entire accurate, it gets the point across in one sentance). I was able to track down and kill all my jitter bugs with riding on platforms (or any GameBase for that matter).
Now my problem comes when I lag. Scenario: I'm riding on a block, smooth as can be. I open the console and the blocks jitter for a split second while the engine thinks about opening the console. Everything is still running but since its not updating as much (because the console is presumably eating up cycles thinking about stuff while opening (for the first time in a session, I should add)) the frame rate drops and jitter occurs.
The code is based on PathShape from the Riding on Platforms thread. Most likely it isn't altered much but I've done extensive rework of the system to removing the jittering and make it much much easier to implement. PathShape is obviously based on PathCamera which is probably plagued by the same issues but I don't have the resources right now to test it.
I remember reading somewhere that there was a way to emulate lag. I can't find this information again. It might help me track my problems down. Barring that, is there any way to emulate "local lag"? By this I mean the situation I described above where frame rate drops due to background tasks. I would just making some insane background process to eat cycles but I'm hoping there is a better way.
So first off can you guys point me to some informational resources? I've read what I could off the TDN and what I could find here but the searching facilities here leave much to be desired (what a shame in this day and age). I've probably overlooked alot of information.
Now in particular the whole thing in the player code about warp ticks and catching up to the server eludes me. I understand the concept. I've played MMOGs. When I lag out, I keep running however I want, but when the server catches up, it warps me back to where it thinks I should be (which usually means I ran in a straight line right into a hoard of monsters or off a cliff).
Finally, I again understand what client side prediction is, but I'm not at all sure how to implement it.
I finally found a post where somebody mentioned that the Transform was the server info and RenderTransform was the client info. This helped alot (while my description is not entire accurate, it gets the point across in one sentance). I was able to track down and kill all my jitter bugs with riding on platforms (or any GameBase for that matter).
Now my problem comes when I lag. Scenario: I'm riding on a block, smooth as can be. I open the console and the blocks jitter for a split second while the engine thinks about opening the console. Everything is still running but since its not updating as much (because the console is presumably eating up cycles thinking about stuff while opening (for the first time in a session, I should add)) the frame rate drops and jitter occurs.
The code is based on PathShape from the Riding on Platforms thread. Most likely it isn't altered much but I've done extensive rework of the system to removing the jittering and make it much much easier to implement. PathShape is obviously based on PathCamera which is probably plagued by the same issues but I don't have the resources right now to test it.
I remember reading somewhere that there was a way to emulate lag. I can't find this information again. It might help me track my problems down. Barring that, is there any way to emulate "local lag"? By this I mean the situation I described above where frame rate drops due to background tasks. I would just making some insane background process to eat cycles but I'm hoping there is a better way.
Torque Owner Brian Wilson