itch.io is community of indie game creators and players

Devlogs

Winter 2025 Engine Update

CyberVGA
A downloadable game for Windows

CyberVGA – Winter 2025 Engine Update

The last devlog introduced CyberVGA as a clean Mode 13h prototype. Since then, the project has transformed into something far more ambitious, far more technical, and far more temperamental. The engine now runs entirely under DJGPP + NASM in 32-bit protected mode, speaks fluent Mode X, performs all math in fixed-point, and includes several competing renderers that are slowly learning to coexist. Every subsystem is still in active development, and glitches continue to multiply without restraint.


A New Foundation: DJGPP + NASM + DPMI

CyberVGA has fully migrated to a protected-mode architecture using DJGPP and NASM. This shift brought a flat memory model, proper 32-bit registers, and the freedom to build larger data structures. It also brought the joys of DPMI: each forgotten selector becomes a lesson in destructive testing. C handles orchestration; NASM handles the sections where precision and cycle budgets truly matter.


Mode X Renderer: 320×240, Planar, and Proudly Temperamental

The engine now renders exclusively in 320×240 Mode X. This includes planar VRAM access, page flipping, and four-plane aligned drawing routines. The new pipeline is efficient on real hardware, but it retains classic VGA personality: a single off-by-one often sends entire columns sliding sideways, and missing a plane mask can turn the framebuffer into an unintentional avant-garde installation. These behaviors, while inconvenient, continue to provide valuable empirical data.


Fixed-Point Math: The 16.16 Backbone

CyberVGA now uses a custom 16.16 fixed-point math library for camera transforms, projection, movement, texture stepping, and raycasting. Several iterations have improved overflow management and division stability. Nonetheless, certain combinations of values still produce results that challenge both intuition and Euclidean expectations. Further tuning is ongoing.


Font Renderer

Text now renders directly into Mode X using aligned planar writes. The resulting glyphs are sharp and readable, though occasionally a VRAM plane fails to participate, lending the text a spontaneous “shadow” effect. While aesthetically interesting, this behavior remains under examination.


Quad Renderer

The quad renderer handles floors, ceilings, and general planar surfaces. It transforms vertices through the camera, applies fixed-point projection, and performs basic texturing. Its current behavior is academically intriguing: some floors stretch infinitely upward, others collapse gracefully, and some silently refuse to render until observed from the correct angle. Most issues arise from clipping and projection edge cases.


Geometric Wall Renderer

In addition to the raycaster, CyberVGA contains a true 3D geometric wall renderer. Walls are defined as extruded line segments and textured accordingly. While structurally coherent, the module exhibits several classical failure modes: inversion, disappearance, flattening, and the occasional wall that seems to exist only in theoretical space. These are being addressed.


Mesh Renderer and CVG1 Format

The custom CVG1 mesh format is now integrated. It supports fixed-point vertex data, UVs, normals, vertex colors, indexed triangles, and submeshes. The corresponding renderer performs camera transformation, clipping, and rasterization. In practice, some triangles render precisely, while others collapse into single pixels or slip out of existence entirely due to rounding behavior. Rasterization refinements continue.


True 3D Camera

The new 3D camera includes yaw, pitch, roll, near-plane handling, and both perspective and orthographic projection modes. Movement generally behaves correctly, though certain fixed-point edge conditions induce minor vertical drift during forward locomotion. This effect, while physically indefensible, is diagnostically helpful.


Raycaster

The raycaster remains the most mature subsystem. It relies on fixed-point, Bresenham favored DDA, per-column distance solving, and a NASM-based Mode X column drawer. It continues to serve both as a rendering option and as a reference model for validating the geometric renderer. When the two disagree about spatial interpretation, further investigation typically becomes necessary.


Current Status and Direction

CyberVGA now comprises a protected-mode toolchain, a Mode X renderer, a fixed-point math core, and a set of partially integrated renderers. All components are actively evolving, and the system presently contains more bugs than pixels. The next major target is a stable world slice: walls, floors, and meshes operating together under the same coordinate system with consistent projection logic. Performance and hardware validation follow.


Source Material and References

Current development draws heavily on established computational geometry and low-level graphics texts:

  1. Computational Geometry: Algorithms and Applications (Third Edition) – de Berg, Cheong, van Kreveld, Overmars.
  2. EGA/VGA: A Programmer’s Reference Guide (2nd Edition) – Bradley Dyck Kliewer.
  3. Geometric Tools for Computer Graphics – Schneider, Eberly.
  4. Mathematics for 3D Game Programming and Computer Graphics (Third Edition) – Eric Lengyel.
  5. Graphics Programming Black Book – Michael Abrash.
  6. Creative Technology Ltd. Manuals – Sound hardware documentation.

These works continue to guide CyberVGA’s algorithms, projection formulations, and VGA-specific behavior analysis.

Files

  • CyberVGA.zip 1.5 MB
    Aug 22, 2025
Download CyberVGA
Leave a comment