Skip to content

Instantly share code, notes, and snippets.

View Knar33's full-sized avatar
🛡️

Knar Knar33

🛡️
View GitHub Profile
Networking Overview
Networking is a notoriously difficult concept to get right in game development, so it's no suprise that it's not the easiest thing to learn in Core. Luckily Core and UE4 do most of the heavy lifting and give us some relatively simple ways to pass data between the server and the clients.
When you play a single player game everything runs on your computer. All of the game state, scores, locations of objects, and graphics are managed and displayed on your own machine. There is one single copy of the game running locally, and it can access any of the game's state whenever needed. When you press the W key to move, the game checks to make sure you're not running into a wall, your character moves forward, and then a movement animation plays. Multiplayer games are much different. You still run a copy of the game on your local machine, but each player also runs their own copy of the game and the server runs yet another copy of the game.
The server acts as the final authority for everything
Networking Overview
Networking is a notoriously difficult concept to get right in game development, so it's no suprise that it's not the easiest thing to learn in Core. Luckily Core and UE4 do most of the heavy lifting and give us some relatively simple ways to pass data between the server and the clients.
When you play a single player game everything runs on your computer. All of the game state, scores, locations of objects, and graphics are managed and displayed on your own machine. There is one single copy of the game running locally, and it can access any of the game's state whenever needed. When you press the W key to move, the game checks to make sure you're not running into a wall, your character moves forward, and then a movement animation plays. Multiplayer games are much different. You still run a copy of the game on your local machine, but each player also runs their own copy of the game and the server runs yet another copy of the game.
The server acts as the final authority for everything