1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Networking Question

Discussion in 'Programming' started by squirrelah, Nov 10, 2019.

  1. squirrelah

    squirrelah Member

    Joined:
    Mar 30, 2018
    Posts:
    30
    So i've been learning about networking for one of my game and ive been wondering if i would need to program the game with a dedicated server in mind, or if i can just have one of the players host.
    Without going into too much detail, but enough to hopefully be able to get an answer about whether i need to have dedicated servers here is the type of game.

    2-4 players.
    One player has many things they can do that affect the game world, the other players have a much more limited scope on what they can effect. It is going to be a real time game, akin to a platformer, but with more going on in terms of game logic than a platformer.

    I was thinking if i just make the player that can affect a lot in the game world the host, it would be best as they would have the best connection(being they are the host), so any changes to the map they make would take place quicker.

    I am very new to networking, and don't know much outside the basics(you create a server, have people connect to it, and send the data back and forth through buffers is about all i know).

    Also are there any benefits to having a hosted server vs a dedicated server outside of basically having to pay to keep servers up all the time?
     
  2. TailBit

    TailBit Member

    Joined:
    Oct 16, 2019
    Posts:
    62
    If you have a server up there with an address the game knows (even if you just buy an address to forward them to a computer at home), then the game can use it to connect others more easily, basically a game lobby .. guess you could use a website for it too? (have not tried that) .. but ofc, you could also have it hold the game world instead.

    If I host a minecraft game, that does not make me the one with the best connection .. I could even be causing all the other major lag for the ones connected if I had low bandwidth limit .. so no, this isn't quite how it works.

    I have not tried to build a connection that would swap host for all users based on lag .. sounds interesting.

    So the difference between would be that you don't have to share IP with buddies to have them connect..
     

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