background preloader


Facebook Twitter

Fixing the Internet for Real Time Applications: Part I. League of Legends is not a game of seconds, but of milliseconds.

Fixing the Internet for Real Time Applications: Part I

In day-to-day life, two seconds fly by unnoticed—you took two seconds reading that! In-game, however, a two-second stun can feel like an absolute eternity. In any single match of LoL, thousands of decisions made in milliseconds dictate which team scores bragging rights and which settles for “honorable opponent” points. I'm a network engineer at Riot, and part of the Riot Direct team that’s obsessing over those milliseconds. Is it just me or is networking really hard?

Last week I found this discussion on Reddit:

Is it just me or is networking really hard?

The Game of Distributed Systems Programming. Which Level Are You? Introduction When programming distributed systems becomes part of your life, you go through a learning curve.

The Game of Distributed Systems Programming. Which Level Are You?

This article tries to describe my current level of understanding of the field, and hopefully points out enough mistakes for you to be able follow the most optimal path to enlightenment: learning from the mistakes of others. For the record: I entered Level 1 in 1995, and I’m currently Level 3. Where do you see yourself? Level 0: Clueless Every programmer starts here. NN1:”replication in distributed systems is easy, you just let all the machines store the item at the same time“ Source Multiplayer Networking. Multiplayer games based on the Source Engine use a Client-Server networking architecture.

Source Multiplayer Networking

Usually a server is a dedicated host that runs the game and is authoritative about world simulation, game rules, and player input processing. A client is a player's computer connected to a game server. The client and server communicate with each other by sending small data packets at a high frequency (usually 20 to 30 packets per second). A client receives the current world state from the server and generates video and audio output based on these updates. The client also samples data from input devices (keyboard, mouse, microphone, etc.) and sends these input samples back to the server for further processing. Network bandwidth is limited, so the server can't send a new update packet to all clients for every single world change. Basic networking The server simulates the game in discrete time steps called ticks.

Game Environments Internet Utilisation Study. Introduction GENIUS began in 2002 with the aim of characterizing the impact of popular online, interactive, real-time games on ISP networks.

Game Environments Internet Utilisation Study

Nagle's algorithm. Nagle's algorithm, named after John Nagle, is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network.

Nagle's algorithm

Nagle's document, Congestion Control in IP/TCP Internetworks (RFC 896) describes what he called the "small packet problem", where an application repeatedly emits data in small chunks, frequently only 1 byte in size. Since TCP packets have a 40 byte header (20 bytes for TCP, 20 bytes for IPv4), this results in a 41 byte packet for 1 byte of useful information, a huge overhead. This situation often occurs in Telnet sessions, where most keypresses generate a single byte of data that is transmitted immediately. Worse, over slow links, many such packets can be in transit at the same time, potentially leading to congestion collapse.

Nagle's algorithm works by combining a number of small outgoing messages, and sending them all at once. Algorithm[edit] where MSS = maximum segment size. UDP vs. TCP - Introduction Hi, I’m Glenn Fiedler and welcome to the first article in my article series Networking for Game Programmers In this article we start with the most basic aspect of network programming, sending and receiving data over the network.

UDP vs. TCP -

Features - 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond. This paper explains the design architecture, implementation, and some of the lessons learned creating the multiplayer (networking) code for the Age of Empires 1 & 2 games; and discusses the current and future networking approaches used by Ensemble Studios in its game engines.

Features - 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond

When the multiplayer code for Age of Empires was started in early 1996 there were some very specific goals that had to be met to deliver the kind of game experience we had in mind. The Genie Engine was already running and the game simulation was shaping up into a compelling experience in single player. The Genie Engine is a 2D single-threaded (game loop) engine. Sprites are rendered in 256 colors in a tile-based world. Randomly-generated maps were filled with thousands of objects, from trees that could be chopped down to leaping gazelles.

We wanted to devastate a Greek city with catapults, archers, and warriors on one side while it was being besieged from the sea with triremes. Simultaneous Simulations. What every programmer needs to know about game networking - Introduction You’re a programmer.

What every programmer needs to know about game networking -

Have you ever wondered how multiplayer games work? From the outside it seems magical: two or more players sharing a consistent experience across the network like they actually exist together in the same virtual world. But as programmers we know the truth of what is actually going on underneath is quite different from what you see. It turns out that it’s all an illusion.