GithubHelp home page GithubHelp logo

kotcity / kotcity Goto Github PK

View Code? Open in Web Editor NEW
480.0 33.0 23.0 12.93 MB

KotCity, an open source city simulator

License: Apache License 2.0

Kotlin 99.73% Shell 0.02% CSS 0.19% Dockerfile 0.06%
game kotlin economy city city-builder simulator city-simulator simcity

kotcity's Introduction

KotCity 0.49.4

Build Status Build Status

⚠⚠⚠ WARNING! WARNING! WARNING! ⚠⚠⚠

This is pre-alpha software with super obvious bugs, rough edges etc. In the spirit of "release early and release often", I am posting the code. This project is far from done but I prefer to get the code out there to be used by whomever. Disagree with the project? Fork it :)

Obligatory Screenshot

KotCity Screenshot

Gimme the Software!

Download pre-alpha builds for Windows, macOS and Linux.

Java 11+ is required. On Windows it will look for JRE and bring you to download page if you don't have it.

(note, on Ubuntu do "apt-get install openjfx")

New in this version

  • Fix for bad collision detection by @sabieber
  • Optimizations to pathfinding
  • Lots of new buildings :)

Known bugs

  • Railway navigation might be a little fluky, we are working on it.
  • All the other bugs :)

Unknown bugs

  • None

Next up!

  • Schools
  • Hospitals

What is KotCity?

KotCity is a city simulator written in Kotlin inspired by the statistical city simulators of old. This game aims to achieve a mark somewhere between SimCity (1989) and SC2000. Hopefully this mark will be hit and we can set our sights higher. The game will be fully supported on Windows, macOS, and Linux.

Quick Start

How can I change the code or work on the project?

View our Developer's Guide

API Documentation

Command line-flow

  • Install JDK 11+.
  • Clone the project.
  • Run Gradle using ./gradlew run.

It's easy to setting up the development environment. You can use either IntelliJ or other IDEs supporting Gradle, then import this as a Gradle project. Voilà, the project can be worked on.

The UI is done with FXML created with Gluon's SceneBuilder.

FAQ

Q: Why 2D?

A: This project is a lot of work already without having to worry about 3D modeling and so forth. One of my bottlenecks is art, so 2D is an easy way to sidestep that concern. Additionally, the actual "renderers" for the game are kept semi-separate from the simulation, so there's no reason why this couldn't turn into 3D later.

Q: Why Kotlin?

A: It has a lot of libraries (pick any random Java library...) It's pretty productive! Gee-whiz functional stuff baked in. Besides, if this project gets to a place where it's really awesome but just needs extra speed we can reach for that C++ or Rust book.

Q: Bedeutet "Kot" nicht 💩 in Deutsch?

A: Du hast Recht!

Q: Is it any good?

A: Yes!

Why Another City Simulator?

After many years of not seeing any new city builders descend that are satisfactory, I decided to take matters into my own hands. Why? SimCity 2013 was REALLY disappointing. Cities Skylines is fun, but it doesn't seem to scratch that itch that SimCity 4 does. Even though there are still patches and new content coming out for SimCity 4, it's definitely on life support. I looked around at a few of the city simulators available but it doesn't seem like anyone is really working on a modern version of SimCity.

Community

If you get stuck or want to suggest suggestions, you can discuss it in our topic on Simtropolis. Chat with the developers via Gitter.

Contribution

You can contribute buildings (see assets directory), ideas for the game, help with art and so on by creating issues or fork the repo and start to make pull requests.

Current Status

  • GPU accelerated graphics.
  • Map generation (simplex noise based).
  • "Perfect" A* pathfinding.
  • Zoning of residential, commercial, industrial, similar to SimCity.
  • Moddable buildings.
  • City saving and loading.
  • Data overlays for traffic, desirability, natural resources.
  • Multi-threaded engine that allows for speedy traffic / city calculations.
  • As-you-want map size (Can your PC handle 100km^2? Go for it!).
  • Power plants and coverage.
  • Dynamic economy where goods, services and labor are exchanged.

Future Plans

To make a game that "takes over" from SimCity 4. We have a loooooong way to go:

  • Bus stations.
  • Functioning rail :)
  • More types of power plant (hydro, wind, etc).
  • Create buildings that use resources under the ground (coal, etc).
  • Implement "module upgrade" system from SimCity 2013 (upgrades to power plants etc).
  • Improve graphics.
  • Obtain sound effects / music.
  • Add many, many additional types of buildings.
  • Add "mod manager" (think Steam workshop... SC4 has many mods but they really suck to obtain/install).

For a more detailed overview of whats planned see our roadmap.

License

This project is licensed with Apache License 2.0. This project includes icons by various graphic designers from the Noun Project.

kotcity's People

Contributors

almasb avatar carenajosh avatar chfzdn avatar kbtr avatar kotcity avatar moonpatroller avatar sabieber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kotcity's Issues

Consider Godot engine

Great initiative to build a city simulator. What do you think about using an existing game engine that takes care of the 'enginey' things, so you can focus on game mechanics and asset creation? E.g. the Godot engine hit a 3.0 milestone recently, and provides many features to speed up your development process and promote collaboration.

Document the game (aka PDF manual)

It would be nice to have a manual of the game in PDF, possibly shipped with the game as well with the option to launch it from th game itself.

Since at the moment (from what I understood) the game is a 1 person project I invite everyone who can to contribute to said manual and to add a "+1" if you like the idea.

Project status query

Hi,

This is a great project!

Based on the latest commit being a few years ago, it no longer appears to be in development. I was wondering if you are looking for a collaborator to continue development in this repository? If not, I'd like to create a fork and continue development there.

My plan is to:

  1. Upgrade the project to JDK / JavaFX 11+
  2. Migrate the architecture to the FXGL game engine, so I can develop kotcity alongside the engine.

Please let me know.

Thanks, Almas

Java related error while running ./kotcity.sh

I think I have all the necessary java packages installed. This is what I do to try to run kotcity:

myname@mynamepc:~/Downloads/kotcity-pre-alpha-0.49.2$ chmod +x kotcity.sh

myname@mynamepc:~/Downloads/kotcity-pre-alpha-0.49.2$ ./kotcity.

I get:

Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at kotcity.ui.LaunchScreenKt.main(LaunchScreen.kt:95)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 25 more

Any idea?

Autosave function?

It would be nice to have an option to enable autosave every X minutes (10?).

Move Repo to a Organization

Hello,

As part of decentralization, I will propose that the repository will be moved into @kotcity organization account. Yes, it's called kotcity. The repo currently sits on a personal account technically, this is proved by personalized profile info rather than streamlined profile view. Also, organization account benefits from more granular permissions, which will be needed in the future. It isn't nice to hide with personal account in the open source world or version control in general.

Sorry if I have mistakes. Thanks.

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.