CivOne - An Open Source remake of Civilization 1

Thank you, I will look through the code and merge your pull requests.

Edit: For keyboards without keypad, I have created a patch. You need to run the CivOne setup and enable the "ENABLE (NO KEYPAD) ARROW HELPER" patch. I think this is less confusing than using the Home/End/PageUp/PageDown keys, as they are often located at illogical positions if you want to use them for diagonical movement.

Please let me know if this is okay for you, otherwise I might modify you code as an alternative for the arrow helper patch.

Edit 2: I have added the Meet With King option in the diplomat city menu, and added a disabled menu item colour.
A thing I noticed that you're probably aware of:
  • When you incite a revolt, you should see the soldiers marching into the city
  • I think the revolt option should be disabled for cities that have the Palace improvement
Edit 3: I've managed to implement opening a folder dialog on macOS, although I'm not really proud of the solution: I'm creating a bash script with a command line Apple script, which I then execute. It seemed to be the only way for now, but it feels really fragile.
Eventually I'm going to implement native OS calls to get the folder open dialog (like I'm using on Windows and Linux), but for now it works as it should. That means macOS builds are coming soon.

I'll try posting a new preview build this week.
 
Last edited:
A thing I noticed that you're probably aware of:
  • When you incite a revolt, you should see the soldiers marching into the city
  • I think the revolt option should be disabled for cities that have the Palace improvement

I wasn't aware. I will fix them and let you know when it's done.
 
I have merged your Home/End/PgUp/PgDown PR, as it works the same as in the original game.

I've made several changed myself yesterday:
  • Initial implementation of the PowerGraph screen
  • Barbarians can now handle sea transport units (Sail, Frigate, etc.)
  • Barbarians now have a chance to spawn at sea (Sail with 2 legions and a diplomat) and will attempt to land near a city
I'll try posting a new version on the website by Wednesday, and get some more work done before then.
 
I have merged your Home/End/PgUp/PgDown PR, as it works the same as in the original game.
Great, thanks. I will try and get the revolt fixes (no revolt with palace and troop animation) done tonight so they can go in too.
 
Great work on the diplomat functions, thanks for all the contributions!

I noticed that, if an AI Diplomat unit enters a city, the menu pops up. Can you add checking for human players, and otherwise make the diplomat either sabotage or delete itself?

I'm going to make a new build tomorrow. Here's a list of features/fixes (so far) since the last build (r1303):
  • Implemented: Initial Replay Data recording (Civilization destroyed data)
  • Implemented: Load/Save when civilizations were destroyed
  • Implemented diplomat function: Bribe units (by @hospital)
  • Implemented diplomat function: Steal technology (by @hospital)
  • Implemented diplomat function: Invoke revolt (by @hospital)
  • Implemented diplomat function: Meet with king (king diplomacy not yet implemented)
  • Implemented: Barbarian AI sea unit movement
  • Implemented: Basic Barbarian sea unit spawning
  • Implemented: Warning about Barbarian raiding party
  • Fixed: Trailing artifacts when enemy unit moves to an unexplored tile
  • Fixed: Do not show boat carge when moving
  • Fixed: Game crash when a city was destroyed during the game
  • Fixed: Order units in City View by internal ID (https://github.com/SWY1985/CivOne/issues/455)
  • Fixed: Correctly load wonders (by @axx)
  • Fixed: Correctly handle (regular) minus key
  • Fixed: Correctly handle Home/End/PgUp/PgDown keys as diagonal direction keys (by @hospital)
  • Fixed: If cursor graphics are missing, show built-in cursor
  • Initial PowerGraph implementation (accessible via Debug Menu)
  • Added Open Folder dialog for macOS
  • Added startup argument to create desktop shortcut on Windows
The new build will include Windows (32- and 64-bit), Linux (64-bit) and for the first time, macOS (64-bit).

Edit: Oops, I fixed the credits, thanks axx. :)

Edit 2: I've been working on an auto build script for releases. So far, the Windows and Linux versions can be built using a simple bash script on my server. The macOS script is not far off. That means it's going to be a lot easier to make new preview builds available for downloading.

The packaging scripts that I use to make new releases will also become available as tasks in Visual Studio Code, and I'll soon be updating the wiki page with fresh instructions on how to build, run, debug and package CivOne.

For the Linux builds, I'm currently making AppImage files. In a couple of days, I'm going to try building Snap and Flatpak containers as well, and eventually I also want to make .deb and .rpm packages, so everyone can use their favourite way of obtaining software.
 
Last edited:
Hey SWY, it looks great, but I should only get credits for load wonders fix, the rest I think is the work of @hospital. Great to see progress BTW.
 
I noticed that, if an AI Diplomat unit enters a city, the menu pops up. Can you add checking for human players, and otherwise make the diplomat either sabotage or delete itself?
Sorry about that. I just did a PR to fix it.
 
For the last few days I have been getting this error when I run the game from visual studio code

The preLaunchTask 'build' terminated with exit code 1.

If I say "debug anyway" it works ok. And the next time I run it's fine. Have you seen the same issue? I get it with Insiders Edition and the regular edition. I don't think I have changed anything but I would be interested to know if anyone else gets the same issue?
 
It probably has something to do with upgrading the tasks.json in VScode from version 0.1.0 to version 2.0.0. I've been getting the same error, but only on Windows. On Linux and macOS, everything works normally. I'm trying to figure out what's wrong, and if I'm not able to find anything, I'll roll back to version 0.1.0.

For those waiting for the preview build: I meant to release a preview version yesterday, but I'm still having trouble automating the creation of a macOS app bundle. I hope to get things figured out tonight. Sorry for the delay.

Edit: It appears to have been fixed. If the problem persists, please let me know.
 
Last edited:
It probably has something to do with upgrading the tasks.json in VScode from version 0.1.0 to version 2.0.0. I've been getting the same error, but only on Windows. On Linux and macOS, everything works normally. I'm trying to figure out what's wrong, and if I'm not able to find anything, I'll roll back to version 0.1.0./
That's ok. As long as it's not an issue I created.
 
Good idea, I'll do that on the next website update.

I've recreated the CivOne logo in Inkscape because I wanted a vector version of the logo, and I've created some variations. Which one looks best?

Edit: @hospital
I've added code to the DiplomatCity file to support establishing an embassy and investigating a city. I will finish the Intelligence Report code.
 
Last edited:
I have posted a new version (r1365) on the website. Changes since the previous release (r1356):
  • Implemented diplomat function: Steal Technology (@hospital)
  • Implemented diplomat function: Establish Embassy
  • Implemented diplomat function: Steal Technology
  • Fixed: Meet with King no longer opens the King screen twice
 
Please, don't call me boss. :undecide:

I've moved a couple of issues to alpha.2, so there's currently only 10 issues open for alpha.1: https://github.com/SWY1985/CivOne/milestone/1

This bug is pretty annoying, and it would be great if you could pick it up: https://github.com/SWY1985/CivOne/issues/448

Otherwise, you could pick any of these issues and I'll move it back to alpha.1: https://github.com/SWY1985/CivOne/milestone/2

The following issues seem to be the most logical to move back to alpha.1:
 
Back
Top Bottom