Hacker News new | past | comments | ask | show | jobs | submit login
KotCity – an open-source city simulation game written in Kotlin (github.com/kotcity)
130 points by kotcity on March 17, 2018 | hide | past | favorite | 51 comments



> 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.

The JVM is fast enough for Minecraft, it should be plenty fast for this. But if you ever do want to compile to native then Kotlin/Native would make a lot more sense than a rewrite in a completely different language.


> The JVM is fast enough for Minecraft,

That's debatable, the requirements for running a Minecraft server are quite big for what it does and it's very easy to make it lag.


Well, "fast enough" is pretty vague. But bear in mind that Minecraft has never seemed to care about optimisation. For the longest time it was still running Java 7 even when Java 8 with the G1 collector had been out for a long time, and improved performance quite a bit.

HotSpot has a pauseless GC these days from Red Hat and is getting another one developed by the Java team itself, so even Minecraft's very heavy use of GC should be ok (heavy, after the new devs "improved" Notch's code to use objects everywhere instead of passing coordinates in separate parameters).


So far the JVM + Kotlin have been very handy! The coroutines are really cool for doing async stuff and really easy to use.


Not sure if you're aware of http://cityboundsim.com/ ?

They're much further along and it is probably worth combining development resources towards that project instead.


I am aware of it... we have somewhat divergent goals. I seek more of a re-creation of "SC4-style" city simulator, without agents for all traffic and so on. I think the big difference between this game and Citybound is that I'm trying for more of a statistical / stochastic approach vs. an agent based approach. I think the agent-based approach was one of the factors that led to SimCity 2013 not being that fun.

Citybound is aiming more for the Cities: Skylines approach to traffic and simulation.

I'm a big city-builder fan and have tried almost every one I can get my hands on. Among myself and some others, there is the feeling that the SimCity series peaked at SimCity 4 and I'm hoping to recapture that feel. It seems that Citybound is going in a totally different direction, which is fine, but that's not the aim of this project.

I hope to play Citybound when it is released but I do not think this project is redundant.


I dig it. What are you guys looking for in dev involvement? How casual can I be and still potentially contribute? I'm an Android dev who has been looking at sinking his teeth into kotlin for a bit now.


As casual as you want... this is a side project for all of us. One of our other guys is an Android dev just using this for Kotlin practice. Drop on in, check out our code, suggest ideas, whatever tickles your fancy!

If you want stop by our dev chat channel on https://gitter.im/kotcity/Lobby and ask us questions or reply here if that works best.


Well,

Why not a modular approach then?

Make the "Backend" switchable.

I could image that we would see many different and interesting approaches!

PS: kotcity ist kinda a bad name, kot in German means excrement... So, basically shit city ;)


I agree with your theory that the agent-approach is flawed. I know Kotlin and I love the classic SimCity games so I'm gonna try and give the codebase a poke later.


Awesome! We have a good start but still need a lot of subsystems implemented. If you have an interest in SimCity stop on by our gitter channel and we can talk: https://gitter.im/kotcity/Lobby


Shameless plug: I'm working on a [Text GUI library](https://github.com/Hexworks/zircon) which has the option for isometric projection [like this](https://cdn.discordapp.com/attachments/205245036084985857/41...). It is completely decoupled from the backend (the simulation engine in your case) so if you are interested we can work together. I also work in Kotlin and I'm eager to put in some work to create a fun game. It also supports tilesets so you are not stuck with ASCII.


Just nitpicking, but this is not isometric, this is top-down oblique projection. Isometric is when all 3 axis are of equal length and separated by 120 degrees.


Apologies for being a massive dweeb, but i think that's some variety of oblique projection, rather than isometric: https://en.wikipedia.org/wiki/Oblique_projection


I think you're technically correct, but 'isometric' is also a pretty widely used non-technical term when describing video games which have some form of non-perspective 3D projection, even if the axes are unequally foreshortened.


This is as far as you can get with square based grids. :) We call it "top down isometric".


Who's "we"?


My team and me.


Very cool! If you could play this in terminal it would be awesome. We could be a good testbed for your ideas -- we have kept the simulator separate from the UI / display.


This is not a terminal emulator, but a text gui library. It works with swing or libgdx (you can choose), and soon it will have a web version as well.

Let's talk about this. Do you have a discord channel? If not we can use ours [here](https://discord.gg/CXsnmT)


We are all on gitter: https://gitter.im/kotcity/Lobby Stop on in!


Seems like bad news that the programming language it’s written in is one of the main selling points...


Maybe, but it seems this post is to spread awarness to try and get other people involved in the project, not to actually play it. In that case, the language choice would be a big selling point


Correct :) There are builds being released but the game is far from complete.


People don't really need another city sim. But a lot of people want something in Kotlin to mess around with.


Since Maxis has more or less been gobbled up by EA I don't think we will ever see SimCity4++, so I think we DO need another city sim.

There are a few in the works but I don't think any "carry the torch" of the SC4-style game.

SimCity 4 has such staying power, new mods and lots are still being created to this day! It outlived SimCity 2013 by far.

Cities: Skylines, Banished, Citybound are all fun in their own right but I don't see any as a proper continuation of the SimCity series. (ignoring SC2013)

As a bonus you can play around in Kotlin too!


What do you think SC4 has that Cities: Skylines etc doesn't?


> People don't really need another city sim.

Interesting you say that, meanwhile Cities Skylines is the only city sim game I know of that's come out in the last 10 years that isn't ruined by EA or a shitware Farmville clone.


> People don't really need another city sim.

Why do you say that? There's not really a ton of them out there compared to RPGs, FPSs, etc.


RPGs, FPSes have different themes and story, so there are a lot more variations. Plus many city sims can be modded.

You're probably right though. At the very least we could use more that aren't so traffic oriented. Maybe something with emphasis on pollution, agriculture, culture, utilities.


This.

And Kotlin might be the future language for Android.


With the Java interop such a high priority for the Kotlin team over at JetBrains, Kotlin is sneaking its way into all kinds of Java environments -- from LOB apps to APIs, Java Web Services, etc.

Java might be a little annoying to wield, but the JVM is actually quite nice.

Whomever at JetBrains put a premium on Java interop should get a medal, because it's a VERY low friction move to go from Java development to Kotlin. You can port your project one file at a time and the tooling is excellent.


That is a nice goal, but it remains to be seen.

I have dabbled with all major JVM languages, yet if it wasn't for Spark and now Android, no customer would allow us to use anything besides Java itself.

https://trends.google.com/trends/explore?q=java,kotlin,cloju...


FYI: Kot in German = excrements


Ha, reminds me of a juice booth/startup the other day at the tech fair named "Suja," which means dirty or obscene in Portuguese!


My favorite example is a popular German light bulb brand, Osram, which is also known in Poland. In Polish it means roughly "I'll put my excrement [on it]" :P


While we're at it, Italian cooking appliance brand Smeg invokes something quite different in English.


"The curve" - "Kurve" in German was my favorite learning German. Osram was close though :D


FYI: in Polish, "kot" means "cat". Also, Kotlin is a popular ketchup brand here (unrelated to cats though) :P


Take it up with the Kotlin guys :)


It's well hidden in there. Kot City though made me smile like some schoolboy :D


I think Kot in Kotlin is rather pronounced like the German "Kott" would. However I of course had the same association in mind when I saw the title.

It's hard to come up with names that are fine in all/most languages :)



lol nice however "Du hast Recht" is the proper translation alternative if you want to translate "that's right" -> "So ist es."


Fixed


This looks like a lot of fun to hack around with. I wonder if it can be ported easily to Android.


We've taken pains to keep the sim code separate from the view / presentation layer. If you want to jump in and help us make it dual platform we'd be glad to have you.

We are using JavaFX which has some kind of Android support via (http://gluonhq.com/products/mobile/javafxports/) or you could simply just ignore our UI and add a native Android one on top of our simulator.


From the README: "Happiness (available in separate branch)".


nice Kotlin demo! but calling a very basic 80s style simcity clone 'city simulation' is a bit out of time. change title?


It may be no Cities: Skylines but it's still a simulation of a city. Seems a fair title to me.


Yeah, bizarre criticism. Some of the most intricate games I've played are MUDs over telnet and many of their mechanics have never been matched by modern titles.

Doesn't mean they are less worthy games. The thought almost disgusts me, like only well funded projects can qualify for something as straightforward as a simulation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: