2026-11-17 15:15:46 +01:00
2026-11-07 12:32:58 +01:00
2026-10-29 11:32:32 +01:00
2026-11-17 13:52:58 +01:00
2026-10-29 11:32:32 +01:00
2026-11-07 12:47:19 +01:00
2026-11-03 07:30:55 +01:00
2026-11-17 12:28:13 +01:00
2026-10-22 18:11:04 +02:00
2026-11-06 18:12:46 +01:00
2026-11-17 15:15:46 +01:00

c-evo-evo

Qt6/C++ port of C-evo, an open-source Civilization-like turn-based strategy game originally written in Object Pascal (Lazarus/Delphi).

Why C++/Qt?

  • Modern, actively maintained toolkit. Qt6 is cross-platform (Linux/ Windows/macOS), still receives regular releases, and has a much larger contributor/tooling ecosystem than Lazarus/FreePascal's LCL - easier to find help, IDE support, and third-party libraries going forward.
  • C++ is a closer semantic match than it looks. Object Pascal's classes, units, and manual-memory-management style map onto C++ far more directly than onto a garbage-collected or heavily-macro'd language would - most of this port is a faithful, almost line-by-line translation rather than a rewrite, which keeps behavior (and bugs!) traceable back to the original source instead of hiding a parallel reimplementation effort.
  • Qt already has the pieces the original hand-rolled. The original ships its own TButtonN/DPI-scaling/graphic-set machinery (ScreenTools.pas, CevoComponents) because VCL/LCL didn't give it what it needed; Qt's QPainter/QImage/high-DPI support cover most of that natively, so this port's Dpi:: namespace is a thin, mechanical adapter layer instead of a from-scratch UI framework.
  • Qt's class hierarchy mirrors VCL/LCL closely. TApplication -> QApplication, TButton -> QPushButton, TForm -> QWidget, and so on - the two frameworks grew from the same late-90s/2000s component-based GUI toolkit lineage, so porting a dialog is mostly a mechanical rename rather than a conceptual redesign.
  • One codebase, no Pascal-dialect split. The original already forks between Delphi and Lazarus/FreePascal (see Switches.inc) to support both toolchains; standardizing on one modern, single-vendor-neutral stack removes that whole axis of complexity going forward.
  • Native performance, no VM/interpreter. Same deployment model as the original (a single native binary), so none of the simulation-heavy game logic (map generation, AI turns) needed to be redesigned around a managed runtime's constraints.

Status

The game is feature-complete for single-player/hotseat play, ported incrementally:

  • widget/, media/ - Qt ports of the original's DPI-aware control and audio helper packages.
  • common/ - port of Packages/Common (generic utilities + dialogs).
  • ai/ - the AI plugin ABI + bundled stdai brain.
  • game/ - the game engine itself (perso/cevo/*.pas):
    • Database.pas, CityProcessing.pas, UnitProcessing.pas, CmdList.pas, Map.pas, Platform.pas, Music.pas, IPQ.pas, FileList.pas - fully ported (Qt::Core-only cevogame static library).
    • GameServer.pas (the game loop/server, ~4536 lines) - fully ported, including the whole client/server command dispatcher and the procedural random-map generator (CreateElevation/CreateMap/StartPositions).
    • Brain.pas, Messg.pas, Log.pas, Sound.pas - ported (loadable-AI-module bookkeeping, generic message dialog, debug log window, sound-effect playback via QMediaPlayer/QAudioOutput).
    • perso/cevo/LocalPlayer/ (the entire local-player UI: Battle, CityScreen, CityType, ClientTools, Diagram, Diplomacy, Draft, Enhance, Help, IsoEngine, KeyBindings, MessgEx, NatStat, Nego, Rates, Select, TechTree, Term, Tribes, UnitStat, Wonders) - fully ported, including every in-game dialog's real localized text (no placeholder English guesses left) and a full-text Help search. Help.pas is split across Help.cpp/Help.Prepare.cpp/ Help.Paint.cpp (it's ~2300 lines in the original) and renders real per-topic icons (advances/improvements/terrain/features/governments/ special units) plus embedded illustrations, not placeholder text.
    • Back.pas, Direct.pas, Inp.pas, NoTerm.pas, Settings.pas, Start.pas (the splash/AI-init/new-game setup screens) - ported. The "Start new game -> random map" quick-start page additionally exposes world-size up/down controls directly (an enhancement beyond the original, which only let you change world size via the in-app map editor).

Known, deliberate gaps (not planned unless someone wants to tackle them):

  • Real multiplayer (Network/'s TCP/IP relay) isn't implemented - only single-process/hotseat play works.
  • The in-game Help system's Credits page doesn't scan Graphics//Sounds/ for per-asset *.credits.txt files (a real filesystem-scanning credit roll in the original); the AI-credits and author/localization sections are intact. A couple of its cosmetic pixel effects are simplified too (the wonder-illustration watermark blend is a plain icon blit instead of the original's sky-detecting fade; the terrain-tile icon is a single representative sprite instead of 2-layer edge-blended compositing). Everything else in Help (advances, improvements, terrain, features, special units, governments, terrain jobs, search, and all the concept/quickstart/hotkeys/about hypertext pages with their inline links and illustrations) is fully ported.

Build

cmake -S . -B build
cmake --build build -j4

Useful options: -DCEVO_WITH_APP=OFF (AI plugin only, no Qt needed), -DCEVO_WITH_AI=OFF (app only, bring your own AI module, should be compatible with existing AI).

License

CeCILL 2.1.

S
Description
A C++ / Qt port of the Delphi / Lazarus game.
Readme
29 MiB
0 Stars 1 Watchers 0 Forks
Languages
Logos 65.5%
C++ 34%
CMake 0.5%