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. WildWeazel

    WildWeazel Yeah, well... Supporter

    Joined:
    Jul 14, 2003
    Messages:
    6,904
    Location:
    %CIV3%\Conquests\Scenarios\
    Popping in from Civ3 via Blake and I just want to say I'm following with great interest. It's really impressive how much you've managed to put together this quickly and with WinForms no less.

    I disagree with C/C++ though. Yes they've historically been dominant in both OSS and games but C# is the more popular language these days and much more approachable for would-be contributors. Between Monogame/XNA, Unity, and Godot, it's probably what the majority of amateur game devs are using.
     
    Blake00 likes this.
  2. Sub

    Sub in omnia paratus

    Joined:
    Jan 26, 2005
    Messages:
    601
    This is amazing.

    I don't think the programming language really matters for this sort of project. Whatever OP is comfortable with is more than fine.
     
  3. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    Anyone out here willing to start this thing anew in another engine? We need a pro to make a skeleton of this project, I would contribute as much as I can, but right now I'm of limited use beyond the comfy environment of Visual studio, at least in making this thing cross-platform.
    Tried setting this thing up in Mono with VScode weeks ago but gave up :badcomp:
     
  4. WildWeazel

    WildWeazel Yeah, well... Supporter

    Joined:
    Jul 14, 2003
    Messages:
    6,904
    Location:
    %CIV3%\Conquests\Scenarios\
    Have you looked at Godot? It's open source, cross platform, ideal for 2D games, and supports C#
     
  5. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    Heard a lot about it, I'll give it a look.
    EDIT: Was in contact with a few developers and yeah, Godot is the way to go. I'll try to port it over there eventually, if no one else does it.
     
    Last edited: Jan 5, 2021
  6. JPetroski

    JPetroski Deity

    Joined:
    Jan 24, 2011
    Messages:
    3,401
    I have a few thoughts here but perhaps they're best laid out by examining what some of my objectives were when Prof. Garfield brought this up a few years ago:

    1. I wanted to have a download I could legally host and point people to so as to keep the game alive with newcomers to it;
    2. I wanted to be able to replicate the base game for people who enjoyed the base game;
    3. I wanted to be able to port over scenarios that currently exist, and add new ones without limitations that are currently in the game (for example, the 7 civs issue).

    Basically, I wanted something I could legally distribute far and wide while not being inhibited by the catchphrase, "If we only had the source code."

    I'm just curious if you all share these aims or if you have different ones.

    It seems like you all are nailing #2 at the moment.

    If #1 is also important to you, you will need your own art. We have the most amazing Civ2 artists in the world at the scenario league forums. They work almost exclusively with ToT graphics.
    If #3 is also important to you, almost all of the active scenario designers use ToT.

    I would very, very, very highly suggest that at the very least, you offer a "toggle" for "use ToT-sized graphics." No need not to have MGE, but please also incorporate a ToT toggle of some sort.

    As an aside I too would share @Prof. Garfield 's concern about using something that can support lua, however... If you only would indulge one "ask" from me, and if I were forced to choose between redoing some 8,000+ (conservative estimate) graphics, or learning a new events language, I'd learn the new language.
     
    Knighttime and Blake00 like this.
  7. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    https://github.com/perbone/luascript (1st result on google)

    Civ limitations and stuff can be redone/undone. You have the source code. I'm not limited to 8 civs, I do a foreach loop in a List<civs> and don't really care how many civs there are.
    I'm not limited to any color palette (I convert MgE 8bpp graphics to 32bpp). ToT graphics are different sizes? Not a big deal.
    As for scenarios, I haven't touched them yet.
    TBH this started as a hobby project to get myself into c#, I have no idea for how long I'll keep going, I don't lack dedication as I love Civ2. But it would be nice to have people aboard or at least get this community together and make an open-source project where we could all contribute (including myself). If it happens I'll be happy to discontinue this and invest all my efforts there. It's important to have one central project in this forum than multiple smaller ones. That's whats happening with other OS clones (like Diablo 2), everyone wants to make his own thing in his own language/engine, but gives up at one point...
     
    Knighttime and Blake00 like this.
  8. JPetroski

    JPetroski Deity

    Joined:
    Jan 24, 2011
    Messages:
    3,401
    Well I'm hopeless as a coder but would be willing to contribute documentation or to build an "exclusive" scenario for this project to assist. If this really looked like it would see the light of day I'm sure you could get many people from the Scenario League who have talents other than coding to help as well. You've certainly gotten this far enough to prove the concept. I only wrote what I did mainly as a gentle reminder that there are 20+ years of manhours with great assets and resources to utilize available, but relatively few of it is in "MGE format." With that said I can appreciate the appeal of MGE and wouldn't want to discourage its availability. Just as a non-coder it's easy for me to say, "why not both?" :)

    Anyway - if a team is put together I'm willing to contribute time and energy to it in any way I am able that you think would help.
     
  9. Blake00

    Blake00 King Supporter

    Joined:
    Sep 24, 2016
    Messages:
    601
    Gender:
    Male
    Location:
    Australia
    I'm not a programmer either but yeah I'd wondered about that stuff too... One opensource fan game engine that supports both MGE and ToT graphics, features and content would be amazing! Even more so if it allows the removal some hard limitations hackers couldn't get around in the original games eg the 7 Civs limit. And being able to load MGE & ToT scenarios would be insane! It would likely encourage people to enhance some of them too (imagine your favourite scenarios expanded to allow more factions eg some of those big 4 map ToT scenarios that REALLY needed more than 7 factions).

    As suggested the game could be hosted and distributed online using fan created graphics to avoid any legal issues. Hell we wouldn't even need to create new ones as there's already so much out there, we could just pick an existing one and ask the authors permission (eg @Catfish is still around and he made some great ToT graphics packs).

    Then for those wanting the authentic original experience (eg it looks just like a clone the original game like what axx is doing atm), a 3rd party mod with either original MGE or ToT graphics could be hosted elsewhere separate from the main project. I've seen many fan rebuild projects avoid the legal issues by doing that. Officially they don't condone anyone playing their fan game with original graphics, but unofficially that was the intention all along haha.
    Hell depending on how the fan engine is designed people wouldn't even need a 3rd party original graphics mod hosted online. Since if the engine is built to load original MGE & ToT tile/city/unit sets gif/png/bmp files and GUI & other special stuff dll files from mod subfolders then it would just be a matter of fans copying their own original Civ2 files to a mod folder and the fan engine loading them up over the top of it's usual distributed (legally safe) fan graphics.

    MGE & ToT both load so much from mod folders but they of course don't load custom dlls from there meaning modders like myself that want to make changes to the GUI backgrounds/city view/throne room/videos/spaceship etc have to write big guides telling players how to backup and replace all their core vanilla Civ2 dll files. A Civ2 engine without that limitation built to load videos and ALL those extra dll files from a custom mod folder would mean that the original Civ2 graphics could be easily loaded by fans who own Civ2, while big total conversion mods with custom dlls and videos etc like my & @Metro Polis 's big Heroes of Might & Magic 2 Civ2 project (which will hopefully be finished and released in the next few months if I can get my act together lol) could be simply placed in a mod folder and loaded without any hassle (eg NOT having to swap around core Civ2 files).

    .
     
    Last edited: Jan 5, 2021
    JPetroski and Knighttime like this.
  10. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    For one thing FW/MGE & ToT have different intro screens. Which screen should "OpenCiv2" load at game start? Would there be an intro panel asking you which version to open? Or would the game load the MGE screen and you'd have a switch somewhere to redraw it into ToT screen (so you could switch between the two on the fly without restarting the game)?

    There's a couple of bytes in .SAV which tell you the version of game you're using. I'd like to experiment with opening a ToT save game. ToT .sav format is well documented on Catfish's site, is there anything similar for CiC/FW/MGE except those Word files made at the turn of the century? Would it be feasible to put it somewhere online, like on scenario league? I think I've found a couple of entries in .sav which haven't been documented before.

    edit: Opening ToT after all this years and my god is the intro screen ugly, it looks like something taken from a console on a Klingon vessel, as opposed to the clean interface on classic Civ2... what were they thinking...
     
    Last edited: Jan 6, 2021
  11. JPetroski

    JPetroski Deity

    Joined:
    Jan 24, 2011
    Messages:
    3,401
    Speaking only for myself, but I really don't care what the loading screens are. My concern is that most of the units drawn over the past 20 years are for TOT and that there are many larger "improvements" icons that only ToT uses.

    If I were to bet, most of the folks who would play this seeking the traditional experience would want the MGE experience. ToT wasn't very popular among anyone but those who enjoyed scenarios, and it was a hard road to get people to make the switch. So, I'd probably go with MGE as the default and ToT as the toggle.
     
    Prof. Garfield and Blake00 like this.
  12. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    What I do is load a SAV file and all the graphical assets (units, terrain, ...) and .txt files in that local folder. If some assets are missing, it grabs them from the root folder (where civ2 is installed).
    Like I said, there's a byte in .sav which tells you the game version. Based on that, if it recognizes ToT, it will adapt the drawing algorithms for e.g. larger units sprites. I'm not talking about scenarios, just single .sav files. I'll try to do that so that ToT files can be opened.
     
    Blake00 likes this.
  13. Blake00

    Blake00 King Supporter

    Joined:
    Sep 24, 2016
    Messages:
    601
    Gender:
    Male
    Location:
    Australia
    Cool!

    Yeah as @JPetroski said 'OpenCiv2' would be better set to 'MGE mode' as default (with an option to switch to ToT in settings) since that's the game that sold millions and is most know around the world. ToT was a commercial flop so only in the hardcore Civ community is ToT considered superior due to its graphical capabilities and more advanced scenarios. Users shouldn't need to switch between modes to load savs and scenarios though, it should only be a cosmetic intro vid and GUI setting. That way people could play ToT scenarios with the classic interface (which you could also do in original ToT) or MGE scenarios with the ToT interface if they prefer that one (which players can't do atm unless they covert their MGE save or scenario to ToT). I quite like the darker moodier ToT GUI these days however now that we're all rocking widescreens it's technically wasting more screen/window space than the old MGE one.

    Just in case anyone tasks all my suggestions the wrong way, I'm just brainstorming here. As obviously this is all just wishlist stuff that in the end it's up to @axx and other programmers what they wanna do, but its fun to fantasize about possibilities and how it could/should be done from a player perspective haha! :)

    .
     
  14. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,139
    Location:
    Ontario
    @JPetroski If you're looking for something to do to help, putting together a complete set of art would be very useful. Whatever is chosen about the programming language and engine, having a complete set of prototype art will make it easier to pass the code around to be worked on.

    @axx If Godot can integrate C# and Lua, then it would seem the obvious way to go. Without being able to integrate Lua events, we'll run into a problem where all the most innovative scenarios are 'stuck' on Test of Time, and designers will have to choose between the real civ and the clone for future work. In that sense, I place higher importance on having Lua as the scripting language than JPetroski does. If it takes a couple years to get OpenCiv2 working, then a bunch of people will have to choose between a more open base game, and their recent work. However, that would raise the question 'why not Freeciv'.

    I would suggest that it is important to have a proof of concept for Lua use. We need to be able to load code from an events.lua file, and execute that code at specified times, and use it to make changes to the 'game board'.
     
  15. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    OK. I'll try to set something up on Godot but yeah, I'm far away from implementing civ2 scenario events let alone dealing with Lua integration. I see you've provided a link getting started with Lua, I'll take a look at it.
    I'm still mostly doing work on GUI and I've figured this stuff quite well, in fact I'm finishing the map drawing stuff. Anyway the whole thing is still in a state where it can be ported to other environments/engines/frameworks.
     
  16. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,139
    Location:
    Ontario
    The way Lua events work is that at certain 'triggers', the game checks if there is any Lua code associated with that trigger, and, if so, runs that code (doing things like creating units, changing money, etc). In some cases, the returned value of the Lua code changes how the game works. For example, the onCanBuild event overrides the regular build menu options, and constructs the menu based on whether the Lua code returns true or false for each unit/improvement/wonder. Its this sort of 'functionality override' that I'm particularly concerned we could lose if Lua integration is inadequate.
     
  17. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,556
    Gender:
    Male
    Location:
    Innsmouth
    If I may be so bold...The proposed game would work best MGE's elegance coupled with TOT's innovations.

    When seeking to create a CIV2 clone, the politics of MGE zealots cannot be allowed to ignore game version improvements that came later.
    MGE looks like trash and is primitive. This is why 99% of scenarios are made with TOT. It might have been a flop, but it is the standard now.
     
  18. Blake00

    Blake00 King Supporter

    Joined:
    Sep 24, 2016
    Messages:
    601
    Gender:
    Male
    Location:
    Australia
    Agree with first paragraph.

    But as for the second, considering the line of conversation up until this point was lets support both MGE & ToT stuff in the clone so everyone's happy I'm not sure if a I'm gonna draw a line in the sand and call the other side political zealots post was really necessary Curt. It's just going to set someone off (not me as I like and use both MGE & ToT haha) and this thread doesn't need a MGE vs ToT argument hijacking for like the one millionth time on this forum lol!

    .
     
  19. axx

    axx Warlord

    Joined:
    Feb 19, 2011
    Messages:
    121
    I'm guessing you could make an open source civ2 game and have an IF statement where necessary (AI, UI, other game logic) to switch between Civ2 & ToT logic, depending on the e.g. SAV file version you open or the game version you choose to run from .ini file. Bigger changes would be needed in parts where both games differ more significantly (like scenarios), but overall it shouldn't be mission impossible to make one app for both games.
     
    Blake00 likes this.
  20. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,139
    Location:
    Ontario
    Is that much actually different between MGE and TOT in terms of game logic? I was under the impression that ToT just did more, and changed the graphics somewhat. As long as people can change the look of the game, it should be fine.
     
    Blake00 likes this.

Share This Page