Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Risc1911
Mar 1, 2016

I am glad you switched to a language that can handle the task. C++ is not hard to learn but very hard to master. I suggest getting some design pattern books for event driven programming and plan out your main game loop in minute detail before you commit to a solution. Rewrites in C++ can be very time consuming.

Gruss aus Muenchen

Adbot
ADBOT LOVES YOU

Supraluminal
Feb 17, 2012

anselm_eickhoff posted:

Hi everyone! Just a short update!

How I'm getting along

Thanks. I think these short kinds of updates are a good idea, especially if it means you can post them frequently. Helps keep the game in the periphery of people's minds, plus I imagine it could help you to maintain your own development pace more effectively than big milestone-based updates.

Mandalay
Mar 16, 2007

WoW Forums Refugee
Agreed. I want you to succeed!

anselm_eickhoff
Mar 2, 2014

aeplay.co
A new update, while something is cooking!

Background: A Tale of Two Worlds

Baronjutter
Dec 31, 2007

"Tiny Trains"

I don't understand any of this, but I'm glad you're doing stuff that will eventually lead to a city builder with actual proper wall to wall buildings.

anselm_eickhoff
Mar 2, 2014

aeplay.co
and parking simulation amirite?

Subyng
May 4, 2013

anselm_eickhoff posted:

and parking simulation amirite?

unironically, yes

Baronjutter
Dec 31, 2007

"Tiny Trains"

anselm_eickhoff posted:

and parking simulation amirite?

Impossible to even abstractly model a modern city without so I assumed thats a given !

goatsestretchgoals
Jun 4, 2011

Euro Truck Simulator 201x is consistently on top of Steam, release Parallel Parking Simulator 2016 as a funding stopgap and coast on those sweet deutschmarks.

anselm_eickhoff
Mar 2, 2014

aeplay.co
Another background-style update!

Background: An Architecture for Millions of Things

Baronjutter
Dec 31, 2007

"Tiny Trains"

I'm no code-ologist but I don't understand how you're reaching for a goal of millions yet want to simulate all people and traffic. Skylines tried to do that and most people can get to about 100k before things start to bog down and the simulation takes a hit. How will Citybound be that much more efficient?

anselm_eickhoff
Mar 2, 2014

aeplay.co

Baronjutter posted:

I'm no code-ologist but I don't understand how you're reaching for a goal of millions yet want to simulate all people and traffic. Skylines tried to do that and most people can get to about 100k before things start to bog down and the simulation takes a hit. How will Citybound be that much more efficient?

This is exactly what I tried to illustrate in this post: Citybound will be that much more efficient by using a lot of specialised solutions that make direct use of the hardware and are fully aware of its quirks. Skylines in contrast even adds a couple of "inefficient generalisations" on top of what I talked about in the post: a very generic game engine using a garbage collected language. Don't be surprised to find several orders of magnitude of faster by avoiding all that.

Baronjutter
Dec 31, 2007

"Tiny Trains"

Yeah, all that optimization stuff went way over my head. Sounds like you're doing some ground-breaking stuff.

Nition
Feb 25, 2006

You really want to know?
Yeah, while Anselm is a small dev and Colossal Order is a big company, Cities: Skylines is a Unity engine/C# game and that brings with it a not-insignificant amount of inefficiency (and I say that as someone making a Unity game that's on Steam right now). So it's not totally crazy to say a lot more could be simulated.

Who knows what SimCity 5 was doing, considering they did have a custom C++ engine.

Curvature of Earth
Sep 9, 2011

Projected cost of
invading Canada:
$900

Nition posted:

Yeah, while Anselm is a small dev and Colossal Order is a big company, Cities: Skylines is a Unity engine/C# game and that brings with it a not-insignificant amount of inefficiency (and I say that as someone making a Unity game that's on Steam right now). So it's not totally crazy to say a lot more could be simulated.

Who knows what SimCity 5 was doing, considering they did have a custom C++ engine.

SimCity 2013's UI itself was JavaScript.

Nition
Feb 25, 2006

You really want to know?
Which would take up a bit of processing time, but the simulation code should still be able to be fast. Still, it's hard for sure - hence the years of work from Anselm.

Mandalay
Mar 16, 2007

WoW Forums Refugee
Sounds like something that Google would acqui-hire you for if you figured it out on your own, and it was better than what Maxis could come up with for SC5.

Jamfrost
Jul 20, 2013

I'm too busy thinkin' about my baby. Oh I ain't got time for nothin' else.
Slime TrainerS
This is all sounding very impressive.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Cache lines are probably not the best thing to be looking at so early, especially since things are likely to change a whole lot as you continue development; micro-optimization is particularly fragile to changes in your codebase. I'd recommend looking at ways to reduce algorithmic complexity first, since performing fewer operations in the first place is usually a better strategy than making each operation as micro-optimized as possible. Since you're making a game, your simulation doesn't actually have to be perfectly accurate; it only needs to look accurate.

Making some simplifying assumptions can drastically reduce the amount of computation required; for instance, you could use aggregate traffic computation for any district of the city you're not currently looking at. People wouldn't notice the difference, simply because they're not observing it. (However, this does require that your aggregate traffic model be pretty accurate.) This probably wouldn't significantly reduce the amount of data you need to store (each citizen would still have their own internal schedule, workplace, favorite shops, etc), but it would make it easy to instantiate each citizen on the fly: if you know it's 8:33 AM and aggregate traffic downtown is bad, you can predict where Alice Anderson's SUV should be and then simply create it when the user is looking at that area.

It's important to remember that games - even simulation games - have soft real-time constraints and are made for entertainment. At the risk of oversimplifying matters, a good contrast here is Doom 3 vs Half Life 2. Doom 3's rendering engine had a very advanced (for its time) lighting model that's significantly more "accurate" to the real world. However, Half Life 2 looks much better because they saved a lot of GPU resources by making simplifying assumptions, especially about lighting.

goatsestretchgoals
Jun 4, 2011

You can also save a bit of CPU time by making commuter behavior realistic. The vast majority of commuters will go the same way every day unless they are confronted with a truly horrid traffic jam. Once you've simulated out the route between residential and employment once, let them continue spilling onto that road until X congestion happens, at which point they start spending CPU time on an alternate route.

E: Also this models what happens IRL when a major artery is closed, everything gets slow as poo poo because every single actor is acting for themselves without thinking of the greater model.

goatsestretchgoals fucked around with this message at 03:53 on Jul 19, 2016

Nition
Feb 25, 2006

You really want to know?

Avenging Dentist posted:

Making some simplifying assumptions can drastically reduce the amount of computation required; for instance, you could use aggregate traffic computation for any district of the city you're not currently looking at. People wouldn't notice the difference, simply because they're not observing it. (However, this does require that your aggregate traffic model be pretty accurate.) This probably wouldn't significantly reduce the amount of data you need to store (each citizen would still have their own internal schedule, workplace, favorite shops, etc), but it would make it easy to instantiate each citizen on the fly: if you know it's 8:33 AM and aggregate traffic downtown is bad, you can predict where Alice Anderson's SUV should be and then simply create it when the user is looking at that area.

I don't know, having a simplified model for non-viewed areas and an agent model for viewed ones is a great idea performance-wise in theory, but I can also imagine it being a never-ending nightmare reconciling the two and making them match.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Nition posted:

I don't know, having a simplified model for non-viewed areas and an agent model for viewed ones is a great idea performance-wise in theory, but I can also imagine it being a never-ending nightmare reconciling the two and making them match.

Traffic modelling is a pretty well-studied field in applied mathematics, and in fact the mathematical modelling course I took in university focused on traffic modelling in aggregate (the textbook was Richard Haberman's Mathematical Models: Mechanical Vibrations, Population Dynamics, and Traffic Flow). Academic research would be a great way to get started with aggregate models, since real-life traffic modelling must be accurate, or it's not useful. To help confirm that your model matches the game's actor-based simulation, you could construct automated tests of your aggregate model: run the full simulation on some interesting test cities and see if your aggregate model accurately predicts the results.

In fact, if you found yourself completely unable to use existing research on traffic flow, you could probably do something clever and design a neural network that learns how to approximate the traffic by feeding it all your test data. Then you just need to ship the neural network's internal state along with the game. I don't think this would actually be necessary, and it's probably excessive overkill for this problem domain, but I'm pretty sure it would still help large cities. (The best is probably to use real-life research though, since smart people have already done it.)

While using aggregate models is a bit lacking in conceptual elegance (it's fun to watch higher-order patterns emerge from a system like this), I think it's a compromise worth making, since good simplifying assumptions could drastically increase the maximum size of the simulation. Of course, I don't have access to any of the code here, so I can only make guesses. In any kind of optimization, measurement is extremely important, and I'd urge Anselm to at least look at the feasibility and scalability of performing aggregate traffic modelling vs a full actor-based simulation.

Nition
Feb 25, 2006

You really want to know?

Avenging Dentist posted:

Traffic modelling is a pretty well-studied field in applied mathematics, and in fact the mathematical modelling course I took in university focused on traffic modelling in aggregate (the textbook was Richard Haberman's Mathematical Models: Mechanical Vibrations, Population Dynamics, and Traffic Flow). Academic research would be a great way to get started with aggregate models, since real-life traffic modelling must be accurate, or it's not useful. To help confirm that your model matches the game's actor-based simulation, you could construct automated tests of your aggregate model: run the full simulation on some interesting test cities and see if your aggregate model accurately predicts the results.

In fact, if you found yourself completely unable to use existing research on traffic flow, you could probably do something clever and design a neural network that learns how to approximate the traffic by feeding it all your test data. Then you just need to ship the neural network's internal state along with the game. I don't think this would actually be necessary, and it's probably excessive overkill for this problem domain, but I'm pretty sure it would still help large cities. (The best is probably to use real-life research though, since smart people have already done it.)

While using aggregate models is a bit lacking in conceptual elegance (it's fun to watch higher-order patterns emerge from a system like this), I think it's a compromise worth making, since good simplifying assumptions could drastically increase the maximum size of the simulation. Of course, I don't have access to any of the code here, so I can only make guesses. In any kind of optimization, measurement is extremely important, and I'd urge Anselm to at least look at the feasibility and scalability of performing aggregate traffic modelling vs a full actor-based simulation.

Good ideas, I've got nothing to say against those. I wonder how hard it would be to train a neural net well enough that it found a good generalised model for any user's crazy city layout.

uXs
May 3, 2005

Mark it zero!
Anybody has any idea where this is going? Dude seems to have vanished?

nielsm
Jun 1, 2009



uXs posted:

Anybody has any idea where this is going? Dude seems to have vanished?

https://twitter.com/cityboundsim/status/797100412901986304

"I'm working on it silently", he says.

uXs
May 3, 2005

Mark it zero!
Ok cool, I didn't find anything more recent than somewhere in July, that's why I asked.

AMISH FRIED PIES
Mar 6, 2009

by Nyc_Tattoo
It's to be expected. Building an engine and frameworks and the boring nitty-gritty sort of stuff doesn't really make for compelling visual update material.

Thirsty Dog
May 31, 2007

Thirsty Dog posted:

This seems like a massive change and one that I would suggest severely threatens the chance of this game ever being finished.

Actually finishing stuff is the hard part.

Yeah, still relevant

crabrock
Aug 2, 2002

I

AM

MAGNIFICENT






goon project guys. he probably gave up a while ago. "starting all over" was the death knell.

Hadlock
Nov 9, 2004

Imagine four red skyscrapers on the edge of a cliff...

KillHour
Oct 28, 2007


I got an email last week about a "Christmas surprise."

anselm_eickhoff
Mar 2, 2014

aeplay.co
...and here is this "christmas surprise"!

Christmas 2016 Announcement

zxqv8
Oct 21, 2010

Did somebody call about a Ravager problem?
Glad to see you're back and back at it! I like the way you're trying to be transparent about the development process. It's certainly a lot to ask of folks in the fraught early-access culture we're in, but I think you're doing it right.

Great video, but you may want to take the time to tweak some audio levels if at all possible, it was very difficult to hear you speak in some of the early parts.

nielsm
Jun 1, 2009



This is in fact very exciting. I'll definitely take a look at the prototype later.

One thing I'm wondering is, does "open source" extend to "free software" (in the FSF sense), and does it extend to assets like sound, textures, models?
Could the game support a "commercial asset packs" model?


Also interesting choice of AGPL as license. I can see it being meaningful since it prevents commercial closed-source exploitation via remote access loopholes. I could imagine someone could make a mobile device client from scratch and keep that closed source, then connect to a hosted simulation core running a modified version of the Citybound engine; without AGPL the changes to the Citybound engine could stay secret since they technically weren't distributing any Citybound code.

nielsm fucked around with this message at 10:21 on Dec 25, 2016

Hadlock
Nov 9, 2004

How well is the traffic going to scale once you add in point to point routing, etc? Presumably each car is just going to follow the one in front of it in the demo's simulation? Having to readjust speed of each car due to merging cars on and off the highway, faster emergency vehicles etc increases overhead on top of the best case grid scenario.

I really like where this is going with the new demo, but is it going to scale as shown? A bunch of interconnecting figure 8s with high speed emergency vehicles weaving in and out of traffic (or something!) Would have been a better example of capacity.

I'm really interested in the project but I'm going to wait and see how it looks with the economy roughed in and highway merging etc before I jump on the paetron bandwagon. It looks pretty close though.

Hadlock fucked around with this message at 18:57 on Dec 25, 2016

nielsm
Jun 1, 2009



As far as I can tell, what the demo does is place a number of cars randomly, and give each car a random destination. (I think a destination right now is a lane segment.) None of them should be just following another, they are already doing individual pathfinding here.

If driveways up to buildings can also be integrated in a good way, things could end up looking really natural.

nielsm fucked around with this message at 19:23 on Dec 25, 2016

Baronjutter
Dec 31, 2007

"Tiny Trains"

Any video is better with sheep and ponies in the background.
Really impressive amount of agents, already beyond what Skylines does. Of course that's just doing nothing but cars on roads. Peds, bikes, tracking people's inventories and building stats, the economy and resources, that will take a chunk too. And of course the absolutely essential simulation of parking in some respect. A huge geographical grid of streets is one thing, but a dense network of old-town streets with a million weird intersections is another.

I'm still optimistic about this because he's shown he can do extremely flexible free-form roads and lanes like no one else has even attempted, and really loving nice procedural buildings.

Also, Anselm, over the last year I've been doing some work and hobby related research into the development industry and the nitty gritty of housing markets and and construction, actually interviewed some developers I know and city planning and zoning officials! Also in my job I pour over building plans all day and I have access to all the financial and construction cost stuff so I've been collecting info on how much a building costs to build, it's square footage, and how many people end up living in it or working in it. Been working on a simple card/tile based city building board game but with a focus more on the economic and political side rather than a car-simulator. If you ever wanted to "talk shop" to fine tune how/when/why buildings grow I'd love to share my research with you.

Baronjutter fucked around with this message at 19:39 on Dec 25, 2016

Microplastics
Jul 6, 2007

:discourse:
It's what's for dinner.

Baronjutter posted:

Been working on a simple card/tile based city building board game but with a focus more on the economic and political side rather than a car-simulator.

Finally! There needs to be one of these.

Iunnrais
Jul 25, 2007

It's gaelic.
Question: in ythat video, you showed being able to modify lanes in a very awesome manner... but can you actually edit the intersection to suit? For example, if you create a right turning lane as in the example, can you then set the intersection so that right turns are prohibited (except in the dedicated lane)? From the video, it looked like all the turning logic might have been locked in place.

Adbot
ADBOT LOVES YOU

Baronjutter
Dec 31, 2007

"Tiny Trains"

JeremoudCorbynejad posted:

Finally! There needs to be one of these.

Have you played suburbia? It's pretty fun but doesn't really even try to model any actual city building, but the whole hex based aspect is fun.

  • Locked thread