| Mirage Source http://www.miragesource.net/forums/ |
|
| The Ping Tutorial http://www.miragesource.net/forums/viewtopic.php?f=201&t=2318 |
Page 1 of 3 |
| Author: | William [ Sat Jul 21, 2007 2:11 pm ] |
| Post subject: | The Ping Tutorial |
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 ![]() Bottom right corner. |
|
| Author: | Robin [ Sat Jul 21, 2007 2:16 pm ] |
| Post subject: | Re: The Ping Tutorial |
Ouch. 100 ping on the network? :\ |
|
| Author: | William [ Sat Jul 21, 2007 2:19 pm ] |
| Post subject: | Re: The Ping Tutorial |
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* |
|
| Author: | Robin [ Sat Jul 21, 2007 2:22 pm ] |
| Post subject: | Re: The Ping Tutorial |
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. |
|
| Author: | William [ Sat Jul 21, 2007 2:23 pm ] |
| Post subject: | Re: The Ping Tutorial |
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. |
|
| Author: | Robin [ Sat Jul 21, 2007 2:25 pm ] |
| Post subject: | Re: The Ping Tutorial |
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. |
|
| Author: | William [ Sat Jul 21, 2007 2:34 pm ] |
| Post subject: | Re: The Ping Tutorial |
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. |
|
| Author: | William [ Sat Jul 21, 2007 2:40 pm ] |
| Post subject: | Re: The Ping Tutorial |
Also, I think I should mention that I have Seamless maps in the game. So that might be the reason too. So its not just this tiny map thats in action. |
|
| Author: | Dragoons Master [ Sat Jul 21, 2007 2:46 pm ] |
| Post subject: | Re: The Ping Tutorial |
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... |
|
| Author: | Robin [ Sat Jul 21, 2007 2:54 pm ] |
| Post subject: | Re: The Ping Tutorial |
So people shouldn't be receiving other player and npc movement? xD! |
|
| Author: | William [ Sat Jul 21, 2007 3:18 pm ] |
| Post subject: | Re: The Ping Tutorial |
Only the default things are being sent, I havnt added anything that would send over and over again. |
|
| Author: | Dragoons Master [ Sat Jul 21, 2007 3:24 pm ] |
| Post subject: | Re: The Ping Tutorial |
Player HP, MP, SP are sent time to time by default, don't do that, that's a fix for MSE2... |
|
| Author: | Verrigan [ Sat Jul 21, 2007 3:46 pm ] |
| Post subject: | Re: The Ping Tutorial |
Okay... Standard Winsock control, or another form of Winsock usage? The reason I ask is.. Winsock control buffers for 100 ms and then sends what's in the buffer to where it needs to go.. As Spodi pointed out countless times, it is called 'Nagling' which can be overcome (still using the winsock control) by calling some API functions to turn this off, which can decrease your ping time if you handle your packets properly.. Anyways.. Was just curious. |
|
| Page 1 of 3 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|