Devblog

ECS, DynVMT, Logical Threads, and Pharaoh

Desirability grid in Akhenaten

English translation of the Habr deep dive into the Impressions engine: tile-indexed ECS-style grids for desirability and water, callback-based UI dispatch (DynVMT), tick-sliced city updates, and the figure god-object — with screenshots from Akhenaten and code from the reimplementation.

Read more →

Akhenaten RA 0.27 — Eight Months of Script, Simulation, and Polish

Overlay menu and script-driven UI

Release notes for RA 0.27: roughly two thousand commits since RA 0.26 — every city overlay on script, advisor windows and victory logic migrated to MuJS, BIK intro playback, combat and monument-rating fixes, resource depletion and irrigation, campaign mission corrections, integral tests in CI, and builds for Windows, Linux, macOS, Android, and the browser.

Read more →

Statue Preview and Rotation Move to Script

Placing statues: the ghost preview cycles variants and rotates with the R hotkey

The statue placement preview — its sprite, variant, and facing — now lives entirely in script. Two fixes came with it: pressing R finally rotates a statue ghost (the preview used to ignore orientation and hand back the base frame), and a new per-building allow_rotate flag lets statues rotate manually even when the global auto-rotate option is off. The preview pipeline left building_statue.cpp behind a set of [es=...] hooks plus one new __city_planner_set_tiles_building binding, and the old combined block was split into self-contained statue_small.js, statue_medium.js, and statue_large.js files.

Read more →

Overlays Become Script-Declared

Apothecary building info window showing employee count and an operational-status tooltip under the apothecary overlay

City overlays can now be declared entirely in JavaScript with an [es=city_overlay] block instead of a hand-written C++ slot. A new entity-system registry scans for those declarations, validates the overlay id, and registers each into the engine's slot table after config load — refusing duplicates and unknown ids. The Apothecary health overlay is the first migration: its declaration plus tooltip and column-height handlers now live in a self-contained overlays/apothecary.js, with handlers writing through the new city.overlay_tooltip / city.overlay_column_height properties. Adding an overlay no longer needs a new .cpp or a recompile.

Read more →

Camera Consolidation and a Growing Player Guide

The expanded in-game control panel documented on the new wiki page

Two halves this time: an engine refactor and new wiki pages. The city camera is consolidated into a single viewport_t with cached state — g_city_view is now g_camera, and screen/tile lookups became viewport methods. The Clouds, Game Features, and Game Time debug panels moved to script, and more main-loop / input / platform glue shifted into the platform layer. On the docs side, the Player Guide gained an Interface section with a full Control Panel page, plus dedicated Booth, Juggler School, and Vacant Lot pages — all built from live engine data.

Read more →

Road Construction Moves to MuJS

Green map-order road preview dragged across the city between two temples

Road building — path routing, junction sprites, and placement validity — has moved out of C++ and into road.js. The dragged preview now places tiles on the map temporarily to read their real sprites, so half-drawn roads show correct corners and intersections. A new option renders the green preview inside the isometric map pass instead of as a HUD overlay, plus fixes for placing over existing roads and a new integral test for routed segment placement.

Read more →

Painting Terrain at Runtime: The Debug Brush

Debug terrain paint panel with rocks painted along a coastline

A new debug panel lets you paint terrain directly on a live map — land, trees, water, floodplain, reeds, rocks, ore-bearing rock, dunes, meadow — with a 1-5 tile brush. The brush enforces the physics the scenario editor used to skip: water depth recomputes around the stroke so deepwater stays 2 tiles from any shore, moisture regrows from the map's authored profile, floodplain row order rebuilds, and demolition releases homeless and walks multi-tile chains. Contributed by @cwshields.

Read more →

Overlay Menu Goes Script-Driven

Overlay menu with categories and submenus

The overlay menu — the dropdown for switching between city views like Water, Health, Religion, and Food — has been fully migrated to JavaScript. Category lists, hover detection, submenu state, and localized titles are now defined in ui_overlay_menu.js; the C++ side keeps only a thin window shell.

Read more →

Scenario Selection Window Goes Script-Driven

Scenario selection info panel

The campaign and custom-map selection screen is now fully driven by JavaScript. Period picker, mission info panel, and custom map browser — all three views have been stripped of their C++ draw functions and rebuilt as script-configured widgets with hot-reload support.

Read more →

Mission Debug Panel Moves to JavaScript

The Mission Info debug overlay — which shows live scenario state during playtesting — is now rendered from a script instead of hardcoded C++. ImGui bindings landed in ui_common.js, and C++ now fires an event that JavaScript catches to draw the panel. Editing the debug view no longer requires a recompile.

Read more →

Mission Selection: Script-Driven Windows

Mission selection window

The mission selection and briefing flow is now fully script-driven. The new ui_mission_choice_window.js replaces mission_next.cpp, the briefing window switches to autoconfig init, and branching mission paths can now be defined in script files without recompiling.

Read more →

Tax Collector Window: Script-Driven UI

Tax Collector window

The Tax Collector's info window is now fully script-driven. This migration from C++ to JavaScript allows modders to customize window behavior without recompiling. Includes hot-reloading support and event-driven tax rate controls.

Read more →

Sound Settings Window

Sound settings window

Redesigned sound options window with individual volume controls for music, speech, effects, ambient, and city audio channels. Migrated to JavaScript configuration as part of ongoing UI modernization.

Read more →

Reverse-engineering Caesar III: Game Logic (Part 3)

Caesar III walker route planning

The algorithms for extracting textures and rendering the city are done — now for the game logic. This article covers walkers and routing, house evolution, population ageing, religion, festivals, finances, taxes, emperor favor, culture rating, and resource production. All formulas and data tables recovered from the original executable.

Read more →

Reverse-engineering Caesar III: City Rendering (Part 2)

Caesar III rendering

Deep dive into Caesar III's isometric rendering system: tile format, map structure, rendering order algorithm, and the .map file format. Covers how to properly draw a 2.5D city with moving objects, animations, and multi-tile buildings.

Read more →

Changes in Akhenaten for 2025

A comprehensive changelog covering major work done in 2025: architecture refactoring, migration to JS configs, new enemy types, language support, new buildings, resource depletion, UI improvements, deferred rendering, mod system, and more.

Read more →

Game++. Cooking Vectors (Part 2)

Discusses hybrid_vector — a static_vector that falls back to heap allocation when exceeding a threshold. Draws a parallel to SSO (Short String Optimization). Covers when hybrid_vector helps vs. when it doesn't, and how C++17's std::pmr can emulate the pattern.

Read more →

Game++. Cooking Vectors (Part 1)

Explores performance tradeoffs of std::vector in game dev: allocation costs, memory layout, std::array vs static_vector, and the PS4→Switch porting story with 480KB stack limits.

Read more →

Game++. String Interning

Covers string interning (string pools) as a game engine optimization: compiler-level interning, fragility with char[] and std::string, custom xstring class using CRC hashes, and a 30% animation performance boost in practice.

Read more →

Should Players Be Hand-Held?

A game design essay analyzing level design techniques from Witcher 3, Zelda, and Metro Exodus: landmarks/weenies, golden path, breadcrumbs, affordance, leading lines, and more.

Read more →

Working on Walls Logic

New logic for walls — buildings now connect and render properly.

Read more →

Temple Complex

Screenshot gallery showing temple complex buildings added to the game — multiple new structures extending the religious building set.

Temple Complex Read more →

Works in Browser

Credits @ololoken for getting the game running in-browser via Emscripten/WASM. Try it at dalerank.github.io/Akhenaten/play.

WASM build in browser

Sprite Tool Added

A new sprite viewer tool for inspecting runtime animations by selecting items from a list. Useful for verifying animations during development.

Sprite tool demo Read more →

Base Class for Hyena Animal

Added a base class for hyenas: "It's not very functional yet, but it's another step toward restoring the game." See figure_hyena.h on GitHub.

Read more →

The Story of Original Pharaoh Game

A history of Pharaoh (1999) by Impressions Games: development origins, key figures like Simon Bradbury and Chris Beatrice, the ping-pong texturing art technique, and how the game sold 1.7 million copies on a sub-$2M budget.

Read more →

How to Build a Mastaba

Technical deep-dive into recreating the mastaba monument system: the .sg3/.555 texture format, decomposing the original single-pass render into independent isometric parts, and the 8-stage construction process requiring 400 stones per segment.

Read more →