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

CivOne - An Open Source remake of Civilization 1

Discussion in 'Civ1 - General Discussions' started by SWY, Oct 3, 2014.

  1. hospital

    hospital Chieftain

    Joined:
    Feb 8, 2018
    Messages:
    61
    fire-eggs likes this.
  2. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    >This is the first build I have done for CivOne and I don't really know what I am doing so it's windows only and use at your own risk etc...

    OK, I'm stupid: how did you do it? I also have been making changes to CivOne and would like to release a EXE.
     
  3. hospital

    hospital Chieftain

    Joined:
    Feb 8, 2018
    Messages:
    61
    I used: dotnet publish --self-contained -c release -r win-x64

    Files created in: CivOne\runtime\sdl\bin\Release\netcoreapp2.1\win-x64\publish

    Are your changes publicly visible? I would love to have a look.
     
  4. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    >Are your changes publicly visible? I would love to have a look

    Sure thing - see my github repo
     
  5. hospital

    hospital Chieftain

    Joined:
    Feb 8, 2018
    Messages:
    61
    Thanks.

    Wow - how dodgy of me to leave this test code in:

    var g = new Graphics.ImageFormats.GifFile( _invadersOrRevolters[ii]);
    System.IO.File.WriteAllBytes($@"c:\temp\{ii}.gif", g.GetBytes());
     
  6. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    >I used: dotnet publish --self-contained -c release -r win-x64

    Excellent! Thank you! I learn something new every day!

    I've placed a "Summer Solstice" release in my Github project: https://github.com/fire-eggs/CivOne/releases/tag/20190621

    I've attempted to make Windows, Linux and OSX builds ... All standard caveats apply.

    And here are the changes made:

    - Caravans can build wonders
    - Martial law now impacts happiness
    - Don't display some animations if animations are disabled
    - Fix the size of some advisor messages
    - Fix building name in earthquake message
    - Typing first letter in menu entry will move to that menu
    - Fix drawing of mines
    - Some fixes to the Happy info tab in City screen
    - Fix bug where waking a sentry unit could give it extra movement
    - Correctly save unit sentry/veteran status to save file
    - 'Goto' can be stopped

    Planning on continuing to make fixes. If anyone can shed any insight on Computer Player AI, I'd really appreciate the help!
     
  7. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    Update: I made a major mistake with animations. If you turn off animations via the Setup (Shift+F1) menu, then you'll not get all the benefits of conquering a city. Planning to fix for the next release ...
     
  8. bagxri

    bagxri Chieftain

    Joined:
    Apr 15, 2016
    Messages:
    24
    hi to all,

    i have no sound, i try install it through setup menu.
    it is ask me to find the file for sound, i choose it but nothing happens.

    thanks
     
  9. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    According to https://github.com/SWY1985/CivOne/issues/359 , CivOne is using the .wav files from CivWin. Alas, I only have CivDos.

    In the worst case, you can use any .wav file you want?

    Setup will put them in the proper place if you browse to a folder containing .wav files.

    Here are the filenames required (copied from the source code, strip the double quotes and commas ...)

    "AIRNUKE.WAV", "ALEX.WAV", "CANNON.WAV", "CEAS.WAV", "ELIZ.WAV", "FRED.WAV", "GAND.WAV", "GENG.WAV", "HAMA.WAV", "LINC.WAV", "LOSE2.WAV", "MAO.WAV", "MONT.WAV", "NAPO.WAV", "OPENING.WAV", "RAMS.WAV", "S_BEEP.WAV", "S_LAND.WAV", "S_NUKE.WAV", "SHAK.WAV", "STAL.WAV", "THEY_DIE.WAV", "WE_DIE.WAV", "WINTUNE.WAV"
     
  10. Quintillus

    Quintillus Archiving Civ3 Content Supporter

    Joined:
    Mar 17, 2007
    Messages:
    6,240
    Location:
    Columbus
    It seems like SWY is already using a better method - when I download the latest version linked in the first post, it weighs in at 716 KB. Whereas Scott Hanselman's self-contained Hello World tips the scales at 13.1 MB. So the method SWY is using is 20 times as efficient, for a significantly more complex program.

    Maybe it does mean you have to have .NET Core already installed, but I suppose it's about tradeoffs. I'm old-school in that I'd rather install a framework once and not have it packaged with ten applications, but that does seem to be an increasingly common packaging method, and storage isn't as expensive as it was in 1991.

    Edit: The CFC Alert tool didn't show me the posts on the next page (after post #580). So this was written with incomplete knowledge. But it's cool to see you (hospital) and fire-eggs moving things forward!
     
  11. hospital

    hospital Chieftain

    Joined:
    Feb 8, 2018
    Messages:
    61
  12. hospital

    hospital Chieftain

    Joined:
    Feb 8, 2018
    Messages:
    61
    I didn't get an alert for changes to this page either. Strange.

    Hopefully SWY will appear again. I haven't done much for a while. I was thinking of looking at barbarian land spawning (https://github.com/SWY1985/CivOne/issues/478) but I am reluctant to start when I don't know if someone else is working on it?
     
  13. bagxri

    bagxri Chieftain

    Joined:
    Apr 15, 2016
    Messages:
    24
    thank you for your quick reply fire-eggs
     
  14. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    From my perspective, feel free! I've got a bunch of issues piling up in my repo, barbarian spawning is not on my short list.
     
  15. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
  16. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    My June 28 release has been posted - https://github.com/fire-eggs/CivOne/releases

    - All "don't show animations" changes from previous release undone due to problem
    of side-effects in animations-only code
    - Fix a crash loading Microprose saved game
    - Correctly save/restore veteran state for fortified-in-city units
    - Don't show the Caravan "keep moving" prompt if not needed
    - Prevent "Discoveries turns" line from vanishing in Trade Status display
    - 'Spawn unit' debug menu: units now listed in alphabetic order
    - City incite cost is now 50% if in disorder
    - You can now exit out of the "diplomat arrival" dialog box
    - Player Diplomat can now bribe enemy unit
     
  17. rehn

    rehn Chieftain

    Joined:
    Nov 18, 2007
    Messages:
    11
    Nice to see some action here on CivOne.

    Have done some work on CivOne, pending merge.
    Using ( optional)AStar algorithm for smart goto function:
    Land and sea units: E.G Trimarans can find its way out from a "lake" where the only exit is through a city/channel to the other "end of the world". Doing so without leaving land at the the end of turn.
    Air units can use goto to any position. The unit will find suitable refueling station on its way. ( including carriers ). If the route change, ( lost city/moved carrier). the route will be recalculated. ( todo: check if carrier is full )
    Units will, if possible, avoid foreign units. Despite this, if a unit encounters a foreign unit, it will exit goto mode.
    If destination is unreachable, "goto" command will be ignored.

    I took the liberty to replace the function CalculateContinentSize(). Had an old algorithm for that kind of work that I like to use..... :) The old code is still i place in case someone wants to compare.
    Todo: Add smart "goto" for AI units.

    Bug fixes:
    Had some trouble with the functions "DistensTo....()" at the "dateline". Wrote my own set. Todo: Use original function when bug is corrected.
    When a unit, in goto mode, with steps left, encountered a foreign unit, game got stuck. Fixed: exit goto when encountered a foreign unit.
    Corrupt map files: The RLE Encode() function was adding an RLE_ESCAPE after repeat count if RLE_REPEAT == repeat count .
    Very unusual event, but when it happened the stored map file was corrupted.
    Added missing "goto home" "g" for air units.
    Sometimes I got an exception when reading games saved by standard civ1. Some strange stuff with not existing fortified units in cites. Replaced exception with an output to log.
    Todo: Games saved by CivOne is not fully compatible with Civ1. Maybe we can ignore this.

    Things I would like to change from Civ1:
    Sea units lose remaining steps if entering a city.
    Land units can't "goto" and load itself onto a sea unit.

    Added info: This is my first work ever using C#. Might be seen in my coding style. I am also fond of Hungarian notation.
    Have had some problem with line endings, seems to have confused the merges

    You can find my released code at https://github.com/EnockNitti/CivOne If you want to try it out
     
  18. fire-eggs

    fire-eggs Chieftain

    Joined:
    Jun 19, 2019
    Messages:
    16
    Hey, EnockNitti! Good stuff! I'll take a look!

    >Sometimes I got an exception when reading games saved by standard civ1. Some strange stuff with not existing fortified units in cites.

    I think this is one of the items I fixed. I'll look for your log and let you know.

    >Todo: Games saved by CivOne is not fully compatible with Civ1. Maybe we can ignore this.

    I'm not happy about this - the CivOne save games can't be loaded with JCivEd either.
     
  19. rehn

    rehn Chieftain

    Joined:
    Nov 18, 2007
    Messages:
    11
    About the cost of moving units on railroad.

    Civ1: Cost of moving "by hand" on railroad i zero, by moving using "goto" costs the same as on road.
    Methink this is a bit inconsistent
    CivOne: Cost of moving "by hand" of "by goto" on railroad seems to be i zero in both cases.
    My question is: How do you think CivOne should work ?
    And how should the cost be for Ai ?
    The answers has consequences for the "smart goto" funktion.

    Your thoughts ?
     
  20. tjs282

    tjs282 Un(a)bashed immigrant

    Joined:
    May 19, 2009
    Messages:
    2,114
    Location:
    ...just here for the job/ handouts/ woman
    Even though @SWY appears to have put this project on a back-burner, IIRC, his original intention with CivOne was to reproduce original Civ(DOS), bugs and all.

    By that criterion, manual moves on rails should be free, whereas GoTo's on rails cost the same as a road. Similarly, the GoTo dateline-bug should also be retained, where e.g. Bombers (and ships?) fly (sail?) away from the dateline, when GoTo'd to a point just the other side of it.
     

Share This Page