Forum

> > CS2D > Servers > Tibia causing connection issues
Forums overviewCS2D overview Servers overviewLog in to reply

English Tibia causing connection issues

11 replies
To the start Previous 1 Next To the start

old Tibia causing connection issues

Masea
Super User Off Offline

Quote
Hello guys.

Yo all know, we've created a new community which means we need to open servers for it. We've totally 2 servers at the moment, one is Tibia(a bit edited). However, whenever someone tries to play it, after random minutes, he needs to type 'retry' in console due to in this time he can't do anything. He gets lags, I mean. Even some people can't join server. Is Tibia that really expensive mod to open it as server? Or are there any problems which I'm doing wrong?

Sorry if any thread like this already opened but I really can't search 40+ page.

Thanks in advance.

Admin/mod comment

"Server Lags" is not properly describing the actual issue. Adjusted that /DC

old Re: Tibia causing connection issues

Masea
Super User Off Offline

Quote
@user Yates: Added new hud, monsters, items, NPCs. Changed the MAXMONSTERS parameter to 70. It actually seems like it happens when someone joins to the server instead of after random minutes. One more thing I changed, is added more hudtxts to updateHUD which triggers in ms100 hook now. Can't believe that since CS:GO server doesn't have any issues like this even if it is more advanced mod.

old Re: Tibia causing connection issues

Yates
Reviewer Off Offline

Quote
Ah the hud issue. Had the same problem, so I removed them all and made things visual instead (health bar etc).

I was never able to solve it.

old Re: Tibia causing connection issues

Masea
Super User Off Offline

Quote
This is shit then. So why the fuck DC added this command into game if it would cause lag? This can't be about hudtxts. Help me.

old Re: Tibia causing connection issues

Yates
Reviewer Off Offline

Quote
It's an issue with Tibia. For some reason a certain variable used within a hud caused the player to lose connection.

I debugged the crap out of it and spent days trying to find out what was wrong, I couldn't find it. The only options were to rebuild everything that utilized the Tibia player variables or not use the extra huds.

If I remember correctly it was the hud which displayed the player health that fucked everything up. But don't take my word for it, it was very long ago.

old Re: Tibia causing connection issues

DC
Admin Off Offline

Quote
It's possible that heavy scripting which involves a lot of network traffic can break the connection if a lot of stuff is done in one single frame.

That's mainly because CS2D's networking library is quite basic and low level and doesn't have proper automatic packet fragmentation. I assume that what's happening is that the UDP packet MTU (just 1 kb for some devices) is exceeded by sending many long HUD texts in the same frame.

So it might actually be a bug in CS2D. What I should do is sending each HUD text in a separate UDP packet but this fragmentation seems to miss. Instead all HUD texts are packed into one package (if they are sent in the same frame and to the same player). I'll add the fragmentation for the next update which might fix the issue.

For now the fix might be to somehow cache the HUD text calls and to execute them over multiple frames instead of doing them all at once.

This all is just an assumption however. Can't guarantee that this will really fix the issue.
edited 1×, last 23.01.17 10:30:39 pm

old Re: Tibia causing connection issues

_Yank
User Off Offline

Quote
@user DC I confirm this, used to happen on my super hero reborn script, whenever it rendered an hudtxt2 30 or more times (for example) at once / on a single frame, the player would suddenly disconnect and timeout from the server.

Your best bet is to optimize the hudtxts to only be updated / drawn when really needed.

old Re: Tibia causing connection issues

Masea
Super User Off Offline

Quote
user _Yank has written
Your best bet is to optimize the hudtxts to only be updated / drawn when really needed.
Did it. Even if it decreased the issue, didn't remove completely.

I know that someone was using this edited version before on his server which even has 15+ players as always and surprisingly, it hadn't any issues like mine(ours). This is why I still doubt that is about hudtxts.
To the start Previous 1 Next To the start
Log in to reply Servers overviewCS2D overviewForums overview