News
С-code evolution lessons and real-time architecture patterns from the ioquake3 project
Abstract
Modern compilers increasingly restrict code that could perform potentially dangerous actions. Experienced developers often look back with a smile on their old code, amazed at its shortcomings and how it ever functioned. On large-scale projects, such a look back can reveal all the flaws in the programming approach of past eras. This article examines the challenges of compiling and refactoring legacy code using Quake III (1999) as a case study. As a seminal title from the early era of 3D graphics accelerators, Quake III represents a kind of real-time system optimized for limited hardware, comparable to modern mobile or embedded devices. Its C open-sourced codebase, released as the ioquake3 project, now compilable for contemporary processor architectures, offers a unique approach to analyze compiler-driven code quality improvements. In this paper, we study the differences between the original code and the modern port code by clustering the changes in diffs between these projects. We also investigate how the game source code behaves under modern GCC with all warnings enabled. By categorizing compiler warnings and required fixes, we highlight patterns in unsafe practices and demonstrate necessary refactoring steps. Our findings aim to bridge historical coding practices with modern reliability standards, providing actionable insights for educators in C programming, maintainers of legacy systems, and developers interested in compiler-enforced code quality.
Keywords
Edition
Proceedings of the Institute for System Programming, vol. 38, issue 2, 2026, pp. 53-68
ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).
DOI: 10.15514/ISPRAS-2026-38(2)-4
For citation
Full text of the paper in pdf
Back to the contents of the volume