- Notifications
You must be signed in to change notification settings - Fork85
City Simulation Game
License
GPL-2.0 and 3 other licenses found
Licenses found
lincity-ng/lincity-ng
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
https://github.com/lincity-ng/lincity-ng
LinCity-NG is a city simulation game. It is a polished and improvedversion of the classic LinCity game. In the game, you are requiredto build and maintain a city. You can win the game either bybuilding a sustainable economy or by evacuating all citizens withspaceships.
See the in-game help [F1] for how to play.
Note:For best results, follow the instructions included in your version of thesource. That is, consult your local version of README.md. Following instructionsfor a different version than what you are building can cause build failures.
SDL2 2.0.0 or later
SDL2_mixer 2.0.0 or later (with ogg-support enabled)
SDL2_image 2.0.0 or later (with png support)
SDL2_ttf 2.0.12 or later
SDL2_gfx 1.0.0 or later
PhysicsFS 2.1.0 or later (use stable, not development branch)
zlib 1.0 or later
libxml 2.6.11 or later (recommended 2.13.0 or later)
libxml++ 5.0
A C++ compiler supporting C++17 (such as gcc)
git
CMake 3.21 or later
LibXslt (with xsltproc)
gettext (optional)
Header files for allrun dependencies
If you use packages from your distribution, header files are often in separate
*-dev
packages. E.g. for zlib you may needzlib1g
andzlib1g-dev
.
To clone, configure, build, and install:
git clone https://github.com/lincity-ng/lincity-ng.gitcd lincity-ngcmake -B buildcmake --build build --parallelsudo cmake --install build # optional
To create a package (currently tar.gz and zip):
cmake -B build -DCMAKE_BUILD_TYPE=Releasecmake --build build --parallel --target package
To run the game from the source directory without installing:
./build/bin/lincity-ng
When the game is installed, you may run it with:
lincity-ng
LinCity-NG 2.13.0 comes with a completely new load/save system that is,unfortunately, not backward compatible. (Some old code just needed to go.) Thegood news is all your hard work toward your super-city-utopia is not lost.
You can use the script located atcontrib/ldsv-format-convert/1328-to-2130.sh
in the source code (or/usr/share/lincity-ng/1328-to-2130.sh
on GNU/Linuxsystems) to convert your game to the new format. The script converts games savedwith Lincity-NG 2.12.x. And the script is likely to also work with games createdwith earlier versions if you had "binary saving" and "seed saving" optionsdisabled.
Before using the script, first make a backup of the games you want to convert:
mv ~/.local/share/lincity-ng/<my-lincity-ng-game>.gz{,.orig}
Then use use the script by passing the old game as standard input, and savingthe new game to standard output:
./contrib/ldsv-format-convert/1328-to-2130.sh \ < ~/.local/share/lincity-ng/<my-lincity-ng-game>.gz.orig \ > ~/.local/share/lincity-ng/<my-lincity-ng-game>.gz
If your game isvery old, you may find it in the~/.lincity-ng
directoryinstead.
If the script gives an error, then most likely the game was saved in a formatthat is incompatible with the script. To fix this, fire up a compatible versionof LinCity-NG (2.12.x recommended, but prior versions may work if"binary saving" and "seed saving" are disabled), and load then save your game.Once you do this, the recently-saved game should work with the script.
After using the script to convert your game, upon loading it with version2.13.x, you should not see any warnings in the console -- particularly warningsabout unexpected elements. If you see any warnings, then pleasereport theissue and include the fileyou were trying to load. Such warnings could be indicative of critical errors inthe conversion script.
View the project on GitHub:https://github.com/lincity-ng/lincity-ng.
Report bugs and suggest features:https://github.com/lincity-ng/lincity-ng/issues.
About
City Simulation Game