English Tibia causing connection issues

11 replies
Goto Page
To the start Previous 1 Next To the start
Up
Masea
Super User
Offline Off
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
23.01.17 11:42:28 am
Up
Yates
Reviewer
Offline Off
Sounds like a process keeps running client side and never stops causing an overload.

What did you edit exactly?
23.01.17 11:50:25 am
Up
Masea
Super User
Offline Off
@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.
23.01.17 11:55:05 am
Up
Hajt
User
Offline Off
I bet something is wrong with HUDs. user xNir had similar issue, hudtxt sometimes cause client timeout.
23.01.17 12:02:25 pm
Up
Masea
Super User
Offline Off
@user Hajt: So what you do want to make me is remove it from ms100 and distribute where it needs to be trigger?
23.01.17 12:03:58 pm
Up
Yates
Reviewer
Offline Off
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.
23.01.17 08:18:23 pm
Up
Masea
Super User
Offline Off
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.
23.01.17 08:24:01 pm
Up
Yates
Reviewer
Offline Off
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.
23.01.17 10:16:40 pm
Up
DC
Admin
Offline Off
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
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
24.01.17 12:35:13 am
Up
_Yank
User
Offline Off
@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.
24.01.17 12:48:13 am
Up
Masea
Super User
Offline Off
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.
24.01.17 06:51:37 am
Up
Gaios
Security Supporter
Offline Off
It's weird that some players can join and some can't. Basically I can join the server and don't have any lags.
To the start Previous 1 Next To the start