CivOne - An Open Source remake of Civilization 1

I'm not sure what happened, but it appears that something has gone wrong... all those files should be in the ./data folder. Can you manually move them and try to run the game again?
 
I submitted an issue on Github.

Otherwise the game runs well, keep up the good work!
 
2 SWY
I tried to move them, it asks me to overwrite, I answered YES.
The same error appears.

2 ColdRock

Too late, there are many motivational posts from Russia))))
 
@axx: Thank you for the bug reports. I will fix both bugs soon.

@ColdRock: Thank you for the motivation post :goodjob:

@deathfry:
Could you do the following: Open a command prompt, go to the bin folder and type
CivOne.exe > error.txt

This will output everything into the error.txt file, which will be in the bin folder. After that, please send me the error.txt file. It will help me find out what's wrong.
 
Well, there isn't to much in error.txt)))

Checking data files...
- Done, all files exist
Game Start

I rather copy to you data from the command prompt. It says something like (sorry for my translation)
unhandled exception: System.TypeInitializationException: the initializator type "CivOne.Common" gives an exception. ---> System.Reflection.TargetInvocationException: the adresser of initializer makes an exception ---> System.IndexOutOfRangeException: index out of range.

In original it looks like

Z:\Забавные картинки\civ\bin>civone.exe > error.txt

Необработанное исключение: System.TypeInitializationException: Инициализатор типа "CivOne.Common" выдал исключение. ---> System.Reflection.TargetInvocationException: Адресат вызова создал исключение. ---> System.IndexOutOfRangeException: Индекс находился вне границ массива.
в CivOne.GFX.Fontset..ctor(Byte[] bytes, UInt16 offset, Color[] palette)
в CivOne.GFX.Resources.LoadFonts()
в CivOne.GFX.Resources..ctor()
в CivOne.GFX.Resources.get_Instance()
в CivOne.Templates.BaseAdvance.SetIcon(Int32 page, Int32 col, Int32 row)
в CivOne.Advances.AdvancedFlight..ctor()
--- Конец трассировки внутреннего стека исключений ---
в System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
в System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
в System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
в System.Activator.CreateInstance(Type type, Boolean nonPublic)
в System.Activator.CreateInstance(Type type)
&#1074; CivOne.Reflect.<GetTypes>d__2`1.MoveNext()
&#1074; System.Linq.Buffer`1..ctor(IEnumerable`1 source)
&#1074; System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
&#1074; System.Linq.Buffer`1..ctor(IEnumerable`1 source)
&#1074; System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
&#1074; CivOne.Common..cctor()
--- &#1050;&#1086;&#1085;&#1077;&#1094; &#1090;&#1088;&#1072;&#1089;&#1089;&#1080;&#1088;&#1086;&#1074;&#1082;&#1080; &#1074;&#1085;&#1091;&#1090;&#1088;&#1077;&#1085;&#1085;&#1077;&#1075;&#1086; &#1089;&#1090;&#1077;&#1082;&#1072; &#1080;&#1089;&#1082;&#1083;&#1102;&#1095;&#1077;&#1085;&#1080;&#1081; ---
&#1074; CivOne.Common.get_GetPalette16()
&#1074; CivOne.IO.PicFile..ctor(String filename)
&#1074; CivOne.GFX.Resources.LoadPIC(String filename, Boolean noCache)
&#1074; CivOne.GFX.Resources.LoadFonts()
&#1074; CivOne.GFX.Resources..ctor()
&#1074; CivOne.GFX.Resources.get_Instance()
&#1074; CivOne.Screens.Credits..ctor()
&#1074; CivOne.Window.Init(String screen)
&#1074; CivOne.Window..ctor(String screen)
&#1074; CivOne.Window.CreateWindow(String screen)
&#1074; CivOne.Program.Main(String[] args)
 
Thank you, this helps me trace the bug.
I need to implement better logging and error handling.

I believe that you might not be using the English version of Civilization, is that correct? (some) international versions of the game have less fonts in the FONTS.CV file, causing an out of range exception. Currently, I have only tested on the English version of Civilization.
I will create a bug report on GitHub, but it will not be high priority. My focus is on the English version of the game and I might need some coding help to figure this out.

Here's the bug report.
 
Well, I have found an English version.
The game finally starts, but:

1. It still asks me to show the placement of the data files, could you fix it? To play from the box. Maybe it should detect where the program is situated and try to find the data files on level up in folder hierarchy? (like cd.. command in dos)
2. The game window. It is too small, is it possible to make it scale?
3. The second window - command promt window on the background. It will be better to get rid of it or minimize it to tray
4. After first move in the game, there comes out an error
https://s14.postimg.org/53mo4yk7l/civ_error.jpg
Hope it helps.
 
@deathfry

1. It is best to maintain the folder structure as it is in the zip file. That means, keeping CivOne.exe in the bin folder, let the data files exist in the data folder, ect. In the future, I might consider a different way of organising the files but for now it will remain as it is.
2. If you run setup (cmd > CivOne.exe setup) you can set the scale level. You can also manually resize the game window, or press Alt+Enter to go to full screen mode.
3. The command window will remain for the debug/preview versions. It might show important information if the game crashes. Once I start releasing full versions, I will disable the command window.
4. This bug has been reported to GitHub. It's because of the End of Turn event. For now, after moving, press the space bar to end the turn and you should be able to move your unit again.
I am already working on fixing this.

Edit: I mentioned that you can set the scale in the setup screen but this feature was not yet added. I have now checked in the code to do this, it will be available in the next build.
I have made plans to work on the game a lot this weekend, I hope to get most of these issues fixed: https://github.com/SWY1985/CivOne/issues
 
I have created a new binary for Windows. New features since the last build include:
  • Cities now build militia units every 10 turns
  • Game crashes when moving off screen have been fixed
  • Game crashes at end of turn has been fixed
  • Added scaling setting to the setup screen
  • Sidebar setting is now correctly loaded
  • Added .bat files to the root to launch the game, setup or the demo

Edit:
New version is here: http://forums.civfanatics.com/showthread.php?p=14426930#post14426930
 
Great job!
I rather write here than on GitHub ;-)

Well, the first pf all I want to say thank you for the bin file - nowaday it knows where all files are)))

All seems to be great, but the scaling on fullscreen makes the picture to pixelized - I know it is the game of 91, but do you plan to do something with that?

All other stuff, I think you know: no map is shown in the game, NO MUSIC ((( , no sounds, and, when I choose from menu Quit to dos - game just freezes on the last turn.
Thank you for keeping working on the game, I'm looking forward to play full game)
 
@deathfry

The pixelized thing is just how the game is. I can not upgrade the graphics to higher resolutions, but, in a future version I will add support for high resolution texture packs and for high resolution fonts. Don't expect that to be finished any time soon though.

- Mini map will be added some time this week.
- Sounds and music, again, are very hard to extract from the game files.
- The quit to dos crash is strange, it doesn't happen on my computer. I will try to find out why that happens.
 
My game also freezes when I choose Quit. I am running Windows 8.

Otherwise it runs just fine. Keep it up you are making good progress!
 
Okay, I have created an issue on GitHub, though I haven't been able to reproduce it yet.
Does it freeze every time when you choose Quit? What are the specs of you computer(s)?
Please, share any details you can about this, so I can reproduce it and hopefully fix it.

Thanks for testing. :D
 
I tried quitting one more time and it froze. But the next time I ran the game and tried it again it worked. Tried it at least 5 more times and again no problems, the screen doesn't freeze it just quits the game as it should. :confused:
 
Made a lot of progress today:
  • Added right click to move units
  • Implemented part of the city management screen
  • Fixed Quit to DOS dialog graphics
  • Implemented Revolution menu
  • Implemented fog of war, and added setting to reveal the entire world
  • Implemented picking up tribal huts (outcome always 50 gold for now)

I will focus on getting city management working this weekend, and try posting a new version on Sunday. Please, keep testing, keep reporting bugs.
This month is the 25th anniversary of the game, it would be nice to get the first alpha version finished this month.

Edit:
Finished the following additions:
  • Implemented Shift 5+6 cheat, to reveal/hide the world
  • Added City Info screen with working buttons to city management
  • Added City view screen, no citizens or buildings yet
 
I have created a new binary for Windows. New features since the last build include:
  • Move units by right clicking
  • Started implementing city management screen
  • Possible to choose production (Press C, units only) and instant buy (Press B, debug functionality)
  • Fixed Quit to DOS graphics
  • Added Revolution menu (still has a bug)
  • Implemented fog of war
  • Implemented Shift 5+6 cheat
  • Implemented tribal huts (outcome is always 50 gold for now)

Edit:
New version is here: http://forums.civfanatics.com/showthread.php?p=14429691#post14429691
 
I am just nitpicking but:
- can you speed up the movement of units somewhat?
- when you make a movement with a unit the fog of war is removed before the unit makes the move. It should be removed only after the unit has moved to a new tile.
- some units (like the bomber) should have a view radius of 2.

I honestly newer knew that you cold move units by right-clicking in Civ1. You learn something new every day. :cool:

I am really glad you are making such good progress and I wish I could help you with this but I newer fully understood object-oriented programming. Keep it up.
 
Top Bottom