OutdatedMulti-Threaded Ping Checker

Posts 1630 of 36 · Page 2 of 3
Quote Originally Posted by 059 View Post
@Maik8 I have a suggestion, maybe optional, but you could have it repeatedly scan, 10 times or so (a customizable amount even), and then average all the times. That way you can get a more accurate ping.
Quote Originally Posted by MrVirtual View Post
I do know that my ping changes constantly, is there a way to make it auto refresh constantly other than just clicking the button at the bottom? Also thanks amazing work.
@059
@MrVirtual

I updated the minimal version to be able to scan repeatedly, to make a customizable amount of pings and to show the results as minimal, average or maximum.
You can find the new version here: https://www.mpgh.net/forum/showthread.php?t=1446146
Hope you like the changes, did it in a rush tho - that's why the UI seems a bit slow at some points - , since i have not much time currently (reason i only updated the minimal version for now).
Thanks for the credit. Although this would be better if it were platform independent. I know not a lot of people play on mac but its still good to cover all the bases

Nice release nonetheless
Yeah i know what you mean but since i made this in C# .Net (Windows Forms) it is not going to work on a mac. Have Never done something for a mac tho.
If i find a quick and easy way without re-doing that whole thing i let you know.

Btw. How do you ping the servers in your tool?
Quote Originally Posted by Maik8 View Post
Yeah i know what you mean but since i made this in C# .Net (Windows Forms) it is not going to work on a mac. Have Never done something for a mac tho.
If i find a quick and easy way without re-doing that whole thing i let you know.

Btw. How do you ping the servers in your tool?
EC2 has an api for pinging their boxes: https://ec2.[region].amazonaws.com/ping

My implementation is
Code:
public static long getPingTime(String addr) {
		long start = 0;
		start = System.currentTimeMillis();
		//See how long it takes for us to get a response from AWS for this server
		try {
			Jsoup.connect("https://ec2." + addr + ".amazonaws.com/ping").get();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		long end = (System.currentTimeMillis() - start);
		return end;

	}
I guess the difference is youre seeing how quickly you can connect a socket to the server while im seeing how long it takes for the server to respond to my request.
Quote Originally Posted by Maik8 View Post
If i find a quick and easy way without re-doing that whole thing i let you know.
C# is very syntactically similiar to java but you would have a helluva time recreating that GUI. Graphics in Java are horrid
Im not sure which is a beter metric, the time it takes to receive a response from the server or the time it takes to establish a valid connection via sockets. Thoughts?

BTW: impl multi threading on mine
Code:
Starting RotMG ping finder - Ruusey
Future result is : 332
Future result is : 1084
Future result is : 337
Future result is : 342
Future result is : 343
Future result is : 343
Future result is : 758
Future result is : 463
Future result is : 333
Future result is : 505
Future result is : 459
Future result is : 342
Future result is : 495
Future result is : 189
Future result is : 506
Future result is : 342
Future result is : 342
Future result is : 340
Future result is : 188
Future result is : 528
Future result is : 1256
Future result is : 535
Future result is : 358
Total runtime [1261]ms
Quote Originally Posted by ruusey View Post
Im not sure which is a beter metric, the time it takes to receive a response from the server or the time it takes to establish a valid connection via sockets. Thoughts?
I did a test with my vServer, wrote a simple TCpListener wich will accept the incomming request and came to the result that the time needed for that is equal to the ping i get from the server (used the cmd to ping it, as well as the acctual .NET ping Methode).
I am sure a normal ping is the cleaner way to go of course, but in this case i don't see anything wrong with using sockets.


Quote Originally Posted by ruusey View Post
BTW: impl multi threading on mine
Code:
Starting RotMG ping finder - Ruusey
Future result is : 332
Future result is : 1084
Future result is : 337
Future result is : 342
Future result is : 343
Future result is : 343
Future result is : 758
Future result is : 463
Future result is : 333
Future result is : 505
Future result is : 459
Future result is : 342
Future result is : 495
Future result is : 189
Future result is : 506
Future result is : 342
Future result is : 342
Future result is : 340
Future result is : 188
Future result is : 528
Future result is : 1256
Future result is : 535
Future result is : 358
Total runtime [1261]ms
Sweet, don't know how hard it is in Java, but nicely done!
Would have a suggestion tho: sort the list before printing it (if possible), that way it would be much more clear wich servers are a valid option to play on without searching throught that whole list.
Also is there a way you could make it executable by clicking on it? I mean many users (here) do not realy know how to use a command prompt / powershell. That would increase your userbase.

Btw. just thought about making the whole thing as an App in Xamarin Forms but i don't seem to get the HyperV turned off (would need to disable the device gurad of my win10, wich is not that easy and the way that msdn describs it is not working (the script the provide does nothing but deliver errors).
So i started to make a game in unity with a friend of mine (Co-worker (trainee) acctually) some time ago, i have the basic concept of the server - client communication done with a simple test. (64 tick based server and client). But as you may know creating a game is not just done in a week time, maybe you are interested in joining us? You seem to be a friendly dude.

Just to be clear, this is not my first game but i never released one yet, although i have one on google play in closed alpha version.
Quote Originally Posted by Maik8 View Post
Just to be clear, this is not my first game but i never released one yet, although i have one on google play in closed alpha version
Very cool! I’m personally working on a Java based rotmg like game using LWJGL and OpenGL. It’s fun to learn and great experience. Might consider making it the front end for rotmg or it’s game.
Quote Originally Posted by ruusey View Post

Very cool! I’m personally working on a Java based rotmg like game using LWJGL and OpenGL. It’s fun to learn and great experience. Might consider making it the front end for rotmg or it’s game.
Sweet, i once started working on a 3D version of ROTMG, got some of the basics done in no time, but since i am not a good 3D-Artist and the guy i am normaly working with had no time all of a sudden (personal reasons, so no judge here), i stoped working on it.

That is what i have done, stats, and combat system are working, i could even add new weapons without writing a single line of code tho, same with enemys (except advanced once of course).
programs working perfect here
Is this useful tho?
Thanks works great!
keep it up dude
ТАкое не пригодится
Quote Originally Posted by OnePaule View Post
ТАкое не пригодится
It is usefull as you can check your ping latency to the servers and decide wich you want to play on to avoid lags and dying due to them.
Posts 1630 of 36 · Page 2 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?