FERNANDO ROCHA FONTELES

Updated 11/2026

← Back to the CV

Projects

Warlock Wars

An online wizard arena in the browser: push your rivals into the lava with spells and be the last one standing.

A match against bots: wizards on an arena ringed by lava, a Fireball landing and the spell bar at the bottom.

What it does

Warlock Wars is a 3D multiplayer arena game, inspired by the Warlock mod. Up to 8 wizards enter an arena surrounded by lava: right-click to move, keys cast spells, and every hit deals damage and knockback. Anyone who falls into the lava loses health fast; the last one alive wins the round. Between rounds, the gold you earn buys spells and items in the shop, so every match builds something different. Made to play with friends through a link or alone against bots, in Portuguese and English.

  • No account, no install: a room is a link, with up to 8 wizards plus anyone who wants to watch.
  • Shop between rounds: 35 spells in 6 groups and 17 items to shape your build.
  • Rounds, Deathmatch, Teams and Ascension (a card pick at each level), against friends or bots in 5 difficulty levels.
  • A sandbox for practice, with endless health and gold and bots and targets from a panel.
  • A wardrobe with pieces for each body part; other players see the change right away.

How it is built

  1. Authoritative server on Cloudflare Durable Objects

    Each room is a Durable Object running the simulation at a fixed 60 steps per second. Every 2 steps, each player gets their own snapshot, with only what they are allowed to see, over hibernatable WebSockets.

  2. Same logic on server and browser

    The simulation lives in shared code. The browser uses the server's own movement functions to move your wizard instantly, then reconciles with what the server sends.

  3. Deterministic simulation, guarded by a hash

    Every random draw uses a seeded generator. A test runs a bot-only match with a fixed seed and checks the hash of every event; the same seed drives the balance simulator.

  4. Protocol as the trust boundary

    Every browser message goes through a single validation step (types, limits, known keys). The player id comes from the connection, never from the message.

  5. Tests, CI, per-PR environments and automatic deploy

    1,569 tests (Vitest) and GitHub Actions CI on every PR. Each PR publishes its own copy of the game, deleted when it closes. A merge into master ships by itself, checks that the site serves the new build and opens a real room as a smoke test.

Stack

  • TypeScript
  • Three.js (WebGL)
  • Vite
  • Cloudflare Workers
  • Durable Objects
  • WebSocket
  • Vitest
  • Playwright
  • GitHub Actions

Screens