Connect with us


Citybound – city building game using actor-based distributed simulation



Citybound – city building game using actor-based distributed simulation

A city building game that uses microscopic models to vividly simulate the organism of a city arising from the interactions of millions of individuals.

People on the move, businesses in trade, neighbourhoods changing. Each inhabitant struggling, adapting, making life choices. The city evolves, the city grows. The city is us.

See and inspect all aspects of city life, across many scales of time and space.

Shape your city by sketching detailed project plans for infrastructure and zones.

Implement projects, decide on budgets and make government decisions.

Citybound has an ambitious vision and is developed as a largely one-man open-source effort. Follow my creation process on the DevBlog and the Citybound community on Reddit. If you are brave, try out the experimental live builds. Citybound is proudly community-funded.

Micro-Economy Simulation

In Citybound, every single household (a family or a business) is individually simulated. Each household has a home, and the daily activities of its family members or employees are driven by the resources the household needs and offers. Each household maintains a precise real-time inventory of its resources, which not only include tangible goods like groceries, raw materials, or money, but also intangible concepts like sleep, health, recreation, work-force, touristic interests or business services.

Economic patterns arise directly from household interactions. To fulfil its human or business needs, each household tries to find attractive “trade-partners” for each resource, factoring in price and quality differences, but also local reachability based on transport conditions. Households re-prioritise their needs throughout the day, leading to natural patterns of commute, shopping or logistical transport trips.

Future work: Pre-simulating local trade conditions to determine attractiveness of real estate, thus influencing immigration, development and city growth. Scaling the system to high-density buildings and large populations in the millions.

Details & Inspiration ▾

  • The original inspiration for simulating cities at the level of individuals and their interactions (and starting Citybound in the first place) came from SimCity (2013), which, however, only implemented a very superficial version of that (modelling people more like fluids with sources and drains)


  • Kim, D. (2012). Modelling Urban Growth : Towards an Agent Based Microeconomic Approach to Urban Dynamics and Spatial Policy Simulation
  • Koomen, E., Diogo, V., Dekkers, J., & Rietveld, P. (2015). A utility-based suitability framework for integrated local-scale land-use modelling.
  • Waddell, P., Borning, A., Noth, M., Freier, N., Becke, M., & Ulfarsson, G. F. (2003). Microsimulation of Urban Development and Location Choices: Design and Implementation of UrbanSim.
  • Park, I. K., & von Rabenau, B. (2011). Disentangling agglomeration economies: Agents, sources, and spatial dependence.
  • Tiglao, N. C. C. (2005). Modeling Households and Location Choices in Metro Manila.
  • Weidner, T., Moeckel, R., & Brinckerhoff, P. (2011). SILO: A Land-­Use Model For Integrated Modeling.
  • Beckmann, K. J., Brüggemann, U., Gräfe, J., Huber, F., Meiners, H., Mieth, P., … Wegener, M. (2007). ILUMASS Integrated Land-Use Modelling and Transportation System Simulation.

Microscopic transport Simulation

The efficient flow of traffic through transport infrastructure is vital for a city’s health. Traffic is spontaneously determined by the micro-economic goals of its participants – and chaotic events are at the heart of traffic. That’s why in Citybound every single trip of every person is simulated microscopically. Hundreds of thousands of cars physically move along roads and have to break, accelerate and change lanes in traffic to safely get to their destination.

Future work: Other modes of transport (pedestrians, light & heavy rail, airports, etc.). Multi-modal pathfinding (combining walking, public transport, taxis and driving to reach destinations).

Details & Inspiration ▾

  • Microscopic traffic simulation was the first part of Citybound that I implemented – my strategy was to show of that I could make this very computation-intensive part of city simulation scale to city sizes of millions of inhabitants. With already early prototypes being able to simulate up to 400,000 cars in real-time, this would suffice for cities of population ~4 million.
  • Because the road network is subject to frequent change in Citybound, many static pathfinding methods that require long pre-computation but offer fast run-time lookup are unsuitable. Pathfinding information in Citybound is stored in the road network itself and is dynamically updated and propagated through the network, similar to internet routing tables.


  • Blatnig, S. (2008). Microscopic Traffic Simulation with Intelligent Agents.
  • Liberti, L. (2014). 14th Workshop on Algorithmic Approaches for Transportation Modelling, Optimization, and Systems.
  • Sturtevant, N., & Buro, M. (2004). Partial Pathfinding Using Map Abstraction and Refinement.

haptic collaborative


The core principle of interacting with the game world in Citybound is through planning. This gives you the ability to preview effects of even large-scale projects in your city, to undo and redo and to combine different ideas. Smart paint-gestures become beautifully curved roads and perfectly shaped zones, offering the power and expressiveness of professional CAD tools while being much more intuitive and fun to use.

Precise management of plan updates not only enables smooth interactive editing of even huge cities, but also makes collaborative multiplayer planning possible, where several people can play in and work on the same city together in real time.

Future work: Planning with 3D features like bridges and tunnels. Preview of financial and political impact of planned projects.

Actor-Based distributed simulation

To realise Citybound’s vision of simulating large-scale cities and streaming them to browsers for interaction, I had to invent and implement quite an unusual computation architecture. Actors and message passing are the key concept in Kay, my actor-system framework that elevates Citybound’s simulation logic from its transparently networked and easily scalable underpinnings. Implemented in Rust, it allows type-safe and high-performance actor updates and inter-actor communication, with low-level optimisations for cache-locality while offering high-level features like distributed dynamic dispatch and broadcast messages.

Details & Inspiration ▾

  • The main inspiration for my approach was my experience with the Erlang programming language for distributed systems.
  • Kay has relatively few features and abstractions in comparison, but that allows a focus on high-performance, with minimal actor and message footprints in memory.
  • The consolidated layout of actor state in memory and the mechanisms for handling broadcast messages that are received by up to millions of actors are heavily inspired by Data Oriented Game Engine Design, the core ingredient in the highly successful pattern of Entity-Component Systems.


Compiling Kay to WebAssembly allows running a fully fledged actor system node in the browser, which can communicate with the simulation backend through type-safe high-performance messages and do computation-intensive preparation work for rendering, before efficiently serialising and passing rendering-relevant information as JavaScript objects to a React app that implements the rest of the UI. The React app can call Rust hooks that were exported to JavaScript, to send Kay messages back to the simulation backend for influencing the game world based on player input.

Reactive 2D+3D UI framework

Defining a combined 2D and 3D UI to interact with Citybound’s quite complex planning and simulation objects is a difficult task. Reactive, component-based frameworks with clear information flow heavily simplified 2D UI development in recent years. I extend React with my Monet library, applying React’s principle (wrapping stateful updates in a declarative, functional API) to WebGL rendering and GPU resource management. In addition, I define a new kind of React component representing an interactive shape in a 3D world. Taken together, this allows me to fully define the 2D and 3D appearance and interactivity of a game object in a single React component.

Robust high-performance geometry kernel

Almost every object in the Citybound world can be arbitrarily shaped, be it roads, zones or building lots – and their exact shape typically results from complex geometric operations between other objects. My Descartes library provides everything from simple path operations to vast polygon-overlay tasks, with a focus on performance and topological robustness despite approximation and inaccuracies.

Incremental computation framework

To provide real-time interactive editing of large city plans and to minimise bandwidth usage between UI and server while streaming plan result previews, it is vital to have a precise formalisation of how changes in plan input affect plan results, and then communicating only the differences. Currently implemented ad-hoc in a monolithical planning manager, this approach will be generalised and translated into a distributed framework to allow plans to scale beyond one backend server.

Details & Inspiration ▾


  • Matthew A. Hammer, Joshua Dunfield, Kyle Headley, Nicholas Labich, Jeffrey S. Foster, Michael W. Hicks, David Van Horn. Incremental computation with names – also see

Procedural geometry pipeline

The fact that almost all geometry in Citybound is procedural is both an opportunity and a challenge. Early work has begun in my Michelangelo library that will provide expressive shape-grammars to describe architecture styles or natural shapes based on extrusions, which can then be evaluated on demand to generate optimally-batched meshes and instance-arrays with dynamic level of detail and animated components.

Details & Inspiration ▾


  • Kelly, T., & Wonka, P. (2011). Interactive architectural modeling with procedural extrusions.
  • Kelly, T. (2013). Unwritten Procedural Modeling with Skeletons.

The city is us. © Anselm Eickhoff

Read More

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *


Microsoft Teams is finally fixing this ear-splitting annoyance




Microsoft Teams is finally fixing this ear-splitting annoyance
Four people in a meeting room video conferencing with four remote participants.

(Image credit: Microsoft)

One of the most irritating (and slightly painful) parts of joining a Microsoft Teams call could soon be fixed by a new update.

The video conferencing service is a popular choice for many companies, meaning calls with large numbers of participants joining at the same time, and from the same location (such as a meeting room) are a common occurrence. 

However, often when multiple people join a meeting in the same room, a feedback loop is created, which causes echo, which in most cases quickly escalates to howling – with Microsoft likening the noise to when a musician holds the mic too close to a loudspeaker.

Teams’ howling

Fortunately, a new fix is coming for Microsoft Teams users. In its entry in the official Microsoft 365 roadmap (opens in new tab), the new “Ultrasound Howling Detection” describes how it aims to prevent this noise for users on Windows and Mac across the world.

Microsoft says that the update should mean if multiple users on laptops join from the same location, it will share with the user that another Teams Device is detected in their vicinity and is already joined with audio to the current meeting. 

If a user has already joined with their audio on, Microsoft Teams will automatically mute the mic and speakers of any new the person who then joins the call, hopefully putting an end to the howling and screeching feedback.

Thankfully, the update is already listed as being in development, with an expected general availability date of March 2023, so users shouldn’t have to wait too long to enjoy.

The news follows a number of recent updates largely aimed around improving the audio quality on Microsoft Teams calls using AI and machine learning.

The new updates are the result of using a machine learning model trained on 30,000 hours of speech samples, and include echo cancellation, better adjusting audio in poor acoustic environments, and allowing users to speak and hear at the same time without interruptions.

Sign up to theTechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!

Mike Moore is Deputy Editor at TechRadar Pro. He has worked as a B2B and B2C tech journalist for nearly a decade, including at one of the UK’s leading national newspapers and fellow Future title ITProPortal, and when he’s not keeping track of all the latest enterprise and workplace trends, can most likely be found watching, following or taking part in some kind of sport.

Read More

Continue Reading


Shazam! Fury of the Gods trailer breakdown: 6 thing you might have missed




Shazam! Fury of the Gods trailer breakdown: 6 thing you might have missed
Shazam points at someone off camera in Shazam! Fury of the Gods

Shazam! Fury of the Gods lands in theaters on March 17.
(Image credit: Warner Bros.)

The final trailer for Shazam! Fury of the Gods has debuted online – and it looks even more charming, funnier, frenetic, and darker than its predecessor.

Shazam’s sequel flick arrives in theaters worldwide on March 17, so it’s about time we were given another look at the forthcoming DC Extended Universe movie (read our DC movies in order guide to find out where it’ll fit in that timeline). Luckily, Warner Bros. has duly obliged. Check it out below:

Okay, there’s some messy CGI and a slightly corny vibe about Shazam 2. But hey, the first problem can be ironed out before the superhero film takes flight, while the latter is part of what makes this movie series spellbinding (see what we did there?).

But we digress – you’re here because you want to find out what you missed from Shazam! Fury of the Gods‘ new trailer. Below, we’ve pointed out six things you might have overlooked. So, what are you waiting for? Shout “Shazam!” and let’s dive in.

1. Who are the Daughters of Atlas?

Kalypso hands Hespera the wizard's staff in Shazam! Fury of the Gods

New movie, new villains. (Image credit: Warner Bros.)

For a film centered around Shazam, we don’t actually see the titular superhero appear in the official trailer for the first 20 seconds.

Instead, we get another glimpse at Fury of the Gods‘ villains, aka the Daughters of Atlas. The powerful trio comprises the power-hungry Hespera (Helen Millen), dragon-riding Kalypso (Lucy Liu), and Athena (Rachel Zegler), the latter of whom seems particularly torn about how the sisters are going about their business.

So, why are they gunning for Shazam and his superpowered foster siblings? Essentially, when Billy Batson was gifted his abilities by Djimon Hounsou’s wizard in the film film (available now on HBO Max), one of those powers was the Stamina of Atlas. The Daughters of Atlas aren’t too happy about their father’s ability being passed down to a child, so they want to take back what is theirs – and they’ll do it so by any means necessary.

2. Mythological monsters

A dragon prepares to breathe fire at one of Shazam's fellow heroes in Shazam! Fury of the Gods

Shazam isn’t the only person taking flight in Fury of the Gods. (Image credit: Warner Bros.)

Shazam’s first DCEU outing featured some horror-imbued creatures in the form of the Seven Deadly Sins. How, then, do you go about topping (or, at the very least) matching what came before? Throw in a bunch of myth-based monsters, of course.

Kalypso’s imposing dragon is the most notable inclusion. It feature prominently throughout the trailer, and we even get an amusing Game of Thrones reference from Shazam – “Hey, Khaleesi!” – in the movie. Hey, Warner Bros. loves to mention its suite of IPs in as many of its films as possible.

But Kalypso’s wyvern isn’t the only fairy-tale-based beast we see. Minotaurs, griffons, and demonic unicorns are just three of the other monsters who’ll turn up in Fury of the Gods. Basically, don’t expect this to be an easy fight for Shazam and company to save the world.

3. You can’t get the staff these days

Hespera uses the wizard's staff as Kalypso looks on in Shazam! Fury of the Gods

“So I just point it and then what?” (Image credit: Warner Bros.)

Saving earth from a new titanic threat will be even harder when Shazam’s adoptive family are stripped of their powers, too. And it seems that the staff, which was wielded by Hounsou’s wizard in the first movie, is the key to giving and taking those abilities away.

In 2019’s Shazam!, the titular hero gave powers to his foster siblings to help him combat the Seven Deadly Sins and Doctor Sivana. They’ve still got those power in Fury of the Gods, too, but they won’t have them for long, based by what the trailer suggests.

The footage shows Freddy Freeman and Mary Bromfield being drained of their abilities by the Daughters of Atlas at various points. The trio are using the wizard’s staff to rob the teens of their powers, so it’s clearly of major importance to the movie’s main players. 

Later, we see Shazam wielding it – not before he asks the wizard to take his powers back, mind you, when he becomes convinced he can’t defeat the Daughters of Atlas. Anyway, Shazam’s brandishing of the staff suggests he needs it to boost his own abilities if he’s going to defeat the movie’s antagonists and give his siblings their powers back. Expect the staff to play a vital role in Fury of the Gods‘ plot, then.

4. Prison break

Djimon Hounsou's wizard blows som magic dust out of a prison window in Shazam! Fury of the Gods

Time to break out, Mr. Wizard. (Image credit: Warner Bros.)

In order to get the wizard’s staff, it seems the Daughters of Atlas go after Hounsou’s magic wielder to obtain it.

We see Hounsou’s character imprisoned at various points, including a shot of Hespera chastising him for giving the power of the gods to Billy, Freddy, and company. “You ripped it from our father’s core,” she tells him, which implies Hounsou’s wizard might not be as mighty and heroic as we were led to believe.

Anyway, Hounsou’s wizard interacts with Shazam later in the trailer, so he clearly escapes captivity. Whether he does so alone, or he enlists Shazam’s help – does that magic-infused dust, which he sends through his prison cell window, have something to do with it? – is unclear. Regardless, we’ll see Hounsou’s character break out at some stage.

5. Is that you, Doctor Strange?

Shazam flies past some rotating buildings in Shazam! Fury of the Gods

Where have we seen this kind of aesthetic before? (Image credit: Warner Bros.)

Remember when we said Zegler’s Athena doesn’t seem as keen to destroy earth as her sisters? That’s because, at the 1: 14 mark, we see her use her powers with a uncertain look on her face. You wouldn’t look like that if you were convinced you were doing the right thing, would you? 

Based on the fact she’s pushed away by Kalypso (using the staff no less), seconds later, it seems she’ll be swapping sides at some stage.

Interestingly, it seems the wizard’s staff can do more than give or take a person’s powers away. One perceived ability certainly has an air of the Doctor Strange/Marvel-based mystic arts about them. Just look at the Escher-style nature of how the scenery bends and folds in on itself when Athena is pushed back, and when Shazam evades numerous buildings at the 1: 44 mark. We’d be very surprised if DC and Warner Bros. didn’t take a leaf out of the MCU’s book with such an aesthetic.

6. Light the way

Shazam prepares to fight Kalypso and her dragon in Shazam! Fury of the Gods

A yellow bolt out of the blue. (Image credit: Warner Bros.)

Shazam and his fellow superheroes get a costume upgrade in Fury of the Gods. The group’s threads are more streamlined and less plastic-looking this time around, which is pleasing to see.

Fans had been worried, though, that these suits wouldn’t feature one of the first movie’s most underrated (if somewhat tacky) aspects: the glowing lightning bolt on Shazam’s chest. Shazam’s costume in the 2019 movie was manufactured in a way that allowed the bolt to physically light up, avoiding the problem of having to add awkward lighting effects during the post-production phase.

Thankfully, Shazam! Fury of the Gods‘ official trailer confirms that Shazam’s lightning bolt will glow. However, given the sleeker look of the costumes this time around, it appears that the illumination effect has been added in post. Regardless of how it’s been implemented, we’re just glad it’s a feature that’s been retained.

For more DCEU-based coverage, find out where we placed 2019’s Shazam! in our DC movies ranked article. Additionally, read up on the best superhero films of all-time or check out how to watch the Batman movies in order.

Sign up to get breaking news, reviews, opinion, analysis and more, plus the hottest tech deals!

As TechRadar’s entertainment reporter, Tom covers all of the latest movies, TV shows, and streaming service news that you need to know about. You’ll regularly find him writing about the Marvel Cinematic Universe, Star Wars, Netflix, Prime Video, Disney Plus, and many other topics of interest.

An NCTJ-accredited journalist, Tom also writes reviews, analytical articles, opinion pieces, and interview-led features on the biggest franchises, actors, directors and other industry leaders. You may see his quotes pop up in the odd official Marvel Studios video, too, such as this Moon Knight TV spot (opens in new tab).

Away from work, Tom can be found checking out the latest video games, immersing himself in his favorite sporting pastime of football, reading the many unread books on his shelf, staying fit at the gym, and petting every dog he comes across.

Got a scoop, interesting story, or an intriguing angle on the latest news in entertainment? Feel free to drop him a line.

Read More

Continue Reading


You can lock Chrome incognito tabs on Android now. Bring it to the PC!




You can lock Chrome incognito tabs on Android now. Bring it to the PC!

Chrome logo on a phone with a lock image over it

Image: Deepanker Verma / Pexels

Author: Alaina Yee
, Senior Editor

Alaina Yee is PCWorld’s resident bargain hunter—when she’s not covering PC building, computer components, mini-PCs, and more, she’s scouring for the best tech deals. Previously her work has appeared in PC Gamer, IGN, Maximum PC, and Official Xbox Magazine. You can find her on Twitter at @morphingball.

Read More

Continue Reading


Copyright © 2022 Xanatan