Coder Social home page Coder Social logo

p-mccusker / openloco Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openloco/openloco

0.0 0.0 0.0 10.04 MB

An open source re-implementation of Chris Sawyer's Locomotion

License: MIT License

C++ 99.03% CMake 0.49% XC 0.19% Objective-C++ 0.04% Python 0.19% C 0.01% Dockerfile 0.01% C# 0.04% Shell 0.01%

openloco's Introduction

OpenLoco

An open source re-implementation of Chris Sawyer's Locomotion. A construction and management simulation video game that simulates running a transport company.


Contents


Build Status

Windows / Linux Download
master CI GitHub release

Chat

Feel free to join our Discord server to talk about developing the game, or for help getting it to run.

Discord

1 Introduction

OpenLoco is an open-source re-implementation of Chris Sawyer's Locomotion (CSL). CSL is the spiritual successor to Transport Tycoon and OpenLoco aims to improve the game similar to how OpenTTD improved Transport Tycoon and OpenRCT2 improved RollerCoaster Tycoon.

Chris Sawyer's Locomotion was originally written by Chris Sawyer in x86 assembly, building on top of his RollerCoaster Tycoon 2 engine. Much of the code is 1:1 with RollerCoaster Tycoon 2. However, the engine has changed substantially enough that OpenLoco currently does not share its codebase with OpenRCT2.

Recent implementation efforts have focussed on re-implementing the UI, so that the data structures involved may be better understood. Once this is done, it is our hope the game logic will be easier to understand and implement.


2 Downloading the game (pre-built)

The latest releases can be downloaded from GitHub. Releases are currently provided for Windows and macOS (32-bit only). For Linux and BSD distributions, we currently do not provide any builds. Please refer to the next section to compile the game manually.

Please note that OpenLoco requires the asset files of the original Chris Sawyer's Locomotion to play the game. It can be bought at e.g. Steam or GOG.com.


3 Contributing

We warmly welcome any contributions to the project, e.g. for C++ code (game implementation, bug fixes, features) or localisation (new translations). Please have a look at our issues for newcomers.

For code contributions, please stick to our code style. You can use clang-format to apply these guidelines automatically.


4 Compiling the game

If you would like to contribute code to OpenLoco, please follow the instructions below to get started compiling the game. Alternatively, we have platform-specific guides for Ubuntu and macOS.

If you just want to play the game, you can just download the latest release from GitHub. Releases are currently provided for Windows and macOS (32-bit only).

4.1 Building prerequisites

Regardless of platform, the following libraries/dependencies are required:

Windows

Linux / macOS

  • cmake
  • make or ninja
  • 32-bit versions of the libraries mentioned above

4.2 Compiling and running

Windows:

  1. Check out the repository. This can be done using GitHub Desktop or other tools.
  2. Open a new Developer Command Prompt for VS 2019, then navigate to the repository (e.g. cd C:\GitHub\OpenLoco).
  3. Run msbuild openloco.sln /t:restore;build
  4. Run mklink /D bin\data ..\data or xcopy data bin\data /EIY
  5. Run mklink bin\openloco.exe ..\loco.exe or copy loco.exe bin\openloco.exe
  6. Run the game, bin\openloco.exe

Alternatively, building using cmake:

Note: The game can currently only be built for 32-bit architectures.

To install dependencies, you need to have vcpkg installed and in the root directory run .\vcpkg.exe install sdl2:x86-windows sdl2-mixer:x86-windows zlib:x86-windows libpng:x86-windows yaml-cpp:x86-windows breakpad:x86-windows

  1. Run mkdir build
  2. Run cd build
  3. Run cmake .. -A Win32 "-DCMAKE_TOOLCHAIN_FILE=<vcpkg_root>/scripts/buildsystems/vcpkg.cmake"
  4. Run cmake --build .

Linux / macOS:

The standard CMake build procedure is to install the required libraries, then:

mkdir build
cd build
CXXFLAGS="-m32" cmake ..
make

Running the game will need the data directory from the root of the source code next to the binary. Assuming you're in $SRC/build,

ln -s ../data
OR
cp -r ../data ./data 

5 Licence

OpenLoco is licensed under the MIT License.


6 More information

openloco's People

Contributors

aaronvangeffen avatar duncanspumpkin avatar marijnvdwerf avatar intelorca avatar janisozaur avatar petergaal avatar zehmatt avatar svelbeard avatar jgottula avatar gymnasiast avatar rwjuk avatar seifer7 avatar telk5093 avatar ceeac avatar zcooger avatar ethanhs avatar broxzier avatar krutonium avatar rdrdrdrd95 avatar kynake avatar panjacek avatar muizzk avatar gutheking avatar yetiwiz avatar transshipmentenvoy avatar sohamroy19 avatar smalljoker avatar sgielen avatar cookieplmonster avatar rctdude2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.