> For the complete documentation index, see [llms.txt](https://netick.gitbook.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://netick.gitbook.io/v1/understanding-client-server-model.md).

# Understanding Client-Server Model

When programming a single-player game, you usually don’t care about making sure the behavior and actions of players are legal, because it ultimately doesn’t matter since the game runs completely on their machine, and it’s impossible to prevent cheating when the client (player) has full access to everything related to the game. Because there is no central authority dictating the flow of the game, and enforcing the game rules and mechanics.\
That’s why it’s extremely easy to cheat in peer-to-peer games (where every player is connected to everyone else and everyone can decide whatever they want). Each client can interpret the outcome of the game however it wants. This is the problem that the client-server model solves.

<figure><img src="/files/9ICEqZjOWgt7iNWnx9b9" alt=""><figcaption></figcaption></figure>

In this model, rather than connecting the players to each other, every player is simply connected to a single node/machine called the server. In a perfect client-server implementation, the client simply sends inputs (which describe what they want to happen, e.g. moving, shooting) and the server basically responds by sending back the resultant game state to that input. Therefore the server is the one who executes the inputs and so there is no way for the client to cheat.

Netick implements the client-server model + client-side prediction. You will see later how to construct these inputs and states to create your server-authoritative gameplay systems.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://netick.gitbook.io/v1/understanding-client-server-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
