Networking newbie

X

xenopod

Guest
Hi guys, I want to do a little project and cannot see where to begin to be honest, here is what I would like to do,

ping a pc on a network every five mins and place a sprite on screen if a ping is true and the pc is visible, this is my ideal scenario

or

create a server program and when a client program connects to it a sprite for example a box turns green,

I know this is probably very easy but I am really new to networking with gamemaker and trying to figure out the basics.

an example program or code would be brilliant.
 

Humayun

Member
Well networking is both easy and hard but it depends upon scope you are targeting, networking is easy when you set your scope to local then networking just becomes matter of sending data from one side and retrieving data on other side but as you expand your scope you face many problems including delay, packet loss, hole punching e.t.c.

I'll suggest you to set your scope to local TCP and start with a video tutorial, like this one
,
Read YoYo games article https://help.yoyogames.com/hc/en-us/articles/216754698-Networking-Overview , take a look at networking demo in GMS and create a small game. Then start expanding your scope and learn about UDP and so on.
 
Last edited:

Pfap

Member
I think my 8 year old brother goes around barefoot half the time, because tying his shoes isn't easy for him... I think most people can relate if they remember being 6 and learning how to tie their shoes, lol. Anyways I love a good analogy, but I would recommend getting a raspberry pi or some other Linux system and setting up some open source server like apache or nginx. Also, other forums and communities may offer more specific help. The raspberry pi website has a thorough tutorial on setting up a web server, maybe start there. It can be a frustrating process though.
 
Well networking is both easy and hard but it depends upon scope you are targeting, networking is easy when you set your scope to local then networking just becomes matter of sending data from one side and retrieving data on other side but as you expand your scope you face many problems including delay, packet loss, hole punching e.t.c.

I'll suggest you to set your scope to local TCP and start with a video tutorial, like this one
,
Read YoYo games article https://help.yoyogames.com/hc/en-us/articles/216754698-Networking-Overview , take a look at networking demo in GMS and create a small game. Then start expanding your scope and learn about UDP and so on.
I followed Heartbeast's tutorial and was wondering how would I go about making that project work over the internet? Thanks.
 
T

TheTwistedMan

Guest
I followed Heartbeast's tutorial and was wondering how would I go about making that project work over the internet? Thanks.
Hey! I'm working on a multiplayer game and you can make it work on the internet with Hamachi, though I don't know yet how to get the server working on the internet without it so anyone can connect, hope it helps! ;)
 
Hey! I'm working on a multiplayer game and you can make it work on the internet with Hamachi, though I don't know yet how to get the server working on the internet without it so anyone can connect, hope it helps! ;)
Apparently it works over the internet as it, all you need to do is port forward. I tested it using my public IP and it worked. (on the same pc though, but shouldn't matter).
 
T

TheTwistedMan

Guest
Apparently it works over the internet as it, all you need to do is port forward. I tested it using my public IP and it worked. (on the same pc though, but shouldn't matter).
You just have to open the ports and you can play it over the internet? that's sick! I'd like to try it out.
Are you sure that you used the public ip inside the client and not your local IP? Sometimes being in the same home network gets some networking things easily done
 
Last edited by a moderator:
Top