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

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. ...


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 ...


2

Myself, I'd recommend keeping the server and client authored in a single Unity project. This minimizes the chance for mistakes where you change something in either the server or client and miss updating the other, resulting in divergent behaviour or major errors. You could approach it in other ways, like bundling everything needed by both client and server ...


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. ...


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

Sending the data to the client before you are sure that it was successfully stored in the database, you run the risk that the client will display information to the user that the server ultimately will disagree with eventually. You should consider on a case-by-case basis if the consequence of a user potentially seeing this "incorrect" information, ...


2

Can this strategy work at all? Yes. Thus, I will answer a different but related question: How can we build up to that strategy? I will cover most of what you ask. Except one detail: ECS. Why? it is a detail. Base architecture Go back to the original conception of object oriented programming. The way Alan Key expressed about it. Objects are like little ...


2

But how does this get setup to begin with? The client connects to the server, the server starts a game... does the client jump ahead of it's own accord? (Server says "game is starting, I'm at tick 0", and the client is like "okay, well, based on my ping I'm going to be tick 20 then") No. Once the connection is established, the client ...


1

Connection timeouts are usually handled server-sided, not client-sided. That means that this is a problem which should be fixed by the developers themselves. I have not read their sourcecode (and I can not), but I doubt that this is a particularly difficult code change to make on the server-side (but I could be mistaken - this is very hard to judge from the ...


1

Short answer: No Long answer: Theoretically you could if you knew the networking protocals that are involved and managed to compile a compatible version of the game with your fixes and got everyone in the game to swap a few DLL files. But realistically this is only something that the developer can do as they are the ones that have the source code and control ...


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, ...


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