DEV Community

Cover image for ZlormaEngine: Building an Adaptive Game Engine with AI Directors
Zlormack
Zlormack

Posted on

ZlormaEngine: Building an Adaptive Game Engine with AI Directors

What if a game engine didn't simply execute a game?

What if it could observe how you play, analyze your run, and coordinate multiple systems to decide what should happen next?

That's the idea behind ZlormaEngine, an experimental game engine I'm building for Linux and Windows.

It started with something much smaller: a prototype called GameFall Arena.

A player. An arena. Geometric enemies. Projectiles. Waves.

Nothing revolutionary.

But while developing the prototype, I started asking a different question:

Instead of scripting every encounter in advance, could the engine dynamically direct the experience around the player?

That question changed the entire project.

It led to the central architecture of ZlormaEngine:

The Director System

A Director is a specialized subsystem responsible for observing, analyzing or controlling one aspect of a run.

The basic loop is:

PLAYER
  ↓
OBSERVE
  ↓
ANALYZE
  ↓
DIRECTORS
  ↓
DECIDE
  ↓
GAMEPLAY
  ↓
PLAYER REACTS
  ↺
Enter fullscreen mode Exit fullscreen mode

But there's an important difference between ZlormaEngine's current direction and simply having several independent systems.

The Directors are designed to communicate with each other.

A Level Director shouldn't generate an arena without considering enemies.

An Enemy Director shouldn't choose a strategy without understanding the arena.

A difficulty system shouldn't increase numbers blindly without understanding the player's performance.

The goal is to create a network of Directors that collectively shape the run.


Level Director: Procedural Arenas with Meaning

The Level Director controls arena generation.

Instead of thinking only about random obstacle placement, it describes each generated arena using what I call Arena DNA.

For example:

SPACE       0.64
COVER       0.42
LANES       0.78
PRESSURE    0.57
ASYMMETRY   0.31
STYLE       ASCENDANT
Enter fullscreen mode Exit fullscreen mode

These values describe the gameplay properties of the arena.

And that's where Arena DNA becomes particularly useful.

It isn't only metadata.

It becomes a language that other Directors can understand.

If an arena has a high LANES value, the AI Enemy Director knows that corridor-based strategies may work.

If COVER is high, another Director can favor enemies or behaviors capable of forcing the player out of defensive positions.

Procedural generation therefore becomes more than:

generate_random_level()
Enter fullscreen mode Exit fullscreen mode

It becomes:

generate_level()
      ↓
understand_level()
      ↓
share_level_properties()
      ↓
adapt_other_systems()
Enter fullscreen mode Exit fullscreen mode

AI Enemy Director

The AI Enemy Director studies how the current run is being played.

It can use information such as:

  • accuracy;
  • movement;
  • damage received;
  • firing frequency;
  • combat distance;
  • combos;
  • positioning.

The goal isn't:

Player is good → enemies get +200% HP.

That's technically adaptive difficulty, but it isn't particularly interesting.

Instead, I want the engine to ask:

What kind of problem would challenge this player's current strategy?

The demo uses deliberately limited behaviors such as:

CHASE
INTERCEPT
FLANK
PRESSURE_LIGHT
Enter fullscreen mode Exit fullscreen mode

If the player constantly keeps their distance, enemies may gradually become better at interception.

If they remain in predictable areas, another strategy may become more common.

The important rule is that adaptation should remain understandable and fair.

The player should feel challenged, not cheated.


Enemy Shape Director

GameFall Arena originally used simple geometric enemies because it was a prototype.

Instead of hiding that limitation, I decided to turn it into gameplay.

The Enemy Shape Director gives shapes actual meaning.

○ Circle    → Standard
□ Square    → Tank
△ Triangle  → Fast / Aggressive
◇ Diamond   → Tactical / Ranged
Enter fullscreen mode Exit fullscreen mode

This creates immediate visual readability.

A player seeing a triangle doesn't need to inspect a stat panel to understand:

That thing is probably going to rush me.

The full version of ZlormaEngine is planned to expand this system with:

Hexagons
Stars
Elites
Hybrid shapes
Mutations
Different sizes
Rare procedural forms
Enter fullscreen mode Exit fullscreen mode

And because Enemy Shape Director communicates with Level Director and AI Enemy Director, enemy composition can be influenced by the arena itself.


Directors Become More Interesting Together

Imagine this run:

PLAYER
│
├─ fights mostly at long range
├─ has high accuracy
└─ uses predictable movement
        ↓
COMBAT ANALYSIS
        ↓
AI ENEMY DIRECTOR
        ↕
LEVEL DIRECTOR
        ↕
ARENA DNA
        ↕
ENEMY SHAPE DIRECTOR
        ↓
New encounter
Enter fullscreen mode Exit fullscreen mode

The Level Director generates an arena containing several lanes.

Arena DNA exposes that information.

The AI Director knows the player prefers long-range combat.

Enemy Shape Director introduces enemies suited to interception and pressure.

The result isn't necessarily a harder level because enemies have larger health bars.

It becomes harder because:

the situation itself changed.

That distinction is extremely important to what I want ZlormaEngine to become.


Gem Forge: Let the Player Adapt Too

An adaptive engine shouldn't be the only side capable of evolving.

The player needs tools to respond.

That's why GameFall Arena includes Gem Forge.

Enemies can reward gems, which can be spent on upgrades such as damage, movement, projectiles, protection and recovery.

This creates another feedback loop:

COMBAT
   ↓
GEMS
   ↓
GEM FORGE
   ↓
PLAYER BUILD
   ↓
NEW PLAYSTYLE
   ↓
DIRECTORS OBSERVE
   ↓
NEW CHALLENGES
Enter fullscreen mode Exit fullscreen mode

The engine adapts to the player.

The player adapts back.

That's where runs can start becoming genuinely different.


Turning a Bug into a Feature: Projectile Ricochets

One of my favorite parts of development came from a bug.

Projectiles could travel through walls.

The obvious solution was simply to fix collision detection.

But I liked another possibility:

What if hitting a wall caused the projectile to ricochet instead?

The bug became a mechanic.

And the mechanic eventually contributed to another Director.


Malus Director

The Malus Director can introduce temporary constraints based on what's happening during the run.

The demo version is intentionally limited.

The full version could eventually react to things such as excessive ricochets, extremely dominant builds, repetitive strategies or specific combinations of player behavior and Arena DNA.

But there's an important design principle:

A Malus should create an interesting problem, not randomly punish the player.

If a Director changes the rules, the player should have a meaningful way to respond.


Phoenix Director: The Engine Can Help You Too

Not every Director exists to make the game harder.

The Phoenix Director watches for critical moments.

Under specific conditions, it can offer a last chance through recovery, temporary upgrades or another special event.

Imagine surviving a brutal encounter with almost no health left.

The run appears finished.

Then Phoenix activates.

Suddenly, the player has one final opportunity to recover.

That's not just difficulty management.

It's dynamic storytelling through gameplay systems.


Pulse Director: Difficulty Needs Rhythm

Constantly increasing difficulty becomes exhausting.

So another Director manages something less obvious:

rhythm.

Instead of:

HARD
HARDER
HARDER
HARDER
IMPOSSIBLE
Enter fullscreen mode Exit fullscreen mode

the run can breathe:

CALM
  ↓
PRESSURE
  ↓
PEAK
  ↓
RECOVERY
  ↓
PRESSURE
  ↓
MAJOR PEAK
Enter fullscreen mode Exit fullscreen mode

This is the role of the Pulse Director.

It helps transform twenty waves into an experience with pacing rather than twenty increasingly large enemy groups.


ZlormaStyle Director: Giving the Engine an Identity

Early GameFall Arena builds looked exactly like what they were:

a prototype.

Flat backgrounds, basic shapes and functional UI.

The next step became creating a visual identity.

The ZlormaStyle Director is designed around futuristic arenas, metallic structures, luminous circuits, energy surfaces and a cyan / violet / magenta visual language.

Different arena identities can include concepts such as:

REACTOR DECK
CIRCUIT VAULT
VOID GRID
NEON FOUNDRY
Enter fullscreen mode Exit fullscreen mode

But the interesting part is making the visual style react to gameplay.

A run may transition through states such as:

FLOW
PULSE
FRACTURE
ASCENDANT
Enter fullscreen mode Exit fullscreen mode

The arena can therefore visually communicate what the engine is doing.


Wave Music Director

Sound follows the same philosophy.

Instead of looping one background track for an entire run, the Wave Music Director can change the musical atmosphere as the run evolves.

For example:

AWAKENING
MOTION
PRESSURE
PULSE
FRACTURE
HUNTER
ASCENDANT
OVERDRIVE
APEX GATE
ZLORMA FINALE
Enter fullscreen mode Exit fullscreen mode

Gameplay, visual effects and music can therefore work together.

And this leads to another goal:

GameFall Arena should be interesting to watch, not only to play.

That matters for trailers, gameplay videos and streaming.


Run Scars: Giving a Run Memory

Another experimental ZlormaEngine concept is Run Scars.

Important events can leave information behind.

For example:

Phoenix activated
Major damage event
Unusual combat strategy
Special arena event
Director intervention
Enter fullscreen mode Exit fullscreen mode

Other Directors can potentially use those scars later.

The run therefore develops something resembling a short-term memory.


ZLORMA SEED and the Run Signature

Each run can also receive a ZLORMA SEED.

But I want the concept to eventually represent more than procedural generation.

A complete run signature could combine:

ZLORMA SEED
+
ARENA DNA
+
PLAYER BUILD
+
COMBAT STYLE
+
DIRECTOR DECISIONS
+
RUN SCARS
+
SPECIAL EVENTS
Enter fullscreen mode Exit fullscreen mode

The goal is simple:

Every run should have an identity.


The Player's Double

This idea eventually led to one of the strangest systems planned for ZlormaEngine.

Under special conditions, the engine can generate a Double based on the player's run.

Not merely a visual clone.

The enemy is intended to represent an enhanced interpretation of how the player has been playing.

The challenge becomes:

Can you defeat a stronger version of your own playstyle?


Zlorma: When the Engine Becomes the Opponent

And then there is Zlorma.

Zlorma is intended as an exceptional enemy for highly skilled players.

If the Directors determine that someone is consistently dominating the normal systems, Zlorma can become the ultimate challenge.

Conceptually, it's the engine saying:

You've learned my rules. Now fight me.

This system is primarily intended for the complete version.


Demo vs Full Version

The current Zlorma Signature Demo is designed around approximately 20 waves.

That's intentional.

Ten waves proved too short to properly demonstrate adaptation and progression.

But the demo still doesn't expose everything.

System Demo Full
Level Director Limited Advanced
Arena DNA
Combat Analysis Advanced
AI Enemy Director Capped adaptation Continuous adaptation
Enemy Shapes Main families Hybrids + mutations
Gem Forge Limited Expanded
Malus Director Limited Contextual
Phoenix Advanced
ZlormaStyle Selected styles Full system
Wave Music Dynamic
Run Scars Basic Advanced
Player Double Teaser / limited Full
Zlorma Rare / teaser Advanced challenge
Generation ~20 waves Extended / potentially endless

The demo's purpose isn't to expose every feature.

It's to demonstrate the central idea:

The game reacts to your run.


What Makes ZlormaEngine Different?

ZlormaEngine isn't defined by geometric enemies.

It isn't defined by Python.

And it isn't defined by procedural generation alone.

The core idea is the Director Network.

                    PLAYER
                      │
                RUN ANALYSIS
                      │
        ┌─────────────┼─────────────┐
        ▼             ▼             ▼
     COMBAT          LEVEL         PULSE
    DIRECTOR        DIRECTOR      DIRECTOR
        │             │
        │         ARENA DNA
        │             │
        ▼             ▼
    AI ENEMY ◄────► ENEMY SHAPE
        │             │
        └──────┬──────┘
               ▼
             MALUS
               │
       ┌───────┴────────┐
       ▼                ▼
 ZLORMASTYLE          MUSIC
       │                │
       └───────┬────────┘
               ▼
            GAMEPLAY
               │
               ▼
             PLAYER
               │
               └──────────► NEXT ANALYSIS
Enter fullscreen mode Exit fullscreen mode

Every Director has a specific responsibility.

But their ability to exchange information is where things become interesting.


From Prototype to Adaptive Game Engine

ZlormaEngine started with:

Can I build my own game engine?

Then:

Can it generate arenas and waves?

Then:

Can it react to the player?

And now:

Can multiple Directors collaborate to dynamically direct an entire run?

That's the question I'm exploring today.

My goal isn't to compete feature-for-feature with massive general-purpose engines.

ZlormaEngine is an experiment around a more specific idea:

A game engine that doesn't just run the game — it directs the run.

GameFall Arena is the first playground for that idea.

And this is only the beginning.


🇫🇷 ZlormaEngine : construire un moteur de jeu adaptatif avec des Directors IA

Et si un moteur de jeu ne se contentait plus d'exécuter le jeu ?

Et s'il pouvait observer votre manière de jouer, analyser votre run et coordonner plusieurs systèmes afin de décider de ce qui devrait arriver ensuite ?

C'est l'idée derrière ZlormaEngine, le moteur de jeu expérimental que je développe pour Linux et Windows.

Tout a commencé beaucoup plus simplement avec GameFall Arena.

Un joueur.

Une arène.

Des ennemis géométriques.

Des projectiles.

Des vagues.

Puis une question a changé la direction du projet :

Au lieu de programmer chaque rencontre à l'avance, est-ce que le moteur pourrait diriger dynamiquement l'expérience autour du joueur ?

C'est ainsi qu'est née l'architecture des Directors de ZlormaEngine.

Qu'est-ce qu'un Director ?

Un Director est un système spécialisé chargé d'observer, d'analyser ou de contrôler une partie particulière de la run.

JOUEUR
  ↓
OBSERVATION
  ↓
ANALYSE
  ↓
DIRECTORS
  ↓
DÉCISION
  ↓
GAMEPLAY
  ↓
RÉACTION DU JOUEUR
  ↺
Enter fullscreen mode Exit fullscreen mode

La particularité de ZlormaEngine est que ces Directors sont destinés à communiquer entre eux.

Le Level Director peut comprendre l'organisation d'une arène.

L'AI Enemy Director peut analyser le comportement du joueur.

Enemy Shape Director peut sélectionner les familles d'adversaires.

Pulse Director peut contrôler le rythme.

ZlormaStyle et Wave Music Director peuvent accompagner visuellement et musicalement cette évolution.

Le moteur devient progressivement un réseau de systèmes coopératifs.


Level Director et Arena DNA

Le Level Director s'occupe de la génération des arènes.

Mais générer aléatoirement des obstacles ne suffisait pas.

J'ai donc commencé à développer Arena DNA.

SPACE       0.64
COVER       0.42
LANES       0.78
PRESSURE    0.57
ASYMMETRY   0.31
STYLE       ASCENDANT
Enter fullscreen mode Exit fullscreen mode

Arena DNA décrit les propriétés d'une arène.

Les autres Directors peuvent ensuite les utiliser.

Une valeur LANES importante peut favoriser certaines stratégies ennemies.

Une forte quantité de COVER peut influencer le choix des adversaires.

Arena DNA devient donc un langage commun entre les Directors.


AI Enemy Director : analyser la manière de jouer

L'AI Enemy Director peut observer la précision, les déplacements, les dégâts reçus, les combos, la cadence de tir, la distance de combat et le positionnement.

Mais son objectif n'est pas simplement :

Bon joueur = ennemis avec beaucoup plus de vie.

Je veux plutôt qu'il se demande :

Quel problème pourrait remettre en question la stratégie actuelle de ce joueur ?

Dans la démo, plusieurs comportements restent volontairement limités :

CHASE
INTERCEPT
FLANK
PRESSURE_LIGHT
Enter fullscreen mode Exit fullscreen mode

La version complète pourra aller beaucoup plus loin.

L'objectif reste cependant le même :

adapter le défi sans donner l'impression que le moteur triche.


Enemy Shape Director : quand la géométrie devient du gameplay

Les formes simples de GameFall Arena étaient initialement celles d'un prototype.

Elles sont progressivement devenues une mécanique.

○ Cercle   → Standard
□ Carré    → Tank
△ Triangle → Rapide / agressif
◇ Losange  → Tactique / distance
Enter fullscreen mode Exit fullscreen mode

La silhouette permet immédiatement au joueur d'identifier le danger.

À terme, hexagones, étoiles, élites, hybrides, mutations et formes procédurales rares pourront enrichir le système.

Et Enemy Shape Director peut communiquer avec Level Director et AI Enemy Director.

Ainsi, l'arène et ses ennemis peuvent être conçus ensemble autour de la run actuelle.


Gem Forge : le joueur doit pouvoir répondre

Le moteur s'adapte.

Le joueur doit pouvoir faire la même chose.

Les combats permettent donc d'obtenir des gemmes utilisées dans la Gem Forge.

COMBAT
 ↓
GEMMES
 ↓
GEM FORGE
 ↓
BUILD
 ↓
NOUVELLE STRATÉGIE
 ↓
ANALYSE DES DIRECTORS
Enter fullscreen mode Exit fullscreen mode

Chaque amélioration peut modifier la manière de jouer.

Le moteur doit ensuite comprendre cette évolution.


Transformer un bug en mécanique

À un moment du développement, les projectiles traversaient les murs.

Il fallait évidemment corriger le problème.

Mais plutôt que de simplement supprimer ce comportement, une idée est apparue :

faire ricocher les projectiles.

Cette correction est ainsi devenue une mécanique.

Elle a également participé à la réflexion autour du Malus Director.


Malus Director

Le Malus Director peut introduire certaines contraintes en fonction de la run.

L'idée n'est pas de punir arbitrairement.

Un malus doit créer une décision supplémentaire.

Dans la version complète, ce Director pourra devenir beaucoup plus contextuel et communiquer avec Arena DNA, Combat Director et les autres systèmes.


Phoenix Director : une dernière chance

Tous les Directors ne sont pas contre le joueur.

Le Phoenix Director peut détecter certaines situations critiques et offrir une dernière chance.

Une run pratiquement perdue peut alors devenir un moment mémorable.

ZlormaEngine commence ici à se comporter moins comme un simple générateur et davantage comme un metteur en scène du gameplay.


Pulse Director : créer un rythme

Une difficulté constamment ascendante devient rapidement fatigante.

Pulse Director permet plutôt :

CALME
 ↓
PRESSION
 ↓
PIC
 ↓
RÉCUPÉRATION
 ↓
PRESSION
 ↓
PIC MAJEUR
Enter fullscreen mode Exit fullscreen mode

Les 20 vagues de la démo peuvent ainsi former une progression plutôt qu'une simple succession d'ennemis toujours plus nombreux.


ZlormaStyle et Wave Music Director

L'identité graphique de ZlormaEngine repose progressivement sur des environnements technologiques sombres, structures métalliques, circuits lumineux et énergies cyan, violet et magenta.

ZlormaStyle peut utiliser différents états :

FLOW
PULSE
FRACTURE
ASCENDANT
Enter fullscreen mode Exit fullscreen mode

Le Wave Music Director applique une philosophie similaire au son.

La musique peut changer avec la progression de la run et renforcer les événements importants.

Le but est que GameFall Arena soit intéressant à jouer et à regarder.


Run Scars et ZLORMA SEED

Certains événements peuvent devenir des Run Scars.

Phoenix, événement majeur, stratégie inhabituelle ou intervention spéciale peuvent laisser une trace exploitable plus tard.

Chaque partie possède également une ZLORMA SEED.

À terme, une signature de run pourrait combiner :

ZLORMA SEED
+
ARENA DNA
+
BUILD
+
STYLE DE COMBAT
+
DÉCISIONS DES DIRECTORS
+
RUN SCARS
+
ÉVÉNEMENTS
Enter fullscreen mode Exit fullscreen mode

Chaque run pourrait ainsi posséder sa propre identité.


Le Double et Zlorma

Parmi les systèmes les plus expérimentaux se trouve le Double du joueur.

Le moteur pourrait utiliser les informations accumulées pendant la run pour générer un adversaire inspiré du style du joueur, mais volontairement plus puissant.

Le défi devient :

Pouvez-vous battre une version améliorée de votre propre manière de jouer ?

Puis vient Zlorma.

Zlorma représente un adversaire exceptionnel destiné aux joueurs capables de dominer les systèmes classiques.

Le moteur semble alors dire :

« Tu connais mes règles. Maintenant, affronte-moi. »


Une démo volontairement limitée

La Zlorma Signature Demo vise environ 20 vagues.

C'est suffisamment long pour commencer à percevoir les interactions entre Directors, tout en gardant certains systèmes volontairement bridés.

La version complète pourra libérer l'adaptation de l'IA, davantage de formes, les mutations, des interactions plus profondes entre Directors, le Double, Zlorma et une génération beaucoup plus étendue.

La démo doit avant tout faire comprendre une chose :

Votre manière de jouer influence la run.


Ce qui définit vraiment ZlormaEngine

Ce ne sont ni Python, ni les formes géométriques, ni les vagues qui définissent réellement le moteur.

C'est son Director Network.

Plus les Directors apprennent à communiquer, plus le moteur peut construire des situations cohérentes autour de la partie en cours.

ZlormaEngine est parti d'une question :

Puis-je créer mon propre moteur de jeu ?

Elle est devenue :

Puis-je créer un moteur qui réagit au joueur ?

Aujourd'hui, la question est devenue :

Plusieurs Directors peuvent-ils collaborer pour diriger dynamiquement une run entière ?

C'est désormais le cœur du projet.

ZlormaEngine ne cherche pas seulement à exécuter le jeu. Il cherche à diriger la run.

GameFall Arena n'est que le commencement.

Top comments (0)