3

A little bit of both. This comes again and again. Your search terms are client-side prediction and client-side simulation. However, if I point you there, you are going to get something much more complicated than what you need for this simple case... So, here are the basics: The client sends the request to the server The client starts playing an animation (...


3

The most likely way such packets could occur is through cheats that people would code for your game. Either the cheat would hijack the connection on the client's side and send duplicate packets, or your client itself would be compromised by the cheat and send whatever the cheater wanted. No amount of encryption can protect against that, but what helps ...


3

You don't necessarily need to run such games server-sided. When the user exits the app, you save the game-state with the current time and date. When the player restarts the app, you reload the savegame, check the time and date of the device to see how much real-world time expired and simulate that time. You could also do this server-sided if you want to. ...


2

IP spoofing on the public Internet has become difficult because most ISPs take countermeasures to prevent it. There isn't much one can do to screw with people's games, unless they control a router between the victim and the server. This in practice means the attacker would need to be (or have the powers to compel) an internet service provider or be on the ...


2

Let us talk time budgets. First of all, the rate at which the server sends updates, and the rate at which the client renders don't have to match. Many games will send updates less frequently than the client renders. With that said, the server will have some time to get the input, simulate and send the updates. Let us say, a 1/60 of a second. Getting input ...


2

First of all, I commend you for thinking outside the box. Keep doing that. Here are a couple problems off the top of my head with one potential implementation. (Only a partial answer.) It increases latency for all players, including the already highest ping player. How much pseudo ping do we add? We must first check which player has the highest ping. ...


1

A common architecture is to have: one thread which listens to network messages from clients, parses them and collects the parsed results in a message queue. At least one other thread which runs the game loop. At one specific point in the game loop, the following happens: The game loop locks the message queue through a thread synchronization like a mutex, ...


1

This is what I know about Servers. I have my own Server, but never cared about single Application hosting. There also could be other possibilities. It is not important that it's C++. It is important, for which operating system you compile it. There are good chances, that your server code could be platform independent. (Did you use any Windows libraries?) ...


Only top voted, non community-wiki answers of a minimum length are eligible