idk how to explain this but i use chatgpt to explain
1. Server-Client Model
Roblox uses a server-client system where:
-
Servers handle game logic, physics, and player interactions.
-
Clients (players' devices) handle rendering, input, and local effects.
2. Types of Servers
Roblox primarily has two types of servers:
-
Game Servers: These are temporary servers created when a player joins a game. They run the game code and synchronize player actions.
-
Data Servers: These store and retrieve player data (like leaderboards, progress, and purchases) using services like DataStoreService.
3. How Game Servers Work
-
When you join a game, Roblox assigns you to an existing server with space or creates a new one if necessary.
-
Games can have public or private servers.
-
Some games use reserved servers for private matches (e.g., VIP servers).
-
The server despawns when all players leave.
4. Server-Side vs. Client-Side Code
-
Server-side scripts (written in Lua) run on the server and handle game logic, security, and multi-player interactions.
-
Client-side scripts run on the player's device, handling UI and animations.
5. Dedicated vs. Peer-to-Peer
-
Roblox does NOT use peer-to-peer networking. Instead, it runs dedicated cloud-based servers hosted by Roblox Corporation.
-
This prevents hacks and cheating, since only the server has authority over important game actions.
6. Server Limitations
-
Each server has a player limit, usually 50 or fewer (varies per game).
-
Large games use multiple servers (shards) to handle thousands of players.