Mirage Engine
The Ping Tutorial - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: The Ping Tutorial (/showthread.php?tid=1121)



The Ping Tutorial - William - 21-07-2007

I added this into my game: viewtopic.php?f=75&t=791

Now I want to compare my ping to others, cause I dont know if its good or bad Tongue It doesnt look like its very good, its mostly on around 90, but sometimes drops to 40 and then go above 100 some times.

[Image: pingwl7.png]
Bottom right corner.


Re: The Ping Tutorial - Robin - 21-07-2007

Ouch. 100 ping on the network? :\


Re: The Ping Tutorial - William - 21-07-2007

I have the same on both my external and internal IP =/ And it kinda always goes to the same numbers =/... there most be something wrong with the ping system.. *starts digging in the code*


Re: The Ping Tutorial - Robin - 21-07-2007

There really isn't.

And a ping should be at the same numbers.

I only get 100 ping on foreign servers though, so either your server us spurting out thousands of packets, or something is wrong with your computer.


Re: The Ping Tutorial - William - 21-07-2007

So I never actually looked at the GAMEFPS thing. And decided to remove it to see what would happen. Well what happened was that my movement because so smooth I almost pied myself. And the Ping rise a lot =/

Code:
' Lock fps
        Do While GetTickCount < Tick + 50
            DoEvents
        Loop
        
        ' Calculate fps
        If GetTickCount > TickFPS + 1000 Then
            GameFPS = FPS
            TickFPS = GetTickCount
            FPS = 0
        Else
            FPS = FPS + 1
        End If
I know the lock is for slow computers, but I will lower the 50 value to 20 or something.


Re: The Ping Tutorial - Robin - 21-07-2007

You removed all that?

If so, you've uncapped your FPS and the only thing keeping it low is that you have some much stuff being blted on screen constantly.

Also, to smooth your movement change that 50 to 25.

Oh, and the reason your ping rises so much is because you're sending and receiving packets a lot faster.


Re: The Ping Tutorial - William - 21-07-2007

Yeah, Ill change it to something like that. Still I dont know why the ping are like it is.

Edit: The ping is around 40 now, so thats a little better. I tried running 2 games to compare the values and they were mostly the same.


Re: The Ping Tutorial - William - 21-07-2007

Also, I think I should mention that I have Seamless maps in the game. So that might be the reason too. Tongue Forgot about that.
So its not just this tiny map thats in action.


Re: The Ping Tutorial - Dragoons Master - 21-07-2007

Make sure there is no packet being sent to you if you are alone and stopped not moving doing nothing. If there is, then the code sux, sry.
You can't have any packet like... HP, MP, SP being sent all the time, you need to update that client side only when it changes server side.
That's the reason I used to get so low pings, now they are all around 10-20, that's a good one!
EDIT: Alone on the server too...


Re: The Ping Tutorial - Robin - 21-07-2007

So people shouldn't be receiving other player and npc movement? xD!


Re: The Ping Tutorial - William - 21-07-2007

Only the default things are being sent, I havnt added anything that would send over and over again.


Re: The Ping Tutorial - Dragoons Master - 21-07-2007

Player HP, MP, SP are sent time to time by default, don't do that, that's a fix for MSE2...