• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

OpenCiv1 Project - Open source rewrite of the original Civilization 1 Game designed by Sid Meier and Bruce Shelley in year 1991

based on the code you already know it will be possible to add a plugin that changes the rules of the science discoveries tree?
Names of discoveries, names of wonders and unit types names?

With changes to icons and images in some graphics program it would be possible to create another game based on CIV1, taking into fact that in JcivEd you can already edit the capabilities of units.
 
Last edited:
based on the code you already know it will be possible to add a plugin that changes the rules of the science discoveries tree?
Names of discoveries, names of wonders and unit types names?

With changes to icons and images in some graphics program it would be possible to create another game based on CIV1, taking into fact that in JcivEd you can already edit the capabilities of units.
It's what I have planned for a project, but it's in long term plans. Current task is to restructure code and produce the optimized and bug free code.

I think that JCivED has the capability to modify CIV.EXE also, Discovery and Wonder names are in CIV.EXE, Unit names are partly in CIV.EXE and partly in .sve files.

Yes, the idea is to have different scenarios based on addon that you select, but it's a long term plan.

Cheers
 
Hi,
I would like to update everyone on my humble ;) progress.

The @Lord_Hill (some time ago) put the bug in my ear :) about different changes within CIV1 versions 1-5 so I was curious and spotted multiple changes.
I was also battling with accuracy of my assembly to C# translation. Especially in a complex statements like:
C#:
if (((this.oGameData.Players[playerID].Continents[i].Attack + local_4e) * 2 > this.oGameData.Map.Groups[i].Size ||
    ((this.oGameData.Players[playerID].Continents[i].CityCount + local_5c) * 6) + 2 > this.oGameData.Map.Groups[i].BuildSiteCount) &&
    this.oParent.Segment_1ade.F0_1ade_22b5_PlayerHasTechnology(playerID, (int)TechnologyEnum.Mapmaking) != 0)
{
    this.oGameData.Players[playerID].Continents[i].Strategy = 5;
}
Hm, did I transcribe that if statement right, did I put all and's, or's and parenthesis right?

Then I decided that perhaps the best way would be to have code for all of the versions, so I went to work some more on my Disassembler project
I have made very good progress but the progress is slow as I have set to implement something that doesn't exist, a working dec...iler for C.
The current status is that the Disassembler correctly reconstructs Control Flow Graph and major parts of code which is a great thing. As any modern IDEs, Compilers, etc. depend on it.
The next crucial step on which I'm currently working is to recognize 'if', 'for', 'while' and 'do while' constructs. And, then to correctly propagate var types.

In the field of decompilation there have been some great advances, but no one attempted 16 bit (yet!)
The Decompilation Wiki and Aloha mai kākou have been of great help on the topic and introduced me to some advanced techniques.
I have also tried Ghidra, but the resulting C code is even more unreadable (to me) than the assembly code :crazyeye:.

In the meantime the OpenCiv1 project is on hold as I would like to be able to compare codes for accuracy, and that depends on Disassembler project.
Also, I would like to implement CIV1 version 1 engine as well as version 3 and 5 game engines eventually.
The difference is introduction of some new concepts between versions 1 and 3 (very unhappy citizens etc.), and between version 3 and 5 the AI engine.

Please bear with me as I make this journey ;)

I reread the old CivOne thread with @SWY. I'm sorry that in the end he decided to abandon the project. He often changed libs and rendering engines which took most of his time and in the end he was spent with constant modifications of the existing code. I would like to avoid that.

That is why I decided to retrace my step to the original before I make next major translations and optimizations in the game engine.

I hope that you are not disappointed with the speed at which this is progressing, since, at first everything seemed to be really fast pacing... :(

Cheers
 
Last edited:
Back
Top Bottom