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

    kirkham7 Chieftain

    Joined:
    Dec 22, 2012
    Messages:
    288
    Location:
    Hayward, CA
    Wow, that is awesome! I wonder what the game would be like on a map that large? Maybe we can double the amount of civs someday and have 14 instead of 7... But of course that would definitely be in our own file format, lol. :)
     
  2. hannurabi

    hannurabi Chieftain

    Joined:
    Aug 29, 2005
    Messages:
    173
    I confirm it works on Windows with Visual Studio 2013.
     
  3. darkpanda

    darkpanda Dark Prince

    Joined:
    Oct 28, 2007
    Messages:
    597
    Quite a nice job!

    Interesting that you tried bigger map sizes, but I believe some of the map generation parameters need tweaking in order to keep creating consistent shapes on bigger sizes: for example, the "map skeleton max length" to generate land mass is 64 for 80x50 maps. If you make the map 4x times bigger in each direction (that is 4x4 = 16 bigger in area) supposedly this max length should be between 4x and 16x larger...

    Makes me want to experiment with it :D

    But hell, no time right now...
     
  4. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    Thanks, I will continue experimenting with it in the future...

    I've got the game menu working! None of the menu items do anything at the moment, but you can open menus and hover over menu items. :D
    It's pixel perfect.

    Now I'll get to work on the sidebar. I will also add a new setting (optional) to move the sidebar to the right side of the screen.

    Edit: Sidebar implementation is finished.

    Edit 2: Here's a screenshot with the sidebar placed on the right side of the screen (just like Colonization):

     
  5. kirkham7

    kirkham7 Chieftain

    Joined:
    Dec 22, 2012
    Messages:
    288
    Location:
    Hayward, CA
    Wow, great work.
     
  6. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    Thanks kirkham7 :)

    I've started working on loading existing save files and the map overview. There's a bug in my code that loads the earth map. (FIXED) When I fixed that I will fix drawing the map overview and (DONE) add load games support (DONE, SORT OFF).

    Edit: Load menu work in progress: http://imgur.com/a/N6KlF
    The game will load save files from ~/saves/{letter}
     
  7. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
  8. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    Load game menu is finished. It's now possible to load existing save games from the load game menu. Currently, it only loads the map, and the resources are misplaced. Lots of work to be done, but it's a start.

    Update:
    I've translated darkpanda's implementation of the Civilization random number generator. (source [r23]: http://sourceforge.net/p/jcived/code/HEAD/tree/branches/dev/src/dd/civ/logic/CivRandom.java)

    Update 2:
    New random implementation works perfectly. The correct random seed is now loaded from save files and resources are placed at the correct position.
    Game load now loads the following game data: Player civs, custom player names, game turn/year, difficulty level, gold per player.

    Update 3:
    Started working on input box support, so you can enter a custom leader/civilization name, and later on, find out where the heck a city is.

    After that: Huts and terrain improvements.

    Update 4:
    Input box is working, not all characters are working yet... but you can enter any sensible name. Custom leader name is working, custom civilization name will be added soon. Irrigation/roads/mines are correctly loaded and shown. Still need to add railroads, fortresses and tribal huts.x

    Update 5:
    Goody huts have been implemented, and are correctly loaded from save games.

    Update 6:
    It's now also possible to choose a custom tribe name.
     
  9. Lord_Hill

    Lord_Hill Chieftain

    Joined:
    May 10, 2004
    Messages:
    15
    Location:
    London, UK
    Nice work, some impressive progress there! Also, I can confirm it compiles and runs nicely on windows 7 using msbuild.
     
  10. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    Thank you both for trying. :goodjob:
    Please, if you find any bugs, report them in Github, or in this thread.

    I've got the world map (F10) working, and... finally figured out the coast/river animations. They're working now. :D

    Edit: I've been able to test CivOne on a mac today, and it runs but doesn't display a window. Looks like I'm going to have to implement an alternative windowing framework for MacOS X.
    Cities, and their names, are now loaded from save files and displayed correctly on the game map.

    Edit 2: Started working on implementing Civilopedia. The menu items are all working, and the terrain articles show their icons.
     
  11. hannurabi

    hannurabi Chieftain

    Joined:
    Aug 29, 2005
    Messages:
    173
    If there's any 'dummy' work to be done, I could try to help you to get it done faster. I know C# and can read your code but I don't feel competent enough to mess with it yet.:D But for example I could fill templates with data from original game or maybe implement some simple functions or what ever.

    You talked about implementing modding API. Is it something you create after the game is done or is it integral part of the game engine?
     
  12. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    Hi Hannurabi,

    Thank you for offering to help, any help is greatly appreciated!
    It's difficult thinking of anything (simple) to do. Most data that needs to be entered has already been done. I've nearly got the files terrain/unit/advances data ready.

    One thing that needs to happen, that isn't too difficult thanks to Darkpanda and Gowron, is the calculation of land values. You can read all about it in this thread: http://forums.civfanatics.com/showthread.php?t=498532

    If you don't feel up to it, please let me know. I will pick it up.

    Another (simpler) task that needs to happen, are these screens: http://imgur.com/a/qLsxn
    You can have a look at the other screens to get an idea of how to make a CivOne screen. Feel free to pick up any of these screens.

    You can use Visual Studio for development, but when you make a commit in GitHub, please be careful not to commit the project file.

    There's one thing I doubt I will figure out soon... sound. I know how to create sounds on the fly, I know how to play these files, but I have no idea how the sound files are encoded. One day I will start with the PC speaker sound file, it's the smallest (and I hope simplest)... but at this moment I have no idea what to make of them.

    About the modding API. I'm designing the code with modding in mind. When the game is nearing completion (doesn't seem unlikely anymore), I will release some samples in various .NET languages (C#, VB.NET, F#) so even people who don't know too much about programming can figure out how to make a mod.
    But... I'm keeping modding in mind, it's the last thing I will be working on at this moment.
     
  13. darkpanda

    darkpanda Dark Prince

    Joined:
    Oct 28, 2007
    Messages:
    597
  14. darkpanda

    darkpanda Dark Prince

    Joined:
    Oct 28, 2007
    Messages:
    597
    You know how to play the CivDOS sound files??

    I would be really curious about that, if you care to elaborate.

    What I know is that all the xSOUND.CVL files are executable files that get plugged into CIV.EXE at runtime. I have already figured out the plugging mechanism, and thus that any xSOUND.CVL must respect a given interface - that means it must implement a list of functions that are used by CIV.EXE, and describe where each of these functions is in the file.

    The hard part is how each each xSOUND.CVL file does implement those interfaces in practice...

    I had started with with ASOUND.CVL, which I assumed to be the AdLib/SoundBlaster implementation, but in fact, starting with ISOUND.CVL may be easier to begin with.

    I am quite sure that they will all be very different, as each of them will contain device-specific instructions.

    Another interesting lead would be to go with GSOUND.CVL (which was delivered as an add-on in 1995 or 1996) and implements the CIV audio in General Midi: this would much more re-usable than other formats, in my opinion.
     
  15. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    No, sorry... I was not very clear. I know how to create sounds in memory and play them in C#. I have no idea about the Civilization sound files. :sad:

    Edit: Today I made a start on adding (optional) GTK support to CivOne, in an effort to get the game running on MacOS X. Now, the GTK version builds and runs on Windows and Linux, but it's very buggy. Once I get the GTK version working I will continue adding the other aspects to the game.

    Edit 2: The GTK version is very difficult to get running on MacOS X. I will not focus on MacOS X for the moment... maybe I will consider some native OS X windowing alternative later on. Need to get my hands on my own Apple computer somehow, but my wife will never allow me to buy one at the moment. :(
    The GTK version does run better on Linux than Windows.Forms, so, I will finish the GTK port for Linux.
     
  16. hannurabi

    hannurabi Chieftain

    Joined:
    Aug 29, 2005
    Messages:
    173
    I implemented the CityStatus screen ( the title part of it). However Visual Studio 2013 can't open the Project file anymore. So at the moment I can't work further.
     
  17. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    Good news everyone! I've optimized the GTK code, and now CivOne is also working on MacOS X. So CivOne is truly going to be multi platform. :)
    I've also implemented (empty) Civilopedia pages for City improvements and Wonders of the World.

    What's the problem with the project file? I have no problems opening it in Visual Studio 2013.

    Edit: I've added Units classes.
     
  18. hannurabi

    hannurabi Chieftain

    Joined:
    Aug 29, 2005
    Messages:
    173
    I redownloaded the project file and it works again. I tried to push the CityStatus screen but it gave me warning not to do it... so I didn't. Anyway you would likely reproduce the screen in few minutes.
     
  19. SWY

    SWY Chieftain

    Joined:
    Oct 3, 2014
    Messages:
    329
    Gender:
    Male
    Location:
    The Netherlands
    I'm new to GitHub, I've never working in a GIT team before. What warning are you getting? If I made a mistake in the project configuration, I would like to know. :)

    Thank you for trying.

    I've made a start on adding mod support. I will put a mod sample (for custom Civilopedia pages) online soon. I think that's when things will get interesting for other developers.
     
  20. hannurabi

    hannurabi Chieftain

    Joined:
    Aug 29, 2005
    Messages:
    173
    Oh nevermind. I think it's that you pushed new changes and that I'm not yet registered to github. :)
     

Share This Page