1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Making a Clone of Civ II

Discussion in 'Civ2 - General Discussions' started by Prof. Garfield, Sep 9, 2019.

  1. Buck2005

    Buck2005 Prince

    Feb 27, 2009
    Of course, all potential changes, even definitely for the better, should be left for future versions. The first version should be an exact imitation of civ2. JPetroski is certainly optimistic about the possibility of increasing the civ2 gaming audience by new players who have never played this game. I prefer to think cautiously that the main target audience after all is the old players in civ2. There are quite enough of them.

    So, my question is purely theoretical in nature. The point is not only in the speed of movement of units. Namely, in the geometry of movement. Reducing the speed of movement by 2/3 in high latitudes will help simulate the realistic route of the Titanic, I agree. But let's say modeling the trajectory of the flight of nuclear missiles through the North Pole is unlikely to help ... The biggest error of the Mercator projection in civ2 is the incorrect transfer of the area of the territory. When Greenland is monstrous several times larger than India. The population growth of a city in civ2 directly depends on the number of squares that it can “process”. Of course, one can also make an artificial “crutch” here - by making special “highly profitable” resources for India. But, it seems to me that an excessive amount of “crutches” unnecessarily complicates the game.

    Once again, these are just theoretical thoughts, or, as we say, “bidding for the best parts over the skin of an as yet unkilled bear” ...)
  2. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff

    Aug 31, 2001
    At this stage, I would humbly suggest that keeping the initial clone very close to Civ2 mechanics without getting bogged down in monomania over minute details.
    We can later make mods and Lua upgrades to cover features to suit obscure Colonization fans and those who want to simulate climates, etc. ;)
  3. techumseh

    techumseh Emperor

    Mar 12, 2002
    in the frozen north
    Interesting...and way over my head. My 2 cents: keep it as simple as you can. Avoid 'mission creep' at all costs. Or you'll never finish it.
  4. JPetroski

    JPetroski Emperor

    Jan 24, 2011
    I'd say duplicating what can currently be done should be the first objective. Only after that could new things be added. But, it would be good to grasp at least what we eventually want so that things can be organized in such a way that adding stuff later is achievable... so, no "127" caps for anything... I think we need capacity for "darn near infinite" units, civs, terrain, improvements, etc. Even if we start with what the base game has.

    I just really want to see what Curt comes up with if we can give him a map 4x larger than now and infinite (or at least 999) units and civs to play with.
  5. FoxAhead

    FoxAhead Chieftain

    Sep 7, 2017
    Just don't ask and start doing. Then you will see the real scope of work. Be prepared for 2-4 years of work. Make it open source so if you drop it or pause for some time others who interested would continue the work.
    For inspiration, I always cite projects like OpenTTD or OpenXCOM as an example.
    OpenTTD was reverse engineered from 2003 to 2004 by single Swedish programmer Ludvig Strigeus. Later, the project became very popular and expanded.
    OpenXCOM was started at 2009 by one single programmer SupSuper from Portugal and later picked up by many others. You can read this little story and watch this cute visualization of version control system.

    Civ2 MGE/TOT is very simple Win32 application based on core Windows API with minimum external dependencies. So actually it should work on modern computers as long as Win32 will be supported. All technical problems running the game on modern systems are result of errors in code. It happens a lot in big projects. Also there are two main legacy dependencies: Indeo 4 for video and DirectPlay library import in XDaemon.dll. Both problems are easily solved.
    So for me the best way to achieve 100% accuracy in reproduction is to decompile the whole game and work with this codebase. My investigation showed that civ2.exe was build using Visual C++ 4.xx. Without optimizations and with debug info. Sadly, without debug symbols, so you have to guess what variables are responsible for what stuff. Catfish's resources help here a lot! You could clean this code and port it to new Visual Studio version. Later may be porting some parts to SDL.
    I already tried this total decompilation and with some variance it gave me about ~5000 procedures. About 10% didn't decompile at all because of stack pointer errors. After that I have to manually clean this results. Approximation is 10 procedures per day will give total 500 days. At this point I stopped.
    I use IDA Pro disassembler with Hex-Rays decompiler. I am a self-taught amateur. May be with some more knowledge especially Python scripting to automate decompilation process it will be easier. But not now.
    And yes, it all resembles walking in a minefield of law.
    1) IDA Pro is payed version and it costs a lot of money witch I don't want to spend just for hobby projects. So I do use pirated version. Blame me for that.
    2) Reverse engineering is always prohibited by developers in their agreements.
    3) Using original art is automatically falls under copyright issues. Here you can just provide alternative art with option of using original from owned copy of the game like other similar projects do.
  6. Prof. Garfield

    Prof. Garfield Deity Supporter

    Mar 6, 2004

    Thank you very much for taking the time to respond.

    I don't intend to decompile, fix, and recompile the game. Rather, I'll follow the OpenXCOM route and build from scratch in Lua. Well, not exactly from scratch. I'm hoping to find that most of the 'hard' work is done by the Love2d game engine, and I "just" have to tell it what to draw and implement the internal logic. An awful lot of the game has been investigated and documented over the years, so most of the game mechanics are known. However, the decompiling might prove a useful way to find out what some of the logic is, say for diplomacy. Or, maybe not, if it would be too hard to figure out what part of the code refers to what.
  7. Serutan

    Serutan Eatibus Anythingibus

    Feb 20, 2002
    Baja Arizona
    Good luck with the project. I think you're going to find the graphics part very, very tedious - I looked at a Love2d tutorial on YouTube and it gave the appearance you have to micromanage the display to get it to do what you want. The computer player is also going to be a big undertaking. I strongly suggest you start out single player only - Multiplayer is going to be a highly painful endeavor, and is not necessary to the basic functioning of the game.
  8. rhy

    rhy Chieftain

    I just came here to say, "DO IT!!!" I would LOVE a new version of Civ 2 with better graphics/art, online play (maybe with crypto wagering built in?), and massive multiplayer. Imagine a giant map with 100 internet players on it, winner take all.

    I'd also love a version I could play on Android when I'm stuck in the elevator.

    But in general, just having an exact clone gameplay wise of Civ 2 would be much preferable to all the newer versions that are just not as fun to play.

Share This Page