OpenCiv1 – open-source rewrite of Civ1 (github.com)

by caminanteblanco 73 comments 197 points
Read article View on HN

73 comments

[−] 1313ed01 48d ago

> The game is still very popular and easy to play. But the obsoletness of DOS

Nothing obsolete about DOS when it comes to playing 2D games. Thanks to DOSBox and other emulators (FreeDOS is also not bad though) it is a fantastic OS (or virtual machine). DOS as a platform for (2D) games has never been better than it is today, on modern hardware running DOSBox.

[−] thih9 48d ago

> Nothing obsolete about DOS when it comes to playing 2D games.

Until you want better graphics, network, touch support, etc, etc.

Some people may not want that; and there are workarounds, even in dosbox itself; still, they are just that.

The page lists similar plans in FAQ: “To add additional functionalities (features) to the game (like online gaming, scalable HQ Grahics, HQ Audio, plugins, etc.).”

[−] rahorvat 48d ago
I'm the author of OpenCiv1 project. The main point of such project is to fix the bugs and to provide additional features. Also, there are multiple live discussions on Civ Fanatics Forums on how to modify Civ1. The people still have endless creativity for Civ1 and this is the way to give it to them :)
[−] Joel_Mckay 48d ago
86Box runs on modern MacOS, but is not very performant for games on ARM.

https://github.com/86Box/86Box

There are also patch sets available for modern PCs to support legacy MSDOS, and Windows 3.1/95/98/ME. Attempting to install/run on modern hardware will usually blue-screen without the workarounds. =3

https://github.com/JHRobotics/patcher9x

[−] _the_inflator 48d ago
What I like about DOSbox are its constraints and limitations.

Of course there plenty of good features missing but on the other hand that’s the point.

Why start in 2d when in reality you want a 3d game?

DOSbox is delivering constraints.

The demo scene died when the constraints were gone and all that was left was showing a movie. On a C64 for example there are no animations per se but maxing out technical prowess combined with design. If it matches optimally it will make you marvel otherwise not so much.

So there is no right or wrong only what do you want?

[−] aleph_minus_one 48d ago

> The demo scene died when the constraints were gone

The problem was in my opinion not that the constraints were gone, but the fact that the PC did not provide a very stable platform anymore on which you could do some crazy low-level optimizations.

[−] bzzzt 47d ago
Building stable software for all varieties of PC hardware was part of the challenge of course. Lots of demos had problems with all kinds of hardware varieties.

Lots of low-level optimizations also made their way into compilers that sometimes do a better job than a human. There's not much to be gained by writing everything in assembly which means it doesn't interest people as much as in the 90s.

[−] aleph_minus_one 47d ago

> There's not much to be gained by writing everything in assembly which means it doesn't interest people as much as in the 90s.

There is a lot to be gained from writing your code in a way that makes use of SIMD instructions. Also, a lot of things that you can write in assembler code is insanely hard to express in higher-level languages, so of course

- the compiler may implement some specific low-level optimization

- but the compiler can (in general) not easily change the programming language so that low-level programming tricks can (without "contortions") be formulated in the programming language.

I agree that if the compiler was "allowed" to change the (higher-level) programming language, too, by quite a lot, so that quite a lot of low-level programming tricks can be formulated or much better formulated in it, then I would somewhat agree that the advantages of low-level coding have become smaller.

But this is currently clearly not the case.

[−] killerstorm 47d ago
I bought some DOS games wrapped in DOSBox on GOG, and I'm not sure if GOG uses some bad version or bad config, but it's pain the the ass - you can't resize a window to be able to actually see something on 4k screen, no obvious way to switch to fullscreen and back, etc.

It's one thing to be able to emulate DOS games (something which worked 20+ years ago), it's another thing to offer reasonable ergonomics in a modern environment...

[−] 1313ed01 43d ago
I run the GOG installer, then copy the game files to where the virtual C: is for my DOSBox-X (in a git-repo). Then there is usually some small BAT script to write to launch the game (what is required can be figured out from the config GOG installed). I play all the games from within DOSBox-X, so I start that up in fullscreen and then run games as if running real DOS (from COMMAND.COM prompt).

It is of course possible to launch games from outside of DOSBox the way GOG does it, using host OS (non DOS) launch scripts and config for each game, but I prefer to have more like a virtual DOS fantasy console with all games installed. It also means DOSBox is fully self-contained, with no dependencies on the host OS. Once set up there is no maintenance. There is no code rot in DOS of course, so when something has been set up it will always work.

[−] malux85 47d ago
Yeah this is key - in order to get out of full-screen you have to find and navigate some some ini file, then its still doing the mouse capture thing, which I think is also a setting, but all this faffing about just to get it into a usable state is pretty user hostile

I want the window to be open like any other window, and the mouse pointer to work transparently in and out of it - like when I hover the mouse over the dosbox window, change the pointer but keep the same mouse speed, momentum etc

I think this would be really hard to do in an emulated environment, maybe even would require patching each game executable to get the mouse speed right (not sure?), the modern environment integration, like you say, is what Im after too

[−] badgersnake 47d ago
You can also run the original on an Amiga emulator (or an actual Amiga, like me).
[−] AtlasBarfed 48d ago
There is a win 3.1 port for wider screens that do box will run
[−] mmastrac 48d ago
This is a cool project, but the author should note that they _are_ likely creating a derivative version of Civ1 here. It might look somewhat different, but that's clearly just 16-bit (?) intel opcodes in a slightly spicier form.

It's very unlikely this sort of approach will end up with a copyright-free codebase, though it might be useful as a source for a cleanroom approach. The author shouldn't be discouraged -- lots of other recompilation efforts work this was as well, but it's a muddy place to be.

[−] rahorvat 48d ago
Well, the 'intel opcodes' are just a proof of concept. It was important, for me, to prove it could be done. If you look deeper in the available code there is already a bunch of code that has nothing to do with 'intel opcodes'.

On 'It's very unlikely this sort of approach...' I will say Why not?

The process of rewriting the code is that the one side is describing the functionality in details and the other side writes the 'clean' code. That's what I'm trying to do. The 'intel opcodes' describe the functionality, and I'm writing the clean code.

I believe https://en.wikipedia.org/wiki/Clean-room_design is the best practice in this situation.

[−] lstodd 48d ago
It is very likely that no one cares if anyone cares about copyright.

If someone do in fact care, I'm sure someone else can organize an online donation for them tissues those who care can cry into.

Otherwise please accept that Civ I is effectively public domain.

[−] miki123211 48d ago
Nobody cares until the original company wants to release a remaster in 10 years.
[−] lstodd 47d ago
Then everyone proceeds not caring like it happened with openttd recently. Or for example OpenXcom -- when those new-Xcom titles started appearing it changed exactly nothing.
[−] loganhood 48d ago
There are also some folks working on a similar project for Civilization 2. https://github.com/axx0/Civ2-clone
[−] rahorvat 48d ago
Yes, also a great project :)
[−] yitchelle 48d ago
While not exactly the same, there is also https://www.freeciv.org/
[−] ixv0 48d ago
Also worth mentioning is C-evo, even if it's not being developed further afaik

http://c-evo.org/

[−] boredhedgehog 48d ago
C-evo development shifted to forks, New Horizons and Distant Horizon.

https://app.zdechov.net/c-evo/ https://sourceforge.net/projects/c-evo-eh/

[−] aleph_minus_one 48d ago

> C-evo development shifted to forks, New Horizons and Distant Horizon.

What was the reason for this?

[−] PeterBBB 44d ago
The forks built with Lazarus in instead of Delphi, and are cross platform, Linux as well as Windows.
[−] culi 48d ago
- civ 1 --> OpenCiv1

- civ 2 --> FreeCiv

- civ 3 --> OpenCiv3

- civ 4 --> ???

- civ 5 --> UnCiv

[−] netbioserror 48d ago
I really wish the FreeCiv team would focus on their SDL build instead of all these fiddly and very fickle UI toolkits. They have an incredibly cool hex-based hybridized Civ 2/3 ruleset that might be the best of all worlds, IF it could actually start consistently on all systems. Drop GTK and Qt, clean it up, add some modern quality of life keybinds and UI info, make it the universal target.
[−] sehugg 48d ago
I really prefer the 2D pixel graphics of the original Civ. But the middle game can be a slog due to micromanagement, e.g. loading units onto boats. I would love to see a few tweaks, fixing bugs like disappearing units, and a stronger AI that doesn't have to cheat :)
[−] tigerlily 48d ago

> The game logic is Based on original DOS Civilization 1 game version 475.05 disassembly.

Love more details on how this was done and the translation to human-readable code.

[−] BirAdam 48d ago
This is a great idea. I do play Civ1 on my XT class machine (NEC V20 @ 10MHz, 1MB RAM, 64MB IDE, 256K Trident VGA, NE2000, Adlib) but the turn times are horrendous as this is a 1991 game being run on a 1982 CPU. Realistically, most people would have been playing on either a 286 or 386. Having the game available on modern hardware, I imagine it’d be far more enjoyable. I’ll give it a go.
[−] j45 48d ago
Emulators are ok
[−] indy 48d ago
Since this requires some files from the original Civilization how do people obtain legal copies of the game? It's not available on Steam or GOG

(Or am I being hopelessly naïve by asking such a question?)

[−] chocochunks 48d ago
You go on eBay or similar site and you pay for a used copy on floppy or CD-ROM. Then using the appropriate tool you back those files up and use them for OpenCiv 1. Cheap, no. Convenient, no. But legal.

If you're lucky you stumble across it in a thrift store that wasn't paying particular attention and assumed it was a puzzle or a board game.

[−] jstummbillig 48d ago
So: Yes, hopelessly naive.
[−] hdgvhicv 48d ago
I still have the floppies and manual in a box in the attic. Bit of a hoarder in that way I’m afraid.

Question then is do I need to find a floppy drive to obtain the files or can I get them elsewhere.

Of course who knows if the floppy’s still work. I remember having problems with my Star Trek 25th anniversary floppies around 1996ish, and today it’s 30 years later.

[−] caminanteblanco 48d ago
I mean from a legal perspective, original media is the only recourse. But if we expand the options we're willing to avail ourselves of, there's a lot of high quality backups online.

So far as I know, Take-Two Interactive is extremely lenient, especially since they don't offer any way to purchase Civ1 or 2

[−] haolez 48d ago
Can anyone give some hints on what made Civ 1 special compared to other classic entries in the franchise? Despite the nostalgia factor, of course.
[−] ixv0 48d ago
"OpenCiv1 uses .NET 8 and Avalonia UI framework" So.... way bigger filesize than the original game + dosbox running on a html server?

Nice exercise though, but I'll stick to the original.

By the way CivNet (civ1 + networking for Win 3.11) runs perfectly in Wine

[−] p0w3n3d 47d ago
I'm looking for similar colonization rewrite. FreeCol lacks that retro look and feel
[−] thomasmarton 48d ago
I'm commenting this blindly so apologies if I'm wrong, but if it's possible I'd try and compile this against .NET Framework 3.5 instead of .NET 8.

A lot of people (myself included) have XP/7 machines for retro games like Civ1 and I'd personally love to use that machine instead of my modern one to play the game.

[−] polski-g 48d ago
We got civ 2, civ 3, and civ 1.

But when will we get the greatest civ ever, civ 4?

[−] Tarks 48d ago
Is there anything similar for Civ IV? So many top tier mods break after a while due to the same memory issues.
[−] danielparsons 48d ago
I love how obsessed HN is with civilization. I put over 1000 hours into Civ 5 alone and was proud to beat diety (and then consistently beat diety). It's funny how many founders are big on civ. Zuck and Elon both apparently spent a lot of time during college on the series.
[−] port3000 48d ago
Nice one! Wish someone would make a browser based version a la Chronodivide's RA2
[−] krb5 48d ago
https://github.com/Solen1985/CivOne

Worth mentioning this one also

[−] leptoniscool 48d ago
Is there a similar project for Masters of Orion?
[−] wiseowise 48d ago
Looks like C# completely taken over gamedev.
[−] dvh 48d ago
Time to pimp up my throne room
[−] pugchat 48d ago
[dead]
[−] damotiansheng 48d ago
[dead]
[−] damotiansheng 48d ago
[dead]
[−] 0xkilroywashere 47d ago
[dead]