Lags on remote server

I’ve tested this in three different ways (each with its own weird results):

  • On a high-profile machine with 16 GB Ram, the client claimed 1 GB. No lags on that machine, but a computer in the same network (which should cause close to no lags) experienced stuttering and npc/other player freezes. Monster pc also could join game when hosted on mid-class notebook with no lags either.

  • Tried running the server on a dedicated machine. Two mid-class notebooks joined the game, both got freezes and lags.
    Clients claimed around 260-300 MB memory with the system still having plenty of memory to spare. (around 1 GB per system)

  • Joined local game on same PC as server; no lags at all, despite being the same PC with 4/6 GB.

  • The mid-class notebooks are Win10 and Win7, the monster-machine is Win10 as well.

  • Tested with good graphics card and weaker one, no change in results tho.

Any idea how this could be fixed?

What engine are you using?

If you unlock the CPS on the server, it shouldn’t lag that much

@randoyes Eclipse Engine 1.8.2
@solidlink Would love to try that, how do I do that?

Could u send me the client so i can see how badly it lags?

The problem may be on your network, have you got a good internet connection?

This post is deleted!

@randoyes It’s the same client as found in downloads!
@solidlink Another thing I didn’t see…

brb in a moment, running it on the dedicated machine to see if it’s still lagging

This post is deleted!

Yes, I saw after you mentioned it! In case it suddenly stops lagging, what’s CPS doing?

This post is deleted!

Okay, little update;

Running two clients on the same pc of course lagged, even if not as horrible as before.
The person I used to test with is kinda busy right now, here’s the server’s IP tho

77.92.78.30:7001

ill test

This post is deleted!

What is the internet speed of the server?
When you are on local it is much different than on the other IP.
Are lags movement based? If so then you might wanna change the outdated eclipse movement code.
Eclipse Engine 1.8.2 - Is this old engine or renewal?
Try checking the things above and do the speed test on the server.
Also provide the link of the engine so I can check the code If possible.
🙂

This post is deleted!

Tried connecting via LAN to a server in our network (to work around possible WLAN weakpoints). Worked flawlessly until other player in same network joined. Again, other player had no problems at all, even when my PC hosted the server … same network still.

Yes, Renewal!

EDIT: Had access to high speed internet today. No changes. It’s definitely not networking. Nor Ram, as even 4 GB seem to get it running just fine…

Some hope for you:

I had this issue on my pokemon game and one thing that I can say it that old and still used eclipse movement code is crap.
If you check robins CS source etc. you can find this simple code that is working great without using elapsedtime that is causing lags in most of the times when movement related.

What you should do is to go to the modGameLogic and search for Sub ProcessMovement
Now replace old Select case code with this one:

Select Case Player(Index).Moving
    Case MOVING_WALKING
        PlayerMovement(Index) = 1
        MovementSpeed = WALK_SPEED
    Case MOVING_RUNNING
        PlayerMovement(Index) = 2
        MovementSpeed = WALK_SPEED + ((GetPlayerStat(Index, Agility) + (Player(Index).Level / 25)) ^ 0.4)
    Case Else
        PlayerMovement(Index) = 0
        Exit Sub
End Select

When you are done with that go to modConstants and change the value of the WALK_SPEED to 4.
You can test the things by changing the value of it. Higher value results higher speed.
Should look like this:

Public Const WALK_SPEED As Byte = 4

Dont forget to backup your client project and src folder before this in case this is not the solution to your lags.
Hope this helps 🙂

Question 1: Why’s that fix not included in the current download :'D? It improved the game extremely…

Question 2: Why’d it improve the game this much?

Anyway, thank you, Coyote! 🙂

Because of the time difference between server and client. Some of the engines do have this fix.
It is not a problem until you make your game public on other server.
Anyway not a problem 🙂 I am glad it helped.

@coyote This is an extremely bad idea. This exists to ensure that the movement speed is frame-independent and based on time instead. Your solution will result in movement speed being directly tied to the FPS of the running client (i.e., slower FPS will result in slower movement, and faster FPS will result in faster movement).

Log in to reply