Custom Server

Posted by SaitoZero
First I need you to take look at this:
The server is kinda far away from my country so everytime I test the game I see lots of delay even though I'm logging in from the same computer.
So I wanna ask if Size wanna share the source for creating a custom server? I really like gms` algorithm, making syncing instances and variables an easy job, but with this delay, my fellow Vietnamese players wouldn't be able to enjoy my game.

Replies (12)

Last message on 11 May 2016

Size43 (Administrator) on 14 Mar 2016, 16:34:40
I can't open the link, facebook gives me an error.

Creating a custom server is not as easy as dropping an .exe file on a PC and running it, and it's impossible in the current server structure. The v3 version could use multiple servers, so I might set up another server somewhere in the either the US or Singapore which seem to be the closest locations to you.

v3 will also use UDP instead of TCP which should improve performance on high-latency/unstable connectinos.
Forgeio on 17 Mar 2016, 23:02:31
it would be amazing if you could set up a location in the US, because I get LOADS of delay here as well... maybe make it so that its really simple just to have a function in which you can switch the server your running on? then I could make it so the players could select which server to run depending on their country.
Size43 (Administrator) on 20 Mar 2016, 19:24:11
That would be the idea indeed. A simple switch to select either the US-based server or the Amsterdam-based server. Maybe even client sided, so that players can select the preferred region. Currently not possible, but will be possible when the rewrite is finished.
SaitoZero (Topicstarter) on 15 Mar 2016, 16:35:30 Try that link, it may work.
By the way I think the server has some function call Player to Player message, I haven't tried using it but does it sent information directly to the other player(s) without going through the server like a peer to peer connection? If it that's how it works then I guess I've found a solution to reduce high latency now. (I tried peer to peer connection and it requires one side (the host) to open a NAT port but you can't ask a random person to do complicated port forwarding shits just to play your game)
Size43 (Administrator) on 20 Mar 2016, 19:27:25
P2P messages still use the server to deliver the message to the other player, and it's unlikely GameMaker Server will ever support peer-to-peer connections. Setting up peer to peer is very tricky, because of NAT. There are methods for NAT punchthrough, but depending on what type of NAT you have, you may not be able to communicate with everyone else and it just becomes one big mess trying to figure that out.

You'll unfortunately have to wait on the rewrite for the performance improvements.
SaitoZero (Topicstarter) on 27 Mar 2016, 10:34:14
One last question, does it costs much to you for opening another server in Singapore or the US?
I like using free stuffs but I feel guilty somehow seeing you pay everything by your own, If I ever make any efforts with my game I would donate for sure but for now, I'm not.
Anyway looking forward to see the rewrite complete.
Size43 (Administrator) on 1 Apr 2016, 14:08:29
Right now I'd need about ~$30 a month. I'm not sure how much an additional server would cost, I've not looked into that.
amkgames on 3 Apr 2016, 07:29:16
Hey Size43, I have a request.
Please if you set up another server, choose singapore because it's close to India.
I get so much lag because India is so much far from Netherland and even from US...
Thanks! :)
Size43 (Administrator) on 8 Apr 2016, 13:40:05
Seems like Singapore would indeed be the best option for reducing ping times. The switch to UDP will also help a lot since one lost packet won't cause all other packets to wait for re-sending. (so that means less lag spikes)
amkgames on 8 Apr 2016, 13:47:05
Oh, Thanks! :D
amkgames on 3 Apr 2016, 07:14:02
Woah, that's so costly! I am thinking to give an option in my game, "Donate the server hoster to keep this game online." It would be good if people donate you. :)
Size43 (Administrator) on 11 May 2016, 10:24:44