1. #1
    The Patient Pnyx's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Denmark
    Posts
    212

    Making a game server

    Hi
    The last couple of weeks i've used almost all my free time creating my very own pc game. And i'd like to be able to set up a server so that i'm able to get some friends in and test it out with me.

    But my problem is, that i have absolutely no clue on how to do this, or even if it's possible.
    So i'd like it if some people in here could help me out with the things i need to know to get a server ready for my own game.

    I've searched around the web a bit, but without much luck, so any links to tutorials on how to do it is very welcome too

    Hope this is in the right forum.

  2. #2
    If you're a beginner in network programming I'd advise you start with building a much simpler system first to get the hang of encapsulating your data in packets. A good idea would be to build your own connection-oriented protocol based on UDP, which will allow you to understand how the Internet protocol suite allows for communication across networks.

    As for development of a game server, the articles listed on this page are very informative and should give you an idea of what goes into it. I don't know much in the way of tutorials (I'm sure there are some on Google), but I can give you a few ideas as to what you would need to think of:


    • Do you actually need a server? Would peer to peer connectivity work better?
    • What transport protocol do you want to use to communicate? As a point of reference, the majority of game servers are built on UDP, while several MMORPGs such as World of Warcraft are using TCP.
    • What kind of scale (number of concurrent users) are you planning for?
    • What data do you need to every client to have a consistent record of to ensure deterministic play?
    • How do you deal with desynchronisation caused by network lag?

    There are many challenges you will face when developing this, some of which are listed in the aforementioned articles I linked to. However there are also many strategies to handling them documented on the Internet. Best of luck!

  3. #3
    I don't really understand what is your goal here. Is this a multiplayer game? If yes, I assume you have wrote a server side application already, and now you only want to know how to set it up on a machine so that people from outside can connect, right?

    If it's not a multiplayer game... then what do you mean by "set up a server so that i'm able to get some friends in"?
    I have enough of EA ruining great franchises and studios, forcing DRM and Origin on their games, releasing incomplete games only to sell day-1 DLCs or spill dozens of DLCs, and then saying it, and microtransactions, is what players want, stopping players from giving EA games poor reviews, as well as deflecting complaints with cheap PR tricks.

    I'm not going to buy any game by EA as long as they continue those practices.

  4. #4
    I would recommend to read one of this 3 books:
    http://www.amazon.com/TCP-Sockets-Bu...3097051&sr=1-2
    http://www.amazon.com/TCP-IP-Sockets...3097051&sr=1-3
    http://www.amazon.com/TCP-Sockets-Ja...3097051&sr=1-4

    I'm writing server for my game too right now and this books help me a lot. Even first few chapters should give u an idea what to do.

  5. #5
    The Patient Pnyx's Avatar
    10+ Year Old Account
    Join Date
    Apr 2010
    Location
    Denmark
    Posts
    212
    Quote Originally Posted by procne View Post
    I don't really understand what is your goal here. Is this a multiplayer game? If yes, I assume you have wrote a server side application already, and now you only want to know how to set it up on a machine so that people from outside can connect, right?
    ^ this is exactly what my goal is, though since i don't have any experience or idea on how it works, i don't think that what i've made so far is written as a server side application.. But already this has helped me understand a little bit how it works.

  6. #6
    Well, you would have to give more details about your game.
    Network protocols don't seem to be your concern at the moment. game architecture is.
    You say that you don't have server side application yet, but want to test it with friends, which makes me think that you don't really understand how it all works.

    Server application keeps all data about world and all objects / characters in it. Players, who connect via clients to the server, receive data about the world from the server. Most of the time client is asking for some info about the world and the server responds. Whatever player does in his client is sent to server - server then validates if it's possible / allowed and applies the change to the world, sending info about back.

    This is quite complicated and network protocols (TCP, UDP etc.) are only basic tools needed for it, not a complete solution.

    You probably have a single player game, which you want to transform into multiplayer.
    You will have to create server application with all the data structures to store info about the world.
    Then you will have to change clients so that they get all info about the world from the server. Then change them so that all interactions with the world are sent to client. And then make sure that info about all changes to the world is automatically sent to the players which might be affected by them.
    Last edited by procne; 2012-03-30 at 09:29 AM.
    I have enough of EA ruining great franchises and studios, forcing DRM and Origin on their games, releasing incomplete games only to sell day-1 DLCs or spill dozens of DLCs, and then saying it, and microtransactions, is what players want, stopping players from giving EA games poor reviews, as well as deflecting complaints with cheap PR tricks.

    I'm not going to buy any game by EA as long as they continue those practices.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •