Bitstream Assistance please
by Ronald J Nelson · in Torque Game Engine Advanced · 06/29/2008 (9:55 pm) · 8 replies
I have been doing multiplayer tests again and have run into an issue where I am getting a lot of lag with those that join and alot of the data is not transferring properly. I have gone over my code and script countless times and have yet to find the issue.
I wanted to see if there was someway to add a call out somewhere that would point me in the direction of whatever is overloading the bitstream?
I wanted to see if there was someway to add a call out somewhere that would point me in the direction of whatever is overloading the bitstream?
#2
06/29/2008 (11:39 pm)
Thanks Peter but yes I have done that already. I have gone through and severely optimized my code but apparently there is still something holding me back.
#3
Your description is very vague so it's difficult to help you. Specifically:
"Properly"? Do you get packet errors? Randomly or always on the same type of object? Or do you get into the game but with incorrect simulation? Huge difference.
For players joining, or for players already ingame? Both? If the former, does the lag end when you reach inside the mission, after the loading process has finished?
06/30/2008 (2:19 am)
Hi Ron,Your description is very vague so it's difficult to help you. Specifically:
Quote:
alot of the data is not transferring properly.
"Properly"? Do you get packet errors? Randomly or always on the same type of object? Or do you get into the game but with incorrect simulation? Huge difference.
Quote:
I am getting a lot of lag with those that join
For players joining, or for players already ingame? Both? If the former, does the lag end when you reach inside the mission, after the loading process has finished?
#4
What is the "ping" between the client and server?
Do you have any packet loss statistics?
06/30/2008 (3:37 am)
What kind of computers are involved (client and server) as well as what kind of Internet connections do they have? What is the "ping" between the client and server?
Do you have any packet loss statistics?
#5
Some of the data loss is for example, I have my Updated Terrain Deformation resource installed, it worked fine in single player and even worked flawlessly back in January with no code changes to it. Now the data is not updating the terrain updates properly as if it is always a few steps behind where it should be. What I mean is that if you do multiple deformations what the client that joins the game see is always a deformation or two behind what the client that hosted the game sees.
If the client that joins the game is mounted to a vehicle the lag is intense, but the client that hosted sees everything as if normal.
Don't just focus on those two, they are just two examples of what I am seeing, there are several more with particle emitters, weapon fire and so on.
The ping between the client and the server is very (around 10 and lower) but I am hosting on a private LAN so that is why.
Now I had tried the same tests with my backup version from January, all pass and it looks fine. However there have been a lot of updates since then. That is why I am hoping there is something that can just call out the areas that are causing the issue. By the way the LAN isn't the issue, it happens outside the LAN too.
06/30/2008 (4:48 am)
OK. I have no extra data because I have no debug failures at all or anything in the console log that declares a failure.Some of the data loss is for example, I have my Updated Terrain Deformation resource installed, it worked fine in single player and even worked flawlessly back in January with no code changes to it. Now the data is not updating the terrain updates properly as if it is always a few steps behind where it should be. What I mean is that if you do multiple deformations what the client that joins the game see is always a deformation or two behind what the client that hosted the game sees.
If the client that joins the game is mounted to a vehicle the lag is intense, but the client that hosted sees everything as if normal.
Don't just focus on those two, they are just two examples of what I am seeing, there are several more with particle emitters, weapon fire and so on.
The ping between the client and the server is very (around 10 and lower) but I am hosting on a private LAN so that is why.
Now I had tried the same tests with my backup version from January, all pass and it looks fine. However there have been a lot of updates since then. That is why I am hoping there is something that can just call out the areas that are causing the issue. By the way the LAN isn't the issue, it happens outside the LAN too.
#6
So apparently my problem is created by a failure in ghosting. I have no idea what could do it because I actually reverted my player and vehicle code back to stock TGEA for the sake of testing, it did not help at all.
What confuses me is if it is not caused by my code, what else can do this?
07/01/2008 (9:22 pm)
OK now I have some interesting results that give me a bit more to go on or maybe someone can help me easier. I completely removed the Menu Mission Resource from my game. Now I figured out that it was loading the Menu Mission everytime you would host or join a game. This actually fooled me for bit because it made it seem like the ghosting system was actually working, but what was really happening was I was actually getting everything from the mission menu server running in the background. So apparently my problem is created by a failure in ghosting. I have no idea what could do it because I actually reverted my player and vehicle code back to stock TGEA for the sake of testing, it did not help at all.
What confuses me is if it is not caused by my code, what else can do this?
#7
You should also try running with the TORQUE_DEBUG_NET #define enabled, that adds extra networking debugging. (See torqueConfig.h.) And of course if you're not running a debug build you definitely want to do that, too.
If you can identify the source of the problem in more detail (ie, some objects aren't ghosting ever, network data is being lost or corrupted, or something else) you could do more focused debugging, add log statements, and start poring over the output to find the problem. It's still very vague what's going wrong - could be any number of source issues, from memory corruption on down to an obscure bug in Torque.
Worst case you'll want to take a stock version of Torque and add functionality step by step till everything either works or the problem reproduces itself.
07/02/2008 (11:43 am)
You might want to check out Ed Maurina's new book, as it goes through the Torque startup sequence in some detail. It sounds like your app is maybe failing to do one of the startup steps that the networking requires.You should also try running with the TORQUE_DEBUG_NET #define enabled, that adds extra networking debugging. (See torqueConfig.h.) And of course if you're not running a debug build you definitely want to do that, too.
If you can identify the source of the problem in more detail (ie, some objects aren't ghosting ever, network data is being lost or corrupted, or something else) you could do more focused debugging, add log statements, and start poring over the output to find the problem. It's still very vague what's going wrong - could be any number of source issues, from memory corruption on down to an obscure bug in Torque.
Worst case you'll want to take a stock version of Torque and add functionality step by step till everything either works or the problem reproduces itself.
#8
07/02/2008 (2:11 pm)
Thanks Ben. Your always a big help. I didn't even think about the DEBUG thing and yes I agree with you about the startup steps since I have actually gone back and made my code pretty much stock other than a couple of bug fixes posted here in the forums and still get the same result. It tends to make me believe that this is something I have messed up in the scripts.
Torque 3D Owner Peter Simard
Default Studio Name
How many clients are connected? How fast is the server's connection?