UNREAL CGA

286 / CGA / DOS / MODE4 ENGINE

What if Unreal had been released in the mid-1980s?

> ABOUT

Unreal CGA / Mode4 Engine

Unreal CGA is an experimental project that recreates the atmosphere and visual style of the 1998 game Unreal on MS-DOS computers, CGA graphics, and 286-class hardware.

This is not a traditional game port, nor is it simply a video played under DOS. It is a custom, independent system that combines animations, static screens, hotspots, text, panoramas, music, and simple game logic into a single cohesive experience.

The entire system is called Mode4 Engine, because its foundation is CGA mode 4 graphics — 320x200 in four colors. The name also reflects the fact that the project is no longer just a single program. It is a complete set of offline tools and a runtime that together form a functional engine for Unreal CGA.

Project origins

The initial approach to Unreal CGA was based on 3D Construction Kit 1 / Freescape. It was practically the only available way to create a 3D world using CGA graphics. On paper, it made sense: a ready-to-use editor, a built-in 3D engine, and the ability to construct levels from simple primitives.

In practice, it quickly proved to be a dead end. Building levels was extremely time-consuming, the editor had too many limitations, handling text and scenes was inconvenient, and proper music support was practically nonexistent. The project required much more control over visuals, audio, timing, sequencing, and custom data formats.

Over time, Unreal CGA stopped being an attempt to build a game “inside” 3D Construction Kit. Instead, a custom toolchain began to emerge.

At first, these were simple programs for displaying images. Then came slideshow systems, GIF handling, custom animation formats, and eventually a full game runtime. This evolution led to the current Mode4 Engine.

What is Mode4 Engine

Mode4 Engine can be divided into two parts:

  1. Offline pipeline
    A set of tools that prepare graphics, animations, panoramas, and game data before the program is run.
  2. Game runtime
    The actual DOS engine that plays back prepared data on CGA hardware and handles interaction, music, text, save/load, panoramas, and scene transitions.

The key principle is simple: heavy processing is done offline. The runtime on a 286 should not waste time on complex image conversion. It receives data already prepared in a format very close to how CGA stores it in video memory.

This allows animations to be played efficiently and gives the system a real chance to run on actual old hardware, not just in an emulator.

Pipeline — from video to CGA

Source material is created outside DOS, but final conversion is designed specifically for the MS-DOS environment.

The general process looks like this:

AVI → BMP → GIF → A6P

AVI is split into frames, frames are resized to 320x200 BMP, reduced to four CGA colors in GIF format, and then packed into the custom A6P animation format.

Mode4 Engine uses several specialized tools:

These tools are not meant to support every possible format. They are intentionally limited to Unreal CGA needs. This makes them simpler, more predictable, and suited to DOS, Turbo C, and old hardware constraints.

A6P — the main animation format

The most important animation format in the project is A6P.

A6P is a simple container of full CGA frames. Each frame is already stored in a layout very close to CGA video memory. The runtime does not need to analyze colors, decode complex images, or perform expensive pixel transformations.

This approach is not elegant by modern standards, as files are not heavily compressed. However, for a 286 with CGA, simplicity, predictability, and playback speed are far more important.

In practice, A6P acts as a cinematic scene. The engine plays the animation, leaves the last frame on screen, then activates hotspots and waits for player interaction.

HOT and TXT — scene logic

Mode4 Engine is not just an animation player. Each scene can have its own logic stored in a HOT file.

HOT files control:

Text content is stored separately in TXT files and displayed as text boxes. This is a key part of the project, as Unreal CGA is not an action game. It is a more linear, atmospheric adventure where exploration, visuals, sound, and text build the experience.

Because creating a fast-paced shooter on such limited hardware — especially in an FMV-based format — is practically impossible, Unreal CGA takes a different approach: a slower, story-driven adventure experience.

The game preserves all narrative text elements from the original Unreal — including notes, messages, environmental text and written clues — which were used to convey the story in the original game.

In Unreal CGA, this aspect is significantly expanded. A large amount of new text content is added, turning the experience into a more story-driven, text-focused adventure.

Panoramas

One of the more important features of Mode4 Engine is panoramas — the ability to freely look left and right at specific points within a level.

A panorama is not a large scrolling bitmap. It consists of three parts:

The center is a single CGA frame, while the sides are stored as A6P animations. This allows panoramas to use the same playback system as the rest of the engine.

In the current version, panoramas are optimized for real 286 12 MHz hardware. A fully smooth version was visually better but too slow. The current compromise displays side animations faster, effectively skipping frames. It is not perfectly smooth, but it is more usable on real hardware.

Music and Sound Blaster

Mode4 Engine supports music in RAW format via Sound Blaster.

Audio is 8-bit mono PCM played through DMA with polling. This means the engine must regularly “feed” the audio playback. If any part of the code takes too long, music may stutter.

Therefore, audio update calls are critical throughout the runtime: during animations, panoramas, static screens, and UI rendering. This is one of the most challenging parts of the project, as any change to graphics, UI, or timing can affect audio stability.

The final version of Unreal CGA will also include a separate mini OST player featuring the original Unreal soundtrack.

Status bars, save/load, and game structure

The current runtime includes two status bars:

The project also supports save/load and a level structure based on subfolders such as L01, L02, etc. Game data is no longer stored in a single flat directory. The runtime operates within the current level folder and can switch between levels.

The game also includes startup screens, music selection, informational screens, intro, outro, final static screens, and a final options screen.

Why this is not just a video

Unreal CGA may look like FMV, but Mode4 Engine is not simply a video player.

The engine combines:

The player is not just watching a recording. They move through scenes, click interactive areas, read text, trigger transitions, and progress through a structured world.

The system is very limited and linear — but intentionally so. The project is focused on atmosphere, stability, and running on real legacy hardware.

Target hardware

Unreal CGA is tested not only in DOSBox, but also on real hardware:

Due to its FMV-style structure, the full game is expected to require approximately 4–5 GB of disk space. Because of this, DOS 7.1 and a single large FAT32 partition will be required.

This strongly influences all technical decisions. Many things that work fine in emulation are too slow or unstable on real 286 hardware. That is why Mode4 Engine is built around compromises: simple formats, limited palette, minimal runtime logic, and heavy offline preprocessing.

Summary

Unreal CGA began as an attempt to use an existing 3D tool, but evolved into a fully independent system.

Mode4 Engine combines an offline conversion pipeline with a DOS runtime. It prepares graphics, animations, panoramas, and scene data offline, and then plays them back in CGA mode 4 while handling music, hotspots, text, panoramas, status bars, save/load, and level transitions.

This is not a modern engine, and it is not trying to be one. It is a specialized system built with a single goal: to run an atmospheric version of Unreal in four-color CGA on hardware where such a project should not realistically exist.

The final version of the game will include at least 32 single-player levels from the original.

This is what Unreal might feel like if it had to run on a 286 with a CGA card and was released in the mid-1980s.

Planned release date: sometime in 2026.

CGA STYLE // 320x200 SPIRIT // MADE FOR THE OLD WEB