Jump to content
  • Advertisement
Sign in to follow this  

Game Server Design Questions

This topic is 2094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I am fairly new to the world of game development, but I have made a few simple games. So I thought it might be fun to make a networked game, and perhaps even fully flesh out to a high quality product. So guess I will start out by saying what kind of game I wish to make, and that is a online customizable card game. I would like the client to run android/ios/linux/windows/mac or extremely cross platform. I have yet really code anything up and I am primarily in my research phases. So I mainly have questions, and particularly about the design and common implementation of networked games.


I will say I want my server run/compile on both windows and Linux. However, I am not sure if this would be best use of my development time as I could just design the server to run on Linux. I have looked at the system socket calls of most nix systems and windows. There appears to be a fair amount of overlap so writing a cross platform socket implementation/wrapper does not appear to be hard. (But I know when it comes to porting the devil is in the fine details, like structs may be laid out differently ect...). I am also afraid if a I write a wrapper it may lead to some bugs I would be unaware about as I have not done a ton socket programming. I could also use a library, but I am not fan libraries, unless it is something I can easily replace it with another library if one is a problem.


So the second area I started looking at what was kind of protocol I should be using. After reading a bit about sockets and TCP/UDP I concluded for the type of game I developing TCP should be fine as it does not have time critical/real-time responses as a FPS shooter might. However when it comes to sending data what are generally the best ways to structure the data. Like a fixed size packet of data or flexible sized or something else. This also lead in the tangent of security and encryption


Lastly, I have looked into what I should be using for a database. I could use something like simple text files or even binary files to save space, and kind of would like too, but I am unsure how could I make that scale to using multiple servers unless they shared a file system. I could have files memory mapped to allow concurrent access. I am not even sure I should be worried about using multiple servers, but I could use something like MySQL for my database, but then again that is something I am unfamiliar with. What is the standard go to method for game servers database Google gave me a lot answers to just using the standard databases suites or noSQL or just rolling your own?


Share this post

Link to post
Share on other sites

What I would use if I were to develop this, and was optimizing for my own development speed and ease of web deployment:

- nodejs for the application server

- redis for the data store

- HTML5/JavaScript for the UI

- HTTPS for the application server network protocol

- Linux as the server OS

- HAProxy for multiple nodejs instances for multi-core/multi-process serving

- Varnish to cache static assets


This can all be set up in minutes on most cloud hosting providers. ($6/month basic VPS plan at interserver.net, for example.)


Then, once the web version works well, and can be played from all the devices you suggest (iPhones, web browsers, Android tablets, etc,) then you can look into building a custom client for the targets that matter. That target-specific client (iPhone app or whatever) could still use the HTTPS protocol to talk to the application (game) server.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!