Networking newbie

Discussion in 'Programming' started by xenopod, Jul 10, 2018.

  1. xenopod

    xenopod Member

    Joined:
    Jul 10, 2018
    Posts:
    1
    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.
     
  2. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,454
    Network = not easy. The words "easy", "simple". Must not be used in the same sentence as "network"
     
  3. Humayun

    Humayun Member

    Joined:
    Jun 20, 2016
    Posts:
    89
    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: Jul 10, 2018
  4. Pfap

    Pfap Member

    Joined:
    Apr 30, 2017
    Posts:
    338
    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.
     
  5. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,454
    AAHHHHHHHHHHHHHHhhhhhhh, my eyes, MY EYES!!!
     
  6. Nabil Kabour

    Nabil Kabour Member

    Joined:
    Aug 6, 2018
    Posts:
    88
    I followed Heartbeast's tutorial and was wondering how would I go about making that project work over the internet? Thanks.
     
  7. TheTwistedMan

    TheTwistedMan Member

    Joined:
    Sep 3, 2018
    Posts:
    61
    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! ;)
     
  8. Nabil Kabour

    Nabil Kabour Member

    Joined:
    Aug 6, 2018
    Posts:
    88
    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).
     
  9. TheTwistedMan

    TheTwistedMan Member

    Joined:
    Sep 3, 2018
    Posts:
    61
    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: Dec 6, 2018

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice