News for hackers. Stuff that matters.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @12:28PM (#19584159)
Author of Citybound here! Feel free to ask me any questions about the project! I’m mostly active on the Citybound subreddit in general.

Also, check out the main homepage at https://aeplay.org/citybound for a more player-centric intro

Re:CityBound – An open source city simulation game in Rust by taneq on Friday April 05, 2019 @12:40PM (#19584334)
This looks awesome! My question, coming from a self-identified "C/C++ person" who works in realtime control systems and who's been feeling increasingly uncomfortable with C++'s inherent footguns, is how has your choice of language helped or hindered this project?
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @01:00PM (#19584582)
I had a nice comparison because I first tried to do a native implementation in C++ and - wanting to do some custom low-level "stuff" for my simulation actor system (related to allocation and networking) - I ran into so many footguns that it slowed me tremendously. As soon as I tried to do the same with Rust, it was a breeze and I was able to write a lot of unsafe code that does very particular things that I need, while exposing a completely safe API for the rest of the engine and game. Being then able to also use Rust in the browser quite seamlessly with WASM allowed me to have a super straightforward and high-perf communication channel between the simulation backend and browser UI. The only real Rust disadvantage that hurts a lot is compile times. Sometimes I do fight types/the borrow checker, but only when I try to do weird things, in general I perceive it as a huge help in scaffolding things.
Re:CityBound – An open source city simulation game in Rust by segmondy on Friday April 05, 2019 @03:44PM (#19586276)
Very nice, how did you decide on your simulation? did you build a generic simulation engine you can reuse, or is your simulation tightly coupled to the objects you are simulating? It's fun seeing this, I have been recently thinking of a simulation game and wondering if to use a generic simulation library such as SimPy
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @03:58PM (#19586415)
I build a simulation engine, based on a high performance distributed actor system library I wrote for just this purpose. It is generic, but a lot of the performance trade-offs are with Citybound's needs as the main driver.
Re:CityBound – An open source city simulation game in Rust by izend on Friday April 05, 2019 @05:54PM (#19587404)
I see you didn't use Actix or even Tokio, could you please explain why?
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @06:28PM (#19587621)
Their actor implementation / event loop works on a higher level than mine. Mine is super simplistic intentionally to offer high performance. Being optimised for cache locality, processing similar actors in batches, using custom allocators and having encoding-free communication, it has many parallels to data-driven game engine design or even entity component systems.
Re:CityBound – An open source city simulation game in Rust by izend on Friday April 05, 2019 @07:20PM (#19587969)
cargo +nightly run of the examples in your Kay project appears to be broken, I'd love to explore using it in a future project.
Re:CityBound – An open source city simulation game in Rust by 384028345 on Friday April 05, 2019 @09:22PM (#19588548)
First time I hear about compile times being an issue with Rust. Is that a general problem with bigger projects or can you identify language features that add specifically to the problem?
Re:CityBound – An open source city simulation game in Rust by felipellrocha on Friday April 05, 2019 @09:27PM (#19588561)
First compilation is slow. After that it’s much better during development times. This can mean that ci can take a ton of time if you don’t do even the smallest bit of optimization.

Otherwise, it’s a solid language choice. L

Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @09:37PM (#19588605)
As a point of reference "warmed up" compilation for me still takes ~1minute. Bearable for general work, horrible for quick tweaks or UI-related work.
Re:CityBound – An open source city simulation game in Rust by jeanmichelx on Saturday April 06, 2019 @10:25AM (#19590877)
I'm so jealous of software development tools.

Elaborating the hardware (systemverilog) I'm working on (about a year of work from scratch, nothing fancy) takes 8 minutes.

Re:CityBound – An open source city simulation game in Rust by jtms on Saturday April 06, 2019 @01:52PM (#19592022)
Wow, I get frustrated and feel unproductive if my feedback loop is longer than 2-5 SECONDS. This must require a seriously different approach to trial and error exploration
Re:CityBound – An open source city simulation game in Rust by dimfeld on Sunday April 07, 2019 @01:10AM (#19594953)
A lot of that is done in a simulator on the computer, which usually builds very quick once you get the environment and simulation scripts written.

The full build to a bit file that can be loaded into hardware is an NP-hard optimization problem, so as your design approaches the limits of either the desired clock speed or the amount of space in the chip, it can become very slow.

Re:CityBound – An open source city simulation game in Rust by jeanmichelx on Sunday April 07, 2019 @01:43PM (#19598467)
I wish. This figure is reloading the formal tool after a one line change in the RTL.

Placing (not routing!) takes around 24 hours since we need to run in a larger environment than just the block level to get realistic timing reports

Re:CityBound – An open source city simulation game in Rust by infogulch on Saturday April 06, 2019 @01:49AM (#19589472)
I've heard that long warm compilation times can be mitigated by breaking up code into separate modules so it doesn't recompile e.g. the actor system every time you adjust a layout. Basically caching works best on the module boundary. Is this something you've explored?
Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @11:02AM (#19591059)
Yes, I factored out quite a bit of generic parts of the engine into libraries and took some steps to cut down on number of generics being instanced (which was one of the main drivers of compile time). Now I'm left with pretty much the game core, which is highly interdependent and thus nearly impossible to break up into crates (they can't mutually depend on each other). And it's still kinda slow.
Re:CityBound – An open source city simulation game in Rust by z0mbie42 on Saturday April 06, 2019 @10:31AM (#19590907)
+1

I've splitted a 20k+LOC Rust project into multiple crates and compilation time improved a lot (still slow compared to other languages) but it's now manageable.

Re:CityBound – An open source city simulation game in Rust by Twirrim on Saturday April 06, 2019 @10:38PM (#19594442)
Really? It has been quite a talking point for a while with Rust. Final binary performance is great, but compilation times hurt badly.
Re:CityBound – An open source city simulation game in Rust by taneq on Monday April 08, 2019 @10:40PM (#19611269)
Thanks for your answers here, I'm definitely going to look more closely at Rust for my next project!
Re:CityBound – An open source city simulation game in Rust by Zecc on Monday April 08, 2019 @05:52AM (#19603683)
You might be interested in hearing what Chucklefish, the creators of Starbound, have to say about Rust::

https://www.reddit.com/r/rust/comments/78bowa/hey_this_is_ky...

https://www.rust-lang.org/static/pdfs/Rust-Chucklefish-White...

Re:CityBound – An open source city simulation game in Rust by neilwilson on Saturday April 06, 2019 @02:13AM (#19589531)
I see there is a bit in there about the city economy. Are you interested in expanding that to supporting a full monetary economy with employment, commuting and the like?

That certainly interests me - particularly how the pathologies of an economy like that emerge from individual actions - and I’ve been looking at Elixir to generate the necessary actor simulation engine. Looks to me like you have that here in Rust.

How could I get involved in helping to add a more detailed economy to this sim?

Re:CityBound – An open source city simulation game in Rust by microcolonel on Saturday April 06, 2019 @07:05AM (#19590210)
> ...and I’ve been looking at Elixir to generate the necessary actor simulation engine. Looks to me like you have that here in Rust.

I will caution that Elixir's runtime performance, particularly with simulation type code, is abysmal. Also, last time I was using Elixir, the available profiling infrastructure was really terrible; I had to buy a new workstation with 64GiB of RAM just to be able to fit the profiling artifacts from one iteration of our small model in memory, which was required in order for it to complete in less than infinite time.

Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @11:00AM (#19591048)
There is already a monetary economy with employment, commuting and purchases. One of the things I hope to do soon is to factor out some of the variables of the economy simulation to make it easier to mod without having to understand the full codebase. Then would be a great time for you to experiment with it.
Re:CityBound – An open source city simulation game in Rust by faitswulff on Friday April 05, 2019 @04:59PM (#19586981)
Is this your talk?

https://www.youtube.com/watch?v=LiIoE8ArACs

It was great, if so!

Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @05:19PM (#19587146)
Yes, that's me. Thanks!
Re:CityBound – An open source city simulation game in Rust by ncallaway on Saturday April 06, 2019 @02:15PM (#19592177)
It was a really great talk, thank you for that!

One direction that I've seen a lot of game engines heading in lately is the Entity Component System model for a lot of the same performance reasons (cache locality of data being the big one) that you've landed on the Actor model.

I'd be curious to know if you'd looked into the ECS model at all, and if you have how you view the tradeoffs between that model and the Actor model proposed in the talk. At a gut level, I get the feeling that your model seems much better suited to the distributed nature that you accomplish in your talk, and that ECS might be slightly more effective at allowing composition in an effective way. You've got so much more experience with both, though, that I'd love to hear you take if you've got one.

Re:CityBound – An open source city simulation game in Rust by partisan on Saturday April 06, 2019 @08:44AM (#19590453)
That is a really inspiring talk. I suspect I’ll be playing with Rust this weekend.
Re:CityBound – An open source city simulation game in Rust by Iv on Saturday April 06, 2019 @10:39AM (#19590945)
Really nice talk! And thanks for this, the actors architecture really talks to me. I am trying to find a distributed architecture that would make sense for a collaborative project I have and this could actually solve many of my problems. I had not considered that message passing could actually be very fast when done right.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @11:04AM (#19591069)
I'm really glad to hear that. Not many people know about actors and even less believe it can suit their problem.
Re:CityBound – An open source city simulation game in Rust by Iv on Saturday April 06, 2019 @11:02PM (#19594529)
Do you have a document/presentation or even source code where you go a bit more into details about how you share the actors states between different computers?
Re:CityBound – An open source city simulation game in Rust by rynop on Friday April 05, 2019 @09:57PM (#19588684)
Wonderful talk. Thank you for sharing this.
Re:CityBound – An open source city simulation game in Rust by lewis500 on Friday April 05, 2019 @04:09PM (#19586521)
Do you have a writeup of the traffic simulation rules that you're using? I peeked in the code and saw the intelligent driver model is being used for acceleration. I suppose you also have a lane-changing model and such, too.

Your architecture could be very useful in teaching.

Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @04:24PM (#19586653)
Yes, I also have a lane changing model.

What exactly would you like to see in a writeup? And which teaching setting do you have in mind?

Re:CityBound – An open source city simulation game in Rust by adanto6840 on Friday April 05, 2019 @11:57PM (#19589123)
Ah, I'd love to hear more about this! Getting traffic right is much tougher than we appreciated at first.

Disclaimer: Creator & lead developer of SimAirport.

I suppose we just did it "wrong" to begin with, and have since been stuck with the wrong graph / haven't put the time into fixing it yet -- but would be curious to hear high-level of how you're doing it.

Our issues are primarily that we did lanes as graph nodes instead of "node capacity" so our pathfinding prescribes precisely which lane to use; when stuck in traffic we can't intelligently find our way around it without pathfinding again, but then 'quality' ends up being correlated to how often we pathfind with node-occupancy info, which obviously is a poor (and poorly performing) solution.

Would love to hear your approach or if you'd be interested in talking shop at all, email is in profile! :)

Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @11:19AM (#19591156)
First time I saw SimAirport, looks wonderfully antsy!

I'd love to discuss traffic with you on the Citybound subreddit, since I think there might be other people interested in such implementation details :)

Re:CityBound – An open source city simulation game in Rust by Dowwie on Friday April 05, 2019 @07:19PM (#19587960)
University setting.

Many universities in major urban areas have a school of housing and community development. They study planning, policy, design, economics, and other related disciplines.

Once trained with how to create new models in your system, academics could simulate the impact of ideas they are developing in research.

Re:CityBound – An open source city simulation game in Rust by lewis500 on Saturday April 06, 2019 @02:01PM (#19592085)
I just thought it might be nice if you did a breakdown of the physics of traffic and maybe how you coded that part. As for teaching, I think it could be used to teach about like signal timing etc in a fun way.
Re:CityBound – An open source city simulation game in Rust by dnautics on Friday April 05, 2019 @10:03PM (#19588700)
Amazing work!

Your statement says that you have actor-based simulation model that's inspired by erlang - is there a reason why you picked rust instead of a BEAM language for developing the backend? My guess would be performance, maybe?

Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @11:29PM (#19589013)
Exactly. My actor system operates on much smaller, much simpler actors. See the sibling comment for my in-depth talk on it.
Re:CityBound – An open source city simulation game in Rust by corysama on Friday April 05, 2019 @10:47PM (#19588853)
Re:CityBound – An open source city simulation game in Rust by dnautics on Saturday April 06, 2019 @02:11AM (#19589527)
Rust is interesting to me but honestly, I'm going to stick to elixir because I have high confidence I can train juniors to code safely on it, and I have no particular need for performance (most of my stuff is iO or network bound)
Re:CityBound – An open source city simulation game in Rust by eggy on Saturday April 06, 2019 @11:09AM (#19591099)
Write NIFs in Rust, or C if you want to stay on the BEAM, and still get performance if you need it. Elixir/Phoenix are the Ruby/Rails of today. I do like getting low-level within the same PL, so this has truly inspired me to dig more into Rust. I am still playing with Zig though.
Re:CityBound – An open source city simulation game in Rust by jklinger410 on Friday April 05, 2019 @01:29PM (#19584971)
Interesting that I didn't see Cities: Skylines on the inspiration list. Intentional snub? Haven't played it? Just forgot? Curious.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @01:57PM (#19585298)
I didn't play it enough (yet) to feel comfortable putting it there, compared to the other things I listed as inspiration. I feel like it deserves a more in-depth comment/comparison. I've only watched let's plays of it so far.
Re:CityBound – An open source city simulation game in Rust by jklinger410 on Friday April 05, 2019 @02:37PM (#19585677)
You should check it out more! I love it. There are some similarities to the way your project is put together.
Re:CityBound – An open source city simulation game in Rust by zepearl on Friday April 05, 2019 @03:09PM (#19585959)
I like it as well a lot, but after several hours of playing with it I started focusing too much on some things that I consider core flaws of the game and now I'm not motivated very much anymore to keep playing... .

Examples:

- utility services: I keep having problems with e.g. ambulances or trash collectors that are spawned very very far from the area where they're actually needed, even if a hospital or incinerator is just around the corner.

- size of buildings: I don't like the approach of having tall buildings / high-rise in developed high-value zones by default. In my opinion the size of a building should mirror only the density of the population living in that particular area, so it should be possible to have as well tall buildings in low-value zones. As well the amount of people living in tall buildings is for my taste not a lot different from the one of med/low-buildings, taking into consideration the height of the building... => how tall is a building should be a function of the people inhabiting it and not related to the value of the zone.

- deaths/births waves: once my cities got big, I kept getting each time waves of people dying and later a lot of births. There is a plugin that fixes this, but this should really be part of the basic game.

- traffic: this is actually already working veeeery well on multiple levels (e.g. very nice/interesting to observe how queues generate - I can observe that for hours hehe) but I do miss a logic that says e.g. "if this section of street has during a certain timespan ~95% of space occupied by vehicles then assume that there is a queue => mark that section of street temporarily non-existing for non-involved vehicles so that other cars would start looking for alternative paths" or something similar.

All in all, even if Cities Skylines was already a giant leap compared to the classical Simcity-games (excluding the last one which was just horrible), I'd definitely like more "action=>reaction"/"cause=>effect" in a potential future "Cities Skylines 2" or in this case in "CityBound".

Cheers

EDIT: for more details search in this page for the post containing "Unfortunately, traffic management is the only part of the game that really holds up as a simulator" by "amyjess" - I just read it now and I think that I agree as well with all what's mentioned there about CS (but I honestly don't rememember anymore how Simcity4 worked...).

Re:CityBound – An open source city simulation game in Rust by bduerst on Friday April 05, 2019 @04:02PM (#19586456)
Kind of the same. Loved Cities: Skylines to death but the traffic AI killed it for me. It gets to the point where you're stuck building unrealistic designs to workaround the flawed AI pathfinding. It's true you can mod it but it requires a ton of extra manual work to reassign lane routing in each and every city intersection, on top of killing performance.

I'm just waiting for the sequel to the game where they may open up the traffic AI to modders more, or fix some of the stuff broken with the existing engine. That said, it's become kind of the gold standard for city sims so OP should definitely check it out.

Re:CityBound – An open source city simulation game in Rust by onli on Saturday April 06, 2019 @04:47AM (#19589900)
The current iteration of the goto traffic manager mod is the presidential edition, https://steamcommunity.com/sharedfiles/filedetails/?id=58342.... It has some features like the dynamic lane selection and an alternative AI model (I think) that help even without manual work. But yes, assigning lanes at intersections, planning the number of lanes accordingly to have onboard lanes and in general avoiding that traffic collides takes some manual work. It can be fun though. I did not notice the performance going down too much.
Re:CityBound – An open source city simulation game in Rust by rightbyte on Saturday April 06, 2019 @05:41PM (#19593175)
I play City Skylines only to tune my roads with that mod. It's awesome, but in general I think the game has some annoying flaws, like that bringing dead people to graveyard is like a logistical problem, the blocky zoning makes neighborhoods boring, buildings are never that big, etc.
Re:CityBound – An open source city simulation game in Rust by craigds on Friday April 05, 2019 @10:15PM (#19588746)
In CS the only way I found to have even moderately decent traffic flow was to make absolutely every street a one-way street. I don't claim to understand why that helps, but it seems to.

The downside is you have to be very careful where you place your emergency services as you can easily get zones which are too far for firefighters to reach.

Re:CityBound – An open source city simulation game in Rust by noeatnosleep on Friday April 05, 2019 @10:00PM (#19588693)
This is exactly why I quit playing as well.
Re:CityBound – An open source city simulation game in Rust by amyjess on Friday April 05, 2019 @04:45PM (#19586848)
So, one thing that's broken about traffic is the distribution of population in low-density vs. high-density areas.

The short version is that low-density areas are denser than they look, and high-density areas aren't dense enough. For example, if you click on a single-family home and look at the population, there will be over a dozen people living there (TBH, I forgot the exact numbers, but it's way more than a single family's worth of people)! But if you click on a giant skyscraper, there's nothing even close to what would fit in that building if it existed in real life.

This has two unfortunate effects:

* The suburbs need more public transit than you think they'll need. Once you hit 50k people or so, you'll be hurting for transit badly. "But I'm building low-density housing with a street hierarchy, it works fine in real life, so why are my roads clogged in the game?" Yeah but in real life you're not cramming a dozen people into every single-family home.

* On the other hand, you can get away with building dense downtown areas with much less transit than would be required in real life.

And yes, there are mods to realistically balance population. If you run these mods, you'll have something much more realistic: the suburbs don't really need transit, but if you build any high-density at all, you'll need to get a good transit network up and running ASAP.

Re:CityBound – An open source city simulation game in Rust by zepearl on Friday April 05, 2019 @05:40PM (#19587327)
I agree and I'd like to add that (not related to traffic nor density but just pure spread of population density), from what I saw, there doesn't seem to be in CS (Cities Skylines) any relation between low-density & high-density areas, meaning that I can start right away building high-density areas with no in/direct realtime/historical impact of any kind.

We can (proably should?) debate about how these mechanics should work, but I think that it must be true that any city needs in some percentage both areas (e.g. as well the extreme being built now "on demand" for the World Cup in Qatar - https://en.wikipedia.org/wiki/Lusail ) must need both, or maybe not if they modeled the city based on CS haha.

I think that I could have similar points as well for the "education" in CS - I never (still don't know) if the elementary schools that I place are a foundation for people that will then go later to College and/or University - I still place them because I personally believe in the scala Elementary=>maybe_College=>maybe_University, but who knows... . (ok, this boils down mainly to a lack of transparency/informations for the user, independently if what CS does is good or wrong from the point of view of the user)

Re:CityBound – An open source city simulation game in Rust by amyjess on Friday April 05, 2019 @06:02PM (#19587459)
So, according to the Cities: Skylines wiki [0], cims who move into high-density residential areas are younger and less likely to procreate than cims who move into low-density residential.

That's an interesting way to differentiate them, but it's also something that's very specific to present-day America. And middle-class America, at that.

Kind of odd that Skylines is developed by a Finnish company and published by a Swedish one, given how US-centric that model is.

I've also written elsewhere in this thread about how Skylines doesn't have a concept of class stratification, either, and that's a problem: the only way to create neighborhoods with distinct class implications (e.g. the ghetto) is to use the RICO mod and plop buildings directly.

There's no real concept of medium-density, either: the closest it comes is to zone high-density and put it in a district with the High Rise Ban ordinance. Or, again, use RICO. Oh, and growables are limited to no more than 4x4 tiles... if you want bigger buildings (e.g. a sprawling suburban apartment complex), your only option is RICO.

[0] https://skylines.paradoxwikis.com/Zoning

Re:CityBound – An open source city simulation game in Rust by zepearl on Friday April 05, 2019 @07:14PM (#19587918)
> Kind of odd that Skylines is developed by a Finnish company and published by a Swedish one, given how US-centric that model is.

I totally agree, and maybe there has been some discussions about this in the past (I forgot about those early webcasts) - but for a company to align to the US market (probably the largest & most uniform around) is usually probably the safest bet - I still admit of being a little bit sad :|

> There's no real concept of medium-density, either

Now that you say it, I think that (a realistic - see previous posts) medium-density would be absolutely important to model european cities.

> limited to no more than 4x4 tiles

You're right but personally I don't really care about this for the time being (meaning that the other problems have for me absolute priority compared to this) - maybe they just randomly put a safe limit for their first release to avoid indirect potential complications... - I would have most probably done the same, so I won't dig into this hehe.

> I've also written elsewhere in this thread about how Skylines doesn't have a concept of class stratification

I agree.

Summarizing after all these posts & remarks, I feel sad that the studio so far developed only add-ons that do not improve the core of the simulation but only add more distractions and/or superficial complexity around it :P

(E.g. I did buy "Mass Transit" but it didn't give me the feeling that it improved the game but just gave me a few more alternatives - and actually "mass transit" is in my opinion associated to trains & metro, therefore absolutely not fitting cablecars/blimps/ferry/etc...)

But maybe.... they be working on aggregating key-improvements for their next CS2? Who knows... :)

Re:CityBound – An open source city simulation game in Rust by distances on Saturday April 06, 2019 @05:17AM (#19589971)
I agree about the expansions, they have been a disappointment in general. Mass Transit was the highlight, but didn't go nearly far enough and still concentrated on the eye candy. I do understand that they try to appeal to the larger market -- people running the game as a simulation is surely a minority.

That said, it's still currently the best city sim by far. Hoping that Citybound will change that at some point :)

Re:CityBound – An open source city simulation game in Rust by thatfrenchguy on Friday April 05, 2019 @05:23PM (#19587179)
> * The suburbs need more public transit than you think they'll need. Once you hit 50k people or so, you'll be hurting for transit badly. "But I'm building low-density housing with a street hierarchy, it works fine in real life, so why are my roads clogged in the game?" Yeah but in real life you're not cramming a dozen people into every single-family home.

One could argue some cities have low-density housing next to transit though (like Berlin, or Paris). It does have the disadvantage of making metros too easy though, so commuter rail is almost never done because it is too hard to integrate to a city.

Re:CityBound – An open source city simulation game in Rust by distances on Saturday April 06, 2019 @05:19AM (#19589985)
My experience with C:S heavy rail transit is that it doesn't work well with the current simulation: it seems that the cims take the shortest route even if the slightly longer train would be much faster due to fewer stops abd less congestion.
Re:CityBound – An open source city simulation game in Rust by jklinger410 on Friday April 05, 2019 @03:48PM (#19586322)
These are all very valid points. Cities: Skylines ends up being kind of a "traffic sim" game once you get down to the nuts and bolts of it. Even though they have some very intelligent citizens, it's still not quite up to par for pathing.

I still think it's the best City Sim game made yet. The author here should really invest some time to learn about Skyline's failings so they can avoid those problems in their own sim.

Re:CityBound – An open source city simulation game in Rust by pault on Friday April 05, 2019 @02:07PM (#19585382)
Can you talk about the road building engine? Are you using splines to generate the smooth curves? This is a really amazing project, I can tell you have put a ton of work into it.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @02:48PM (#19585784)
There's a lot of interesting stuff going on in there. First, for the curves itself, it does a kind of naive approximation optimisation and builds a curve out of line and arc segments that tries to follow the control points as closely as possible. Then it does an intersection step between all roads and procedurally generates correct connections between all incoming and outgoing lanes of each intersection, including (somewhat) reasonable traffic light timings for each "turn group"
Re:CityBound – An open source city simulation game in Rust by soperj on Friday April 05, 2019 @08:13PM (#19588270)
Always thought it would be really cool to do a city based on no roads at all, but bike paths and public transport. Ever think this will get to the point where I can play around with that? Thanks.
Re:CityBound – An open source city simulation game in Rust by burfog on Saturday April 06, 2019 @01:45AM (#19589460)
That would be a city without trucks...?

The fire department will have an opinion on this.

So many things will be difficult: construction, trash hauling, tree removal, relocation, business deliveries, etc.

Re:CityBound – An open source city simulation game in Rust by maccam94 on Saturday April 06, 2019 @04:38PM (#19592880)
Hmm, fire engine trains, garbage trains, cargo trains... I like it!
Re:CityBound – An open source city simulation game in Rust by eismcc on Sunday April 07, 2019 @10:31AM (#19596967)
I suppose it depends how realistic the sim is, but what about drones, conveyors, helicopters, etc?
Re:CityBound – An open source city simulation game in Rust by soperj on Tuesday April 09, 2019 @03:59PM (#19618373)
You can definitely do deliveries by bike. They do it in my city currently.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @08:18PM (#19588299)
Yes, see my other comment on that here somewhere (on mobile)
Re:CityBound – An open source city simulation game in Rust by impostir on Friday April 05, 2019 @01:01PM (#19584583)
Why did you decide to make roads the atomic unit over cars for traffic?
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @01:04PM (#19584627)
I assume you talk in terms of what constitutes an actor in the actor system: because cars on one strip of road interact highly locally, so processing them in one batch makes a lot of sense performance wise, vs. every car sending messages to every other car and having to maintain references to close-by cars.
Re:CityBound – An open source city simulation game in Rust by DoreenMichele on Friday April 05, 2019 @09:56PM (#19588677)
Feel free to ask me any questions about the project!

I hope to learn to code. I just got my rejection letter from a coding school ("overwhelming demand -- we had to turn down many qualified candidates"). My backup plan is some free online coursework and probably finding a city-building game to mod or tinker with.

When you say open source, does that mean it would be okay for me to futz with it for myself like that?

Thanks.

Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @11:20PM (#19588992)
I’m really hoping to get the project to a point soon where it is easily hack able even for people who are just starting out to code, or even for whom this will be the first contact to code. But I’m far from being there, right now it is a pretty large, pretty unusual and almost entirely undocumented codebase.

So by all means start teaching yourself to code by playful experimentation, but start with something much simpler first :)

Re:CityBound – An open source city simulation game in Rust by eggy on Saturday April 06, 2019 @11:11AM (#19591109)
Could it be scripted in Gluon or Dyon? Excuse me but I am Rustt newbie.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @11:35AM (#19591230)
If I will add scripting, I will probably use JS, since I already have interop with that in the browser UI. Gluon or Dyon are neat, but they are weird enough (in my opinion) that people might as well learn Rust instead of scripting.
Re:CityBound – An open source city simulation game in Rust by eggy on Saturday April 06, 2019 @02:00PM (#19592077)
That sounds reasonable. Thanks! I am looking forward to viewing the source to learn Rust.
Re:CityBound – An open source city simulation game in Rust by DoreenMichele on Friday April 05, 2019 @11:28PM (#19589007)
Okay. Thanks.
Re:CityBound – An open source city simulation game in Rust by jacobolus on Friday April 05, 2019 @10:03PM (#19588699)
Yes, you can futz. Here is the license https://github.com/citybound/citybound/blob/master/LICENSE.t... Read about it here https://www.gnu.org/licenses/agpl.html

Having a license that says you can go play with it doesn’t mean it will be straightforward as a newcomer to understand the code you find or to accomplish any particular goal with your fiddling.

I haven’t looked closely at this project, but I would recommend at least considering starting out fiddling with a simpler system, if you want to learn to code.

Re:CityBound – An open source city simulation game in Rust by DoreenMichele on Friday April 05, 2019 @10:06PM (#19588712)
Thanks.

I don't know that I will even learn Rust. I have had a Python course recommended to me.

I just am trying to figure out what my options are. I've gotten serious push back at times for what I felt were innocent activities. Trying to ask the "dumb" questions in hopes of avoiding that.

The links are helpful. Looking them over.

Re:CityBound – An open source city simulation game in Rust by hluska on Friday April 05, 2019 @10:52PM (#19588880)
I recognize your username and you’re a precise writer. You’d likely be quite a good developer.

I’m going to give you some unsolicited advice. Start now. If you’re struggling to find a course, start here:

https://www.railstutorial.org/book

Don’t worry if Rails is the right choice. You might love it or hate it, but regardless, you’ll learn things like writing tests and using version control.

Good luck and have fun.

Re:CityBound – An open source city simulation game in Rust by DoreenMichele on Friday April 05, 2019 @11:07PM (#19588939)
Thanks. Added to my resource file:

https://doreenlearnstocode.blogspot.com/2019/04/ask-silly-qu...

I'm currently horrendously short of sleep. I've had insomnia for about 8 days. O_o

I don't expect to try to study in earnest until I start sleeping a bit better. Hopefully soon. (Crosses fingers)

Re:CityBound – An open source city simulation game in Rust by hluska on Saturday April 06, 2019 @09:02AM (#19590502)
Sorry, one other thing. I don’t recognize the existence of stupid/silly questions. If you get stuck, my email address is in my profile.
Re:CityBound – An open source city simulation game in Rust by hluska on Saturday April 06, 2019 @08:08AM (#19590363)
I know some really smart people who claim that Rails induces narcolepsy, so my last comment might have been more insightful than I thought...:)

Seriously, best of luck. And remember, learning to write code is really just about momentum. Start, have fun and jfgid (just fucking getting it done).

Re:CityBound – An open source city simulation game in Rust by ChickeNES on Saturday April 06, 2019 @02:05PM (#19592122)
Oh, I didn't notice it was (A)GPL licensed, that's disappointing.
Re:CityBound – An open source city simulation game in Rust by falcrist on Friday April 05, 2019 @10:06PM (#19588711)
I'm not affiliated with the author, but that is generally part of the definition of open source. Once you've downloaded the code, check the top of any source code file for more details about the specific license the author is using.
Re:CityBound – An open source city simulation game in Rust by DoreenMichele on Friday April 05, 2019 @10:07PM (#19588714)
Thanks.
Re:CityBound – An open source city simulation game in Rust by fendy3002 on Saturday April 06, 2019 @01:53AM (#19589492)
Interesting that you take factorio as inspiration. May I know what part of factorio that you want to add into, that seems lacking in other games of same genre like sim city?

On the other hand, how do you plan for in-game scale / limit? (Millions of population, etc) and whether you have any idea about multiplayer/server (I'm talking similar with clustertorio)

Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @11:29AM (#19591207)
The thing that impresses me with factorio is how smoothly the game challenges scale with you learning and mastering one game aspect after the other. Basically, you learn something that solves all your current problems, but that directly creates new problems, which you then have to deal with using your newfound powers.

The actor architecture makes it very easy to scale the simulation across several machines and indeed run a simulation cluster that you connect to from a simple client. In fact it already almost works like that. And the only thing that's missing for multiplayer is some UI-level coordination for collaborative planning (basically preventing editing conflicts). Everything else is already "multiplayer ready".

Re:CityBound – An open source city simulation game in Rust by jason_slack on Saturday April 06, 2019 @05:18PM (#19593064)
I wanna help with this project. I wrote a lot of personal changes to Micropolis.
Re:CityBound – An open source city simulation game in Rust by incog-neato on Sunday April 07, 2019 @08:02PM (#19600810)
Can you explain something about "Special recursively-compact containers"? I couldn't find any search hits for the phrase.
Re:CityBound – An open source city simulation game in Rust by incog-neato on Monday April 08, 2019 @11:49AM (#19606286)
This is what I was looking for: https://github.com/aeickhoff/compact

Cool containers.

Re:CityBound – An open source city simulation game in Rust by inferiorhuman on Friday April 05, 2019 @09:12PM (#19588522)
Is there any documentation? The aeplay.org site looks still to be mostly developer oriented.
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @09:38PM (#19588612)
Not really. Which documentation exactly do you mean? Code or for players?
Re:CityBound – An open source city simulation game in Rust by inferiorhuman on Saturday April 06, 2019 @04:28AM (#19589857)
Oh even just usage instructions. Like what are the navigation controls, etc. I zoned some things and laid down some road and wasn't sure what or when to expect it. Some of the bugs as well make me unsure if my expectations are wrong or if it's just a bug (e.g. vehicle traffic not appearing, roads and zoning going in weird shapes). Some of the links in the top-level readme are 404 as well.

All in all I'm sure I'll spend a ton of time playing the game itself and playing with the source.

Re:CityBound – An open source city simulation game in Rust by theanzelm on Saturday April 06, 2019 @10:53AM (#19591007)
There is a small tutorial in the game menu and you can check the settings for keybindings.
Re:CityBound – An open source city simulation game in Rust by inferiorhuman on Saturday April 06, 2019 @06:27PM (#19593389)
Yeah I saw that but I'm still largely unsure about a lot of bits and pieces about the game play. Mostly it's a matter of determining what's intended behavior and what's not (e.g. the traffic jams for no apparent reason that may or may not have other cars passing them in the same lane), but also what things like those big arrows on the road (that persist sometimes).
Re:CityBound – An open source city simulation game in Rust by bromuro on Sunday April 07, 2019 @04:58AM (#19595653)
I was following the project since the death of sim city! Happy you made it! Congrats bro.
Re:CityBound – An open source city simulation game in Rust by sansnomme on Friday April 05, 2019 @02:36PM (#19585669)
Congrats on shipping! It looks beautiful. How long did it take you to build this?
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @02:39PM (#19585701)
I didn't really ship it yet (got posted here by someone else), it's in continuous development for already ~5 years.
Re:CityBound – An open source city simulation game in Rust by malandrew on Friday April 05, 2019 @08:01PM (#19588205)
Are cities always flat?
Re:CityBound – An open source city simulation game in Rust by theanzelm on Friday April 05, 2019 @08:19PM (#19588307)
Once most features work in 2D, I’ll extend to 3D terrain. I’ll probably have over and underpasses before that for better traffic routing.