So my question isn't about what technology to use or how to do this or that, but a more general question.

I'm currently developing a action third person shooter. With elements of RPG - weapon,armor upgrades and items.

Players will be able to create new games or join old ones. So my question is how to create the game server that players will play in. I have two ideas on my mind.

  1. The player who made the game is the server. All data passes trough him and he send this data to the server updating the database of the players with their XP points kills/deaths score and other.
  2. Or my host machine is the server, the player who made the game just will open new instance on my host and will be like client. And all players send their input data to the host, the host updates the game and send response back to client for any new changes like where is the enemy and other.

And if i choose option 1 is there a chance the host to change the game content and manipulate the game results? (I think there is but i'm not sure)

And if i choose option 2 isn't that raising the response time and potentially the game lag?

or maybe there is another option?


1 Answer 1


This actually falls to a more complex analysis of your game. In the terms of what needs to be sent across the wire, what needs to be kept on each machine, and what is a system not to be trusted with?

once you answer those questions then you can start to ask the questions of where does the data get held.

In the context of your direct question: a case where the hold machine was the server, and responsible for receiving validating, and updating the other systems is Halo 1 for the PC. This had no checking for connection to that host, and so the host system could be unplugged, and the game would still be going, and then the system would be reconnected, and that system would update the others. To hilarious results of score.

An example of the server simply being a client that started the instance of the game would be more in line with an MMO.

Though this all follows from what you want your data security/validation to act like.

EDIT: it should be mentioned that in some instances letting the player update some of their characters information before validating can still be perfectly fine. For example the player should be able to update their own position (trying to do this all server side can get expensive), but still have it check in with the server every X seconds.

To avoid similar to Halo 1 for PC have the connection tested every X seconds. in terms of expense pinging every 20 seconds is a small price to pay to stop any entity from cheating.

again it is a complex analysis of your game to determine what gets determined where, and if some things are even worth sending.

  • \$\begingroup\$ I just want to avoid cheating and hacking in order to sustain a good gaming community. Thats what i was trying to ask. The most reliable way of construct a server-client online game. One i have learned from my gaming experience - you cannot trust the user :D \$\endgroup\$
    – TreantBG
    Commented Apr 1, 2012 at 8:16
  • \$\begingroup\$ 10x for the answers. When i advance with my development i will ask again if i need any help :) \$\endgroup\$
    – TreantBG
    Commented Apr 1, 2012 at 9:00
  • \$\begingroup\$ you really need to design for networking from the beginning. I have heard many a game having to be completely redesigned because networking was put in as an afterthought, and that was after having a stable single player. \$\endgroup\$
    – gardian06
    Commented Apr 1, 2012 at 9:22
  • \$\begingroup\$ IS AWS-lamda a good choice of server for such a game? \$\endgroup\$
    – Nikos
    Commented Nov 13, 2016 at 8:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .