Projects / TileRacer

TileRacer

COMPLETE

Project Summary

A single or multiplayer minigame, implemented through a plugin to the RuneLite OSRS Java client. The Game involves players competing to complete user built circuits in real time, with a server coordinating the players involved. Adhears to strict API and approval requirements, custom built UI in Java Swing, and runs through modest network latency.

Architecture Overview

  • Tick-driven game state machine: Scoring, hazards, modifiers, and countdowns advance through RuneLite game-tick events instead of independent timers, keeping behaviour aligned with the game client.
  • Host-authoritative multiplayer: Assigned the host responsibility for generating shared mechanics and maintaining the canonical match state. Participants submit constrained actions and progress updates, while the host validates claims and broadcasts the resulting state, preventing clients from producing conflicting random events.
  • Explicit thread ownership: Routed game-state changes from asynchronous WebSocket callbacks onto RuneLite’s client thread and scheduled Swing interface changes on the event-dispatch thread. Concurrent collections and volatile fields protect the small amount of lobby state shared across execution contexts.
  • Collision-aware world modelling: Represented level tiles using stable world coordinates and used collision flags, path-distance calculations, and line-of-sight checks when selecting sequence targets, hazards, and reset tiles. This prevents mechanics from placing important objectives in unreachable or invalid locations.
  • Portable local persistence: Serialized levels, modifiers, and high scores into dedicated JSON data-transfer objects stored through RuneLite’s configuration system. Stable coordinate ordering, input validation, and clipboard import/export allow custom levels to be saved and shared without exposing internal runtime objects.

Screenshots

Use the arrows to browse, then select a screenshot to enlarge it.