# BEAM There, Done That with Hernán Rivas Acosta on Multiplayer Games with Netcode

**URL:** <https://erlangforums.com/t/beam-there-done-that-with-hernan-rivas-acosta-on-multiplayer-games-with-netcode/6095>\
**Category:** Podcasts\
**Tags:** webassembly, beam-there-done-that, podcasts-by-ancatrusca\
**Created:** [October 30, 2026, 2:31pm UTC](https://erlangforums.com/t/beam-there-done-that-with-hernan-rivas-acosta-on-multiplayer-games-with-netcode/6095 "2026-10-30T14:31:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ancatrusca](https://erlangforums.com/letter_avatar_proxy/v4/letter/a/b5e925/32.png) [@ancatrusca](https://erlangforums.com/u/ancatrusca)\
**Post date:** [October 30, 2026, 2:31pm UTC](https://erlangforums.com/t/beam-there-done-that-with-hernan-rivas-acosta-on-multiplayer-games-with-netcode/6095/1 "2026-10-30T14:31:25Z")

</div>

**Why the BEAM for game servers, 2010 edition**

Hernán’s first Erlang server, for a Cartoon Network football game, held 50,000 concurrent TCP connections per machine. The cap was the file descriptor limit the team chose not to raise. The Java estimate was a few thousand.

**Runtime points**

- Processes for game developers: Hernán compares them to time slicing AI across frames with a per-tick budget, except the scheduler does it for you and handles socket-heavy workloads far better than hand-rolled code.

- Timer granularity: interval timers take integer milliseconds, so 1000/30 became 33 and the server drifted against clients running 33.3. Choose a tick rate whose period is a whole number of milliseconds.

- NIF vs Wasm: a NIF crash takes down the VM. A Wasm trap stays in the calling process, so one match dies, its players reconnect, and everyone else carries on.

- Monitor, don’t restart: the lobby monitors matches rather than supervising them, because restarting from a bad Rust state would only crash again.

- The scaling ceiling: once a tick’s work exceeds 25 ms, ticks queue and the match never catches up. Per-player cost includes the state copied across the Elixir/Wasm boundary on every tick.

- Clock sync: an NTP-style ping exchange against a single server, keeping the smallest round trip. Tick resolution makes 10–15 ms of error tolerable.

**Context**

Demonware, Riot and Nintendo have long run connections, messaging, presence and notifications on the BEAM. Spawndemonium puts the game loop there too.

[![](https://img.youtube.com/vi/XubYVNbehYc/maxresdefault.jpg "Multiplayer games with Netcode on the BEAM") ](https://www.youtube.com/watch?v=XubYVNbehYc)
