← Simone Rodari GitHub ↗

FIG. 03 / 2024 · ONLINE MULTIPLAYER

Codex
Naturalis

A digital port of the illustrated board game, rebuilt as an online multiplayer game in Java for the Software Engineering course.

Type
Board game port
Stack
Java · RMI · Socket · JavaFX
Team
Four developers
Course
Software Engineering, PoliMi

The project

Codex Naturalis is a digital port of the illustrated board game by Cranio Creations, rebuilt as an online multiplayer game in Java. It was the final project for the Software Engineering course at Politecnico di Milano.

Four of us reconstructed the game from the ground up on a Model, View, Controller architecture: its cards, its four kingdoms, its scoring, a client and server that talk over two different networks, and two full clients to play it through.

The Elements

AN ILLUSTRATED INDEX

The pieces the game is built from, drawn from its own world. Text to sit beside the components, not a rulebook.

The four kingdoms

Every card belongs to one of four natural kingdoms. Their symbols sit in the corners, and gathering them is how a codex grows.

Plant Regnum Plantae Ferns and ivy, the slow green patience of the forest floor.
Animal Regnum Animale The fox and the creatures that move through the undergrowth.
Fungi Regnum Fungi Toadstools and quiet decay, the red bloom after rain.
Insect Regnum Insectorum The butterfly and the small winged things between the leaves.

The treasures

Three treasures of the scriptorium hide among the cards, worth more than any single leaf.

Quill Penna For the hand that copies the world onto the page.
Inkwell Atramentum The dark well every illustration is drawn from.
Manuscript Codex The bound folio each of these pages belongs to.

Every card is four corners

A card is laid over the corners of the ones already down. It covers what lies beneath and leaves its own corners open for the next. From that overlap, the whole codex is built outward.

Six real game cards overlapping at their corners: a starter card in the middle with a plant, animal, insect and fungi card tucked into each corner, and a gold card chained on beyond
Corners
Each of the four holds a resource, a treasure, or nothing at all.
Overlap
Placing a card over a corner covers it, and its resource with it.
Faces
Starter, resource and gold cards, each playable on either side.

Two ways to play

GUI & TUI

The same match, rendered two ways: a full graphical client, and a terminal client that runs anywhere a shell does.

JavaFX GUI

The full table.

A graphical client with the shared table, your hand, the scoring track and a live chat, laid out the way the physical game looks from above.

The JavaFX graphical client: a wooden table seen from above with players' cards, the scoring board and a minimap
Terminal TUI

Plays in a shell.

A text client for when there is nothing but a terminal. It draws the same board in three modes, so it stays readable from a rich console down to the plainest one.

The terminal client rendering the game board with colored Unicode blocks
  • Fancy Unicode blocks
  • Enhanced colored ASCII
  • Standard maximum compatibility

In motion

GAMEPLAY

A short clip from a live match on the graphical client, not a full game.

Under the hood

HOW IT WAS BUILT

  1. 01

    Java

    Language

    Client and server are both written in Java, split along a Model, View, Controller architecture so the rules live in one place and the two clients only draw them.

  2. 02

    RMI + Socket

    Networking

    Two interchangeable network stacks. A player joins over Java RMI or over raw sockets, and either way reaches the same server and the same match.

  3. 03

    JavaFX

    Graphical client

    The full graphical interface: login, match selection, the table seen from above, card placement and an in-game chat.

  4. 04

    Terminal UI

    Text client

    A second, self-contained client that renders the board as text and walks the player through connecting, naming, and joining or hosting a game.

  5. 05

    JUnit

    Tests
    • Model85% classes · 94% methods
    • Controller100% classes · 93% methods

What shipped

  • Full game rules
  • RMI networking
  • Socket networking
  • Graphical interface
  • Terminal interface
  • Multiple simultaneous games
  • ~In-game chatpartial
  • ~Save & resumepartial