Open source
Atlas: Avicus's XML-driven match engine
The open-source Minecraft match engine behind Avicus, where maps written in XML become modules, phases and objectives. I directed it and built much of it.
- 50+commits across Atlas and the monorepo
- 7 years2017 to 2024
The problem
Every map on Avicus was its own game: teams, objectives, spawns, kits and rules that changed partway through a match. Map makers needed to describe all of that without writing Java, and the engine had to turn their description into a running match.
What I built
The Atlas README credits me with project direction, feature work and converting it into a standalone project. Some of what I built:
- Phases that change the map on a timer, like swapping the materials of a destroyable objective. Each one runs a countdown, checks its objectives, applies on a pass, and retries or moves to a fail phase if it doesn’t
- Staff commands to list, remove, retime and create phases in a live match
- Free-for-all joining and elimination: the score is how many players a competitor has left, and the last one standing wins
- Safe spawns that pick the spawn region farthest from other players, then look for a point with headroom above and ground below. If a region can’t give one, it tries the others and warns the map developers
- The module docs: Atlas generates a page for every XML module, and I wrote most of the documentation site and its examples
- Map XMLincludes and conditionals
- ModuleFactoriessorted, build modules
- Matchmodules registered
- Phase countdownboss bar near the end
- Applypass, retry or fail phase
How a phase applies
countdown(phase.delay):
on_tick(remaining):
if remaining < 5 minutes: boss_bar.show(phase.message, remaining)
else: boss_bar.clear()
if should_broadcast(remaining): chat + sound
on_end():
failed = objectives.filter(o -> not phase.should_apply(o))
if failed.empty:
broadcast(phase.success); apply(phase.materials, objectives)
return phase.pass_phase.map(next -> countdown(next.delay, next))
retry = failed.filter(o -> attempts(o) < phase.retry_attempts)
if retry and phase.retry_delay:
return countdown(phase.retry_delay, phase, retry)
broadcast(phase.fail)
return phase.fail_phase.map(next -> countdown(next.delay, next))
Why it matters
Map makers could build whole new game types in XML, and a match could change itself as it went on without anyone touching code.