• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows [Resolved] Running networked game through a remote desktop

C

Carcophan

Guest
Hello everyone!

Happy New Year to all.

So... it is a new year - a new project - a new set of questions.

I have a small simple shooter game made from a set of youtube tutorials, which is running well when it uses my own internal-networking.

It uses a server/client set up and points to 127.0.0.1 and port 9000 for example. The game runs and plays well when I run the server, and clients on my one machine. Both the server and client are in one set of code, and respond as expected. (Buttons to choose - click "make server" first, then load a second/third/etc exe and load it is a client).

I then uploaded this to a Windows based Remote Desktop environment on a VPS server provided by Liquid Web. I have an IP address there, 209.x.x.x. I change to the new IP address in the code and recompile and upload and install it on the remote desktop/liquid server... the game runs ON the server when I run it in both server and client mode, same as it did on MY machine with a 127 address - but I cannot get my pc to connect to the new 209 IP on that remote desktop.

Not sure how well I am explaining this. I am new to the networking side of things.


Basically, my end goal, is to get this windows exe file on MY machine, to connect to a separate windows exe file on YOUR machine - where they both go through the windows exe file on the remote server that uses the 209 IP address (instead of the 127 because that is local to an individuals own PC).


Any direction/thoughts? Haven't found a lot of support for this online yet, I am not asking the right questions.

All I am really doing is changing this one line:
client_connect("127.0.0.1", 9000, async_load[? "result"]);
with a new IP. No?
 
C

Carcophan

Guest
I should also note that it looks like this tutorial is over 3 years old and was written in/for GMS1.4. I've only ever used 2.0+ and have already run into multiple instances where I've had to update the code from the youtuber to work with 2.0, so there may be something in there somewhere. Maybe? Or is networking not that different now? I know async can be hit or miss. I think everything is set up for TCP too, if that matters.



I've found a lot of videos for client/server set up, networking, buffers, etc, but I haven't found a good tutorial for how to use remote desktop/server and client on local machines. Does anyone have anything useful to watch, and recommend?
 

FrostyCat

Redemption Seeker
Start by opening the port to listen on in the VPS. Your provider has these instructions.

Please, don't attempt networked games until you know how to administrate a basic network --- basic network topologies, DHCP, port forwarding, opening ports in a firewall, etc. There are no specific tutorials for your use case because this is prerequisite material that network game tutorial authors can reasonably demand of their audience.
 
Start by opening the port to listen on in the VPS. Your provider has these instructions.

Please, don't attempt networked games until you know how to administrate a basic network --- basic network topologies, DHCP, port forwarding, opening ports in a firewall, etc. There are no specific tutorials for your use case because this is prerequisite material that network game tutorial authors can reasonably demand of their audience.
Yes. These are core-concepts in I.T. that you must have at least a rudimentary understanding of if you hope to develop a networked game.

If you don't speak the language, here are a few links which will help you get started down the right path.

https://www.geeksforgeeks.org/computer-network-tutorials/
https://www.google.com/search?client=firefox-b-1-d&q=networking+tutorials
http://w3schools.sinsixx.com/tcpip/tcpip_intro.asp.htm

I don't know where you are in your life or your career, but if the opportunity to work in an entry level I.T. position comes up: that did wonders for me. Soaked up a lot of useful skills that way... but if I'm really stuck on something: I just ask my dad. Seriously. He's better with some of these concepts than I am. They haven't changed much over the years.
 
Last edited:
C

Carcophan

Guest
Thank you both for the input and the links, that looks like exactly what I needed. It isn't easy to find what you are looking for if you don't know how to ask the right questions.

this is prerequisite material that network game tutorial authors can reasonably demand of their audience
you must have at least a rudimentary understanding of
Kind of stings. But is the truth in some ways.

To be fair though, isn't that what I am trying to do now? Learn? And this applies to all things. Day one of GML has the prerequisite that you understand X first or a reasonable demand that you can do Y. This is just another step in the ladder.

All I know is I spent about 4-5 months learning GML and working up to a near-complete 1-player game. Super happy. Then I wake up and try to add 'Player 2', and learn that isn't quiet how things work. I had to burn it all down and start over from scratch and relearn everything and build the game FROM a 2-player perspective FIRST. I wouldn't say I wasted the 5 months, but wasn't like this is all laid out clearly for absolute beginners.

Not trying to argue, but felt the need to 'defend' myself.

Your help is greatly appreciated, thanks again! :)
 
Thank you both for the input and the links, that looks like exactly what I needed. It isn't easy to find what you are looking for if you don't know how to ask the right questions.

Kind of stings. But is the truth in some ways.

To be fair though, isn't that what I am trying to do now? Learn? And this applies to all things. Day one of GML has the prerequisite that you understand X first or a reasonable demand that you can do Y. This is just another step in the ladder.

All I know is I spent about 4-5 months learning GML and working up to a near-complete 1-player game. Super happy. Then I wake up and try to add 'Player 2', and learn that isn't quiet how things work. I had to burn it all down and start over from scratch and relearn everything and build the game FROM a 2-player perspective FIRST. I wouldn't say I wasted the 5 months, but wasn't like this is all laid out clearly for absolute beginners.

Not trying to argue, but felt the need to 'defend' myself.

Your help is greatly appreciated, thanks again! :)
Well, you could try going to marketplace.yoyogames.com and buying/selecting a multiplayer framework to use as a template. If you're good at applying knowledge, and read some of primer information from the links above (and the GMS2 DOCS) you might be able to figure it out on the fly, but please don't get upset with me if it doesn't work out in that way.

One last thing: go to yoyogames.com and navigate to the tech blog. There's a good written tutorial on networking there.
 
C

Carcophan

Guest
but please don't get upset with me if it doesn't work out in that way.
Who is upset? Lol.

I am ready, able and eager to learn.

But as an update, I closed out the topic as resolved.

I was able to get the port opened in the remote environment, and therefore was able to successfully test the networked connection between this PC and the one on the server. Thumbs Up!!
Was disappointingly easy, was just the port being opened there.
 
Top