← Back to portfolio

School · Games & AI

The Royal Game of Ur

Team project 3D environment AI opponent
Angular 12Spring BootThree.jsJavaAI

Ever wondered what the games of old looked like? One of the oldest still known to us is The Royal Game of Ur.

In this project my team rebuilt that fascinating, roughly 4,500-year-old game as an online multiplayer. The main frameworks were Angular 12, Spring Boot and Three.js. My focus was two-fold: building the 3D game environment, and writing an AI opponent for the single-player mode.

The Royal Game of Ur, desert landing page artwork
The landing page, a desert setting fit for a game from ancient Mesopotamia.

A board from Mesopotamia, rendered in the browser

The 3D environment runs on Three.js, right inside the browser, with no plugins or downloads. Recreating a physical board as a 3D scene means every rule has to exist twice: once as something the player sees and clicks, and once as data the server can reason about.

That's the part I enjoyed most: mapping the tactile game (a board, its squares, the rosette tiles, the pawns) onto a clean model that the Angular front end, the Three.js scene and the Spring Boot back end could all agree on.

Class diagram of the Royal Game of Ur domain model
The domain model: Board, Coordinates, Rosettes and Pawns bridged to the Three.js scene, with DTOs carrying game state to and from the server.

An opponent for when there's no one to play

Multiplayer is the heart of the game, but you shouldn't need a second person to enjoy it. So I built an AI opponent for single-player mode, a computer player that takes its own turns against you.

It's exactly the intersection I want to keep working in: 3D on the web and applied AI, together in one product.

Design explorations and page mockups for The Royal Game of Ur
Design explorations for the game's pages and layout.
A note from the original write-up: this post was published as a teaser while the full project was still being finished, so the images above were shared as a first look at the 3D board, the domain model and the design direction.

One of the oldest games known to man, rebuilt with some of the newest tools on the web.


Get in touch

Let's build something.

Open to projects, collaboration and a good conversation about code, design or music.

LinkedIn ↗ ← More projects