Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Ping Tutorial
#1
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.
Reply
#2
Ouch. 100 ping on the network? :\
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#3
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*
Reply
#4
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.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#5
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.
Reply
#6
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.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#7
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.
Reply
#8
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.
Reply
#9
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...
Reply
#10
So people shouldn't be receiving other player and npc movement? xD!
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#11
Only the default things are being sent, I havnt added anything that would send over and over again.
Reply
#12
Player HP, MP, SP are sent time to time by default, don't do that, that's a fix for MSE2...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)