o
odin.langpkg.dev
packages / library / example_rotmg

example_rotmg

6561a04library

No description provided.

No license · updated 2 weeks ago

MMO-lite Steam Lobby POC

A first proof-of-concept for a Steamworks lobby-based MMO-lite game in Odin.

Current POC

  • Raylib window with simple 2D circle rendering.
  • Steamworks initialization through odin-steamworks.
  • Uses Steam AppID 480 (steam_appid.txt) for local Spacewar testing.
  • Press C to create a friends-only dungeon lobby with max 5 players.
  • Press I to open Steam's invite dialog.
  • Accepting a Steam lobby invite while the game is running joins that lobby.
  • Non-overlay lobby testing: copy lobby IDs with L, join clipboard lobby IDs with J, or launch with --join <lobby_id>.
  • WASD / arrow-key movement for the local circle.
  • Broadcasts local player state to lobby peers with SteamNetworkingMessages.
  • Receives peer state and interpolates remote circles.
  • Data-oriented first pass: global game state, SoA player slots, packed network packet.

Build

odin build . -out:example_rotmg_poc

Run

Steam must be running and logged in.

./example_rotmg_poc

On Linux, libsteam_api.so must be discoverable by the loader. This repo keeps a copy beside the executable for the POC.

Controls

  • WASD / arrows: move
  • I: invite friends to lobby
  • L: copy current Steam lobby ID to clipboard
  • J: join numeric Steam lobby ID from clipboard
  • Shift+Tab: Steam overlay
  • C: create/host a lobby if not already in one

Local lobby testing without Steam overlay

Host:

./example_rotmg_poc

Press C to create a lobby. Once in lobby, press L to copy the numeric lobby ID and send it to another developer.

Joiner option A, clipboard:

  1. Copy the numeric lobby ID from chat/Discord/etc.
  2. Run the game.
  3. Press J before creating/while not in a lobby.

Joiner option B, launch argument:

./example_rotmg_poc --join 109775240000000000

This path tests Steam lobbies and SteamNetworkingMessages without requiring the Steam overlay invite UI.

Next implementation milestones

  1. Split this single-file POC into modules: sim, players, steam_net, render.
  2. Add explicit dungeon/raid lobby sizing: 5-player dungeons, 10-player raids.
  3. Move from peer transform broadcast to host-authoritative snapshots.
  4. Add fixed-timestep simulation and render interpolation buffers.
  5. Add packet sequence validation, stale-player timeout, and disconnect handling.
  6. Add compact SoA entity state for combat actors/projectiles/effects.
  7. Add deterministic dungeon encounter room prototype.
  8. Package correctly for Steam with proper Steam AppID and redistributables.