Giter VIP home page Giter VIP logo

brabudu / micropolis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dheid/micropolis

0.0 0.0 0.0 2.2 MB

Micropolis is the Open Source Release of the original SimCity source code. This is a Java version originally written by Jason Long and enhanced with modern features.

Home Page: https://www.daniel-heid.de/open-source-projekte/

License: GNU General Public License v3.0

Java 100.00%

micropolis's Introduction

Micropolis

Java CI with Gradle ko-fi

Micropolis is the Open Source Release of the original SimCity source code. This is a Java rewrite fork based on MicropolisJ by Jason Long, which was first released in Feburary 2013. MicropolisJ was functionality-wise almost equivalent to the TCL/Tk edition

The original game, SimCity, was developed by Will Wright. Don Hopkins released a GPL open source version named Micropolis as a part of the One Laptop Per Child (OLPC) program.

The forked version is Copyright (C) 2013 Jason Long ([email protected]). Portions Copyright (C) 1989-2007 Electronic Arts Inc.

Prerequisites

To install and run this game, you need to install the Java Runtime Environment. You can get Java from https://www.java.com/

For development, please install the Java Development Toolkit. I recommend OpenJDK. You'll find an installation instruction here: https://openjdk.java.net/install/

Running

The release archive comes with start scripts that ease the process of running the game.

Linux and Mac

Download the Tar archive of the latest version of Micropolis. x.x.x is the version number

(1) Extract the tar archive: tar xf /path/to/micropolis-x.x.x.tar

(2) Run ./micropolis-x.x.x/bin/micropolis to start the game

Windows

Download the ZIP archive of the latest version of Micropolis.

(1) Extract the ZIP archive by double-clicking on the file

(2) Double-click on micropolis.bat within the directory bin

Development

The micropolisj.engine package contains the guts of the city simulation. It has no dependencies on the front-end or any particular graphical system.

The micropolisj.gui package provides the user interface for the game. It renders the city, controls the speed of the simulation, and responds to event messages from the engine.

Building

A Gradle wrapper is included, so please just run

./gradlew build

to build the software and run the tests.

Localization

Unless you are an English speaker, you may like to run Micropolis in your own language. Micropolis is designed to be run in any language, but needs translators to provide the translated text to display.

If you want to translate the game to another language, please first determine the ISO 639-1 language code of your target language, e.g. for Spanish use es (lower case). A list of language codes can be found here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

  1. Fork the repository on GitHub and clone it locally.

  2. Create a copy of each property file in src/main/resources/strings and rename the copy according to your language code. This little bash code will help you:

    export language_code=es # change this according to your language
    find src/main/resources/strings -regex '.*/\([A-Za-z]*\)\.properties' -exec sh -c 'filename={}; cp $filename ${filename%.properties}_$language_code.properties' \;
  1. Translate the lines within the new resources bundles.

  2. Create a pull request.

File Format

Save files have the following format:

Offset Content
0x0000 History of residential levels (240 16-bit integers)
0x01E0 History of commericial levels
0x03C0 History of industrial levels
0x05A0 History of crime levels
0x0780 History of pollution levels
0x0960 History of cash flow
0x0B40 Miscellaneous values
0x0C30 Map data (by columns, west to east)

Releasing

To create a release, make sure that your GitHub API token with corresponding repository permissions exists in '~/.gradle/gradle.properties':

github.token=abcdef...

Update the version property in the gradle.properties of this repository.

Ensure that you included all the changes into the master branch.

./gradlew 

Then execute

./gradlew clean build githubRelease

to create a GitHub release from the current master.

micropolis's People

Contributors

dheid avatar dependabot[bot] 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.