How daynz/gtavicecity works
Project type and purpose
• This is a reverse-engineered reimplementation of the GTA III/VC game engine (“re3”).
• It’s a full game engine: it loads original GTA assets (models, textures, scripts), runs game logic, physics, AI, rendering and audio, and produces a playable executable on multiple platforms (Windows, Linux, macOS, FreeBSD, consoles).
File structure
• Top-level: build tooling (CMakeLists.txt, premake5.lua, conanfile.py), configuration (.clang-format, CODING_STYLE.md), scripts, .github CI workflows.
• src/: all engine code, organized into subsystems (core, renderer, audio, collision, control/AI, animation, math, entities, modelinfo, objects, peds, vehicles, weapons, save, text, skel/platform, extras).
• gamefiles/: read-only data (textures, models, scripts) that the engine loads at runtime.
• res/: logos and splash images.
• utils/: helper tools (e.g., GXT text packer).
• vendor/, codewarrior/, autoconf/, cmake/: build system/integration files for various toolchains and platforms.
README for additional insights
• Two rendering backends: original RenderWare D3D8 or homebrew librw (D3D9, OpenGL, OpenGL ES).
• Audio backends: Microsoft MSS (via original DLLs) or OpenAL.
• Cross-platform skeleton layer (“skel”) abstracts windowing, input and platform specifics.
• Uses premake or CMake+Conan for building on multiple platforms/architectures.
Elements
• Blue = core subsystems (Collision, Animation, AI),
• Green = I/O (Resource Manager, Save/Load, Scripting),
• Orange = rendering/audio backends,
• Gray = platform abstraction.
Detail
• Break out major subsystems rather than lumping them; show Renderer split into “geometry submission”, “shader postfx (extras)”, “screen buffer”.
• Audio split into “collision sounds”, “music”, “radio”, “voice”.
• That Build System targets multiple platforms with different toolchains but same source tree.