Skip to content

Repository files navigation

About

CivOne Expanded

This repository contains the CivOne Expanded development branch maintained by Daniel Gimmer. It extends OpenCivOne with selectable graphics packages, localization, SVGA presentation, accessibility and debugging tools, optional Civilization II-inspired rules, and compatibility improvements while retaining the original save-game format.

Copyrighted Civilization data is deliberately not part of this source repository. A local installation supplies its legally owned files below resources/civ-dos, extracted original-language data below src/Resources/locales, and optional extracted graphics packages below resources/graphics/<package>.

Each graphics package may contain a units/manifest.json and 28 indexed PNG unit sprites. IDs 0..27 map directly to UnitTypeEnum; palette index 0 is transparent. The runtime loads the native 15×15 DOS or 30×30 Windows sprites, applies package-specific primary/secondary civilization colour indices, uses nearest-neighbour scaling, and falls back per missing file to SP257.

Automated sprite validation is provided in tests/OpenCivOne.UnitSpriteTests. It expects the three local packages original, civnet, and civwin-3x as described above. Pass the application directory as the first test argument or set CIVONE_RESOURCE_ROOT; a development checkout also discovers an ancestor resource directory automatically.

OpenCivOne (OpenCiv1) project is a Free and Open Source (FOSS) preservation effort and rewrite of the iconic Civilization game designed by Sid Meier and Bruce Shelley in year 1991.

If you like games, and want to preserve our gaming heritage, please support: The Stop Killing Games Campaign

The final source code for the game, according to the sources from MicroProse Software, Inc. is lost forever. The only copy that remains is the game prototype source code on Sid Meier's own IBM PC on which he designed the game (Video in which Sid Meier talks about his IBM PCs).

  • The OpenCivOne uses .NET 8 and Avalonia UI framework and is OS independent. It is currently compatible with desktops: Windows, Linux and MacOSX.
  • Windows OS Linux OS MacOSX OS

  • The game logic is Based on Original 1991 DOS Civilization game version 475.05.
  • The game is still very popular and easy to play. But the obsolescence of DOS or Windows 16-bit platform and the bugs that have never been fixed are hindering the popularity of the game. Original game bug(s) discussion page
  • The news, discussions about this project and release news are published regularly on Civilization Fanatics OpenCivOne Forum page
  • The OpenCivOne project in not affiliated or sponsored by Civilization Fanatics' Center, Microprose, Firaxis Games or Take-Two Interactive Software.
  • For contact purposes openciv1@yahoo.com public email address can be used.

Project reviews

Copyright considerations

The sole purpose of this preservation project is to provide a Free and Open Source (FOSS) code and resources to the game which is considered abandoned for at least 30 years since in that time the publishing company and/or its successor(s) that released the original game did not provide any updates or support and the successor publishing company is not selling that particular game for a least 20 years.

What this project will not do:
  • Copy any of the original game source code or it's executable code,
  • Copy any of it's copyrighted assets (graphics, music, etc.),
  • Copy or use any of the protected trademarks,
  • Associate itself with any of the companies that sell games.

The available source code and resources are not a full working copy of the game. To run OpenCivOne you are legally required to own your own copy of the Original game. This is the reason that not a single file from the Original game is included in this Repository as they are copyrighted.

Current status

The game is in working state, but you have to legally own the Original game (the .txt, .pic and .pal files have to be present).

The part of the game assembly code is emulated with Virtual CPU, and the rest of the code has been rewritten from scratch until all of the code is replaced with new copyright free code. The other resources (like graphics, music and text) will also be completely replaced with copyright free resources before publishing the complete game.

How to Contribute to this project

Anyone can contribute to this repository in accordance with these Contributing guidelines.

The more detailed current project roadmap is here.

Important! Before you write any bugfix, patch and submit any Pull Request, please, create an Issue first. Otherwise, you may be fixing the issue that has already been fixed or you are fixing the issue with the component that is currently being replaced.

Currently, you can contribute to this repository in one of the following ways:
  • By testing the game functionality and submitting Issues,
  • By rewriting the part(s) of the code from pseudo assembly language to native C# language,
  • By designing parts of a 'Default' Visual and Audio theme (which must preserve Original game appearance and feel as much as possible, SVG and MIDI/SoundFonts would be the best),
  • By designing parts of a 'Custom' Visual and Audio theme(s) (SVG and MIDI/SoundFonts would be the best).

Project milestones

The goal is to completely rewrite the code and fix the bugs (first stage), and port the code to a modern platform (second stage).

The more detailed current project roadmap is here.

Milestones for a first stage

  • Reaching the initial playability of the game (passed),
  • Rewrite of the game code, functionalities and features (in progress... only 14.1% of the code left to rewrite),
  • Test game functionalities for game fidelity and bugs,
  • Archive the game code.

Planned milestones for a second stage

What will change in the new version:

  • Porting to JS (or equivalent) + CSS + HTML web application which works online as well as offline (Online gaming, Multiplayer, etc.),
  • HQ Graphics (the new graphics will be as close as possible to the spirit of the original version),
  • HQ Audio (the new Audio will be as close as possible to the spirit of the original version),
  • Some text where appropriate,
  • Design (Map zoom functionality, some small updates, also some dialogues will be slightly different),
  • Multilanguage capability,
  • Multiplayer capability,
  • Cheat capability,
  • Plugin capability (can override rules, graphics and music/sounds).
What will stay the same:
  • Game rules and logic (except for established bugs),
  • Overall look and feel of the game.

Frequently asked questions

Q: Why did you use C#, instead of C and x86 assembly in which the Original game is written?

A: I have chosen C# because it's platform independent, secure, flexible, managed, popular, modern and API rich language.

Q: Why this rewrite takes so long?

A: This rewrite takes so long because the code is not simply copied (like when, for example, decompiled) which produces derivative work. The code is completely rewritten using creative process which of course takes time to complete and which (when completed) does not produce a derivative work.

To give you a perspective of the scope of the project there is an excruciating ~140,000 lines of assembly instructions.


Q: Why does the OpenCivOne differs, in some aspects, from the Original game?

A: There are numerous reasons:
  • Simply replicating all of the functionality to skip the DOSBox emulation to be able to run the game is not a good enough reason (for me) to start a project of this magnitude.
  • Copying the game Code, Functionality, Graphics and Audio would be considered a Copyright violation and that is prohibited by current Copyright laws.
  • To make the OpenCivOne available to anyone who wishes to play the game, and that means Copyright free Code, Graphics and Audio.
  • To add additional functionalities (features) to the game (like online gaming, scalable HQ Graphics, HQ Audio, plugins, etc.).
  • To make OpenCivOne platform independent, popular, appealing and easy to play, to the older, as well as to the younger public, as was Original game popular back in the day.

Q: Will OpenCivOne source code be identical to the Original game source code?

A: No. The OpenCivOne source code does not contain any of the original source code. The rewritten code performs the same function (as the original code does), but the code is completely different and under MIT license. MicroProse and its successors never released the original source code which remains protected under copyright laws to this day.


Q: Does that mean that the OpenCivOne will be completely different from Original game, like, for example FreeCiv?

A: Absolutely not, the goal is to keep all of the original rules and functionalities, as well as much as possible of the original Visual and Audio appearance.

Q: You know that Civilization 7 will be published soon, doesn't that make First Civilization game in the series completely obsolete?

A: Based on some stats, many people think that the first Civilization game offers as much fun as the other sequels do.

Q: Are there any additional or different keyboard shortcuts (apart from the default ones)?

A: Yes, these are additional keyboard shortcuts that you can use during the game:
  • Alt + D - Enable / Disable the Debug mode (previously, Shift-56)
  • Alt + P - Pause / Resume game
  • Alt + 1 - Show / Hide Screen 1
  • Alt + 2 - Show / Hide Screen 2
  • Alt + 3 - Show / Hide Screen 3
  • You can't scroll the map with Shift + NumPad keys, instead use Shift + Navigation Keys (Up, Down, Left, Right, Home, End, PageUp and PageDown)

Dependencies

  • .NET Core 8

How to run the release version of OpenCivOne

The files from the Release should be copied directly into installed and working Original game directory. The game can be run by running the OpenCivOne executable.

How to compile the code (.NET Core 8 SDK required)

If you want to Debug (or Compile) the code with VSCodium, Visual Studio Code or Visual Studio Community Edition, it is assumed that:

  • For debugging purposes you have installed Original game at 'c:\Dos\Civ1\', or at '~/Dos/Civ1/' if you are using Linux (be careful of uppercase files!). It is where its home directory resides (Images, palettes, text and save games are loaded/saved there, for now).
You can also compile with CLI method:

Current screenshots of the OpenCivOne game

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 8 Screenshot 9 Screenshot 10 Screenshot 11 Screenshot 12 Screenshot 13 Screenshot 14

About

Expanded OpenCivOne preservation rewrite with localization, graphics packs, SVGA and optional Civ II-inspired rules

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages