Home Work Living Nations: Roots

Web Application  ·  Client project

Living Nations: Roots

A persistent browser-based civilisation simulation where the world keeps moving between visits.

Seed World Cron tick State

Living Nations: Roots
Built mockup — not a screenshot

The problem

A persistent world has to advance while nobody is looking at it. That is a scheduling and data-integrity problem long before it is a gameplay problem.

The approach

A custom PHP MVC core with a deliberately strict data layer, and scheduled work that advances world state independently of any request. The security posture was set at module one rather than retrofitted later.

The architecture

  1. Custom PHP MVC — router, controllers, models, view layout system
  2. PDO-only data access with emulated prepares disabled and prepared statements throughout
  3. Procedural 500x500 world generation from a seed
  4. Cron-driven jobs advancing world state between sessions
  5. Health API endpoint for uptime checking
  6. Docker Compose stack with MySQL auto-importing the SQL directory on first boot

Result

Designed so world state advances without a visitor present, and so the data layer cannot be reached except through prepared statements.

Your next system starts here.

Have a technical problem worth solving?