Category: AoNW

  • [AoNW] Building AI That Uses the Same Commands as the Player

    AI in a strategy game can easily become a second game hidden inside the first one. That is dangerous.

    If the AI has its own movement rules, its own production shortcuts, its own visibility model, or its own private way of mutating state, then every new feature has to be implemented twice: once for the player and once for the AI. Worse, bugs become harder to reason about because the AI is no longer playing the same game.

    In Age of New Worlds, I want the AI to use the same language as the player. That language is commands.

    (more…)
  • [AoNW] From Hotseat to Multiplayer: Making the Server Authoritative

    Age of New Worlds started with local play. That was the right place to begin. A 4X game already has enough moving parts before networking enters the picture: turns, units, cities, production, research, fog of war, saves, UI state, and AI. Adding multiplayer too early can turn every feature into a distributed-systems problem.

    But I did not want local play to become a dead end.

    So even while the game focused on hotseat, I tried to shape the architecture around a future server-backed model. The main rule was simple:

    Local play can be convenient, but multiplayer must be authoritative.

    (more…)
  • [AoNW] Saving game: Snapshots, Event Logs, and Migrations

    Saving a sounds simple until the game starts becoming a real 4X game.At the beginning, it is tempting to think of saving as one operation:

    jsonEncode(gameState)

    That works for a prototype. It does not work for long.

    (more…)
  • [AoNW] The Domain and Application Layers: Where the Game Actually Lives

    A 4X has many different kinds of decisions. Some are game rules. Some are player workflow. Some are persistence. Some are rendering. Some are network concerns. If I let all of them live in the same place, every new feature becomes harder than it should be.

    So the project uses a DDD-inspired split between the domain layer and the application layer.

    The domain layer answers: what is true in the game?

    The application layer answers: how do I perform a use case around that truth?

    (more…)
  • [AoNW] General architecture overview

    Age of New Worlds is strongly DDD-inspired. I use domain boundaries, application ports, infrastructure adapters, commands, events, projections, and persistent snapshots because a 4X game becomes complicated very quickly. The architecture is there to answer one question:

    How do I keep the game understandable when rendering, UI, AI, saving, hotseat play, and multiplayer all want to touch the same state?

    (more…)
  • [AoNW] Fog of War: Separating What Exists from What the Player Knows

    Fog of war looks like a visual feature. The map gets darker. Unknown territory disappears. Previously explored land stays dim. Enemy units appear and vanish. It feels like something that belongs mostly to rendering.

    But in AoNW, fog of war is not just an overlay. It is one of the systems that forced me to separate three different ideas:

    • what exists in the game world
    • what a player has discovered
    • what a player can currently see

    That distinction matters everywhere. It affects rendering, selection, movement, combat previews, AI decisions, event visibility, and eventually multiplayer.

    (more…)
  • [AoNW] Rendering a Hex World with Flutter and Flame

    Age of New Worlds is built in Flutter, but the map itself is not a normal Flutter widget tree.

    That was one of the first architectural decisions I had to make. A 4X game has a lot of ordinary UI: menus, panels, buttons, overlays, localization, routing, settings, loading states, and HUD elements. Flutter is excellent for that.

    But the game map is different.

    (more…)
  • [AoNW] Commands, Reducers, and Why the Renderer Does Not Own the Game

    When I started building AoNW, it was tempting to let the map renderer become the center of the game.

    That would have been natural. The renderer is where the player clicks. It knows which hex is under the pointer. It owns the camera, visual layers, hover states, unit markers, movement previews, fog overlays, particles, and the general feeling of interacting with the world.

    But in a 4X game, that is exactly why the renderer should not own the game.

    (more…)
  • [AoNW] What I’m Building

    Age of New Worlds is my attempt to build a hex-based 4X strategy game for iOS, MacOS, Android platforms with the kind of systems I love: exploration, expansion, city growth, production choices, research, turn pressure, and the slow emergence of a readable strategic map.

    At the current stage, the game already has the core loop in place. I can start a match, explore a hex map, found cities, move units, manage production, choose research, improve tiles, handle turn flow, and save or load the game. There is also a map editor and a growing set of developer tools around balance and content iteration.

    The interesting part, at least for this series, is not only what the game does. It is how the project is shaped so it can keep growing.

    (more…)