A modern day large-scale city builder and simulator. Much like games such as SimCity and CitiesXL, this will focus more on city layouts and the dynamics that arise from those layouts, and less on acquiring resources and working through building and tech trees, and many of the smaller-scale city sims do.
Creation will be at the center of this game, so I want to make sure that the process of designing and building is fun, intuitive, and rewarding. One of my main complaints with most city builders is the lack of separation between design and building: Most building and zoning takes place immediately (and consumes money/resources immediately), even if the player realizes ten seconds later that it doesn't work right or look right.I instead intend to support a design mode in which an individual project can be designed freely, and then construction of the project can be initiated at any later time, or not at all. Multiple projects can be in the design or construction phase simultaneously. It will be left up to play testing to determine whether construction should take time as in real life, or should be instant as soon as the player approves a design.
Recent similar city builders have attempted to allow (or even require) multiplayer. Although their implementations of multiplayer have been lacking, I believe the impetus is appropriate. If you look at games like MineCraft or Terraria, it is clear that many people have a ton of fun building things in a sandbox environment together. That isn't yet available for modern city builders, and I suspect there would be a huge interest in it, if it were done correctly.
Region play seen in other attempts is probably motivated mostly by technical complications, but I hope to enable multiple simultaneous players within a single city. Design mode projects should go a long way toward helping with this, since no player will be able to directly modify the city itself. Instead, each player can privately design their own projects (other players might be able to observe but not modify the designs). Once a project is approved, it is the simulation itself that modifies the city, reducing the complications with incompatible simultaneous modifications.
Roles and rights might even be highly configurable. Players could be conceived as members of a city council, and an approval vote by at least 60% of council members might be required before a project can proceed to construction, for example. Certain players might also have their design rights restricted to certain areas, so that players have their own townships that they focus on. Or perhaps players divide up responsibilities in other ways, such as granting transportation design to one player, light residential/commercial to another player, heavy residential/commercial to a third, and industrial to a fourth. Players could also be granted different tiers of access, with senior and junior council members.
The SimCity series has historically enabled user-generated content to great effect, as can be seen by the popularity of the Urban Renewal Kit with SimCity 2000, the Building Architect Tool for SimCity 3000, and the amazing array of high quality mods available for SimCity 4. I want to enable that same enthusiasm and skill, and hope to take it a step further with a system designed to ease the process of distributing, acquiring, and managing content. Dependencies, versions, licenses, and incompatibilities are all impediments to fully taking advantage of the player community's ability to create great content. I have some ideas that are intended to eliminate or at least reduce the severity of these problems, and a city builder would be the perfect platform for such ideas.
Further progress is being made on this prototype, though not as quickly as I had been hoping. A major hurdle has been overcome recently, though, so perhaps progress will pick up the pace again.
New in this version is real activity in the simulation. Projects can be approved, time can be started or paused. Land, coal, and construction labor are now all generated, traded, and consumed in order to build roads, houses, and mines. Residents even update their price beliefs as they succeed or fail in buying coal at various prices. These prices can change when mining companies build local mines, as they sell coal more cheaply than imported coal.
The next few steps should introduce employment, commercial retail, local construction companies, and a more nuanced economy. Then I'll tackle integrating a traffic simulation. From there, I'll add some polish and should then be able to consider this particular prototype complete.
Here's a blog post about some technical challenges I overcame: Slowly Adapting to Data Oriented Design.
This prototype is the result of a recent session of project planning to a primitive version of the game functioning with rudimentary implementations for all of the most core elements, most notably the framework, graphics, simulation, and interface.
I'm about halfway through the development, and have a decent amount of the planned framework, graphics, and interface complete. Simulation is up next, with agents and resources interacting with enacted projects, basic economy and traffic flow influencing the simulation, and agent behavior being affected by a few key agent states, such as wealth and happiness.
Read more about the planning process and status in the blog post: Project Planning is a Good Thing.
The beginnings of a traffic simulation prototype, designed to test how far I can push the limits of simulation detail, size of map, and number of agents on a typical consumer computer.
This initial prototype involved the creation of various data structures. The first is for building the map, which is currently hard-coded, but should eventually be procedural, so that I can simulate large cities without having to tediously design them. The second is for representing the full details of the map in the easiest to consume manner. Not efficient at all. The third is for efficient pathfinding, containing only the data that the A* algorithm needs to do its job. Eventually I hope to optimize the memory layout too, so that it is very cache friendly.
Currently, the A* algorithm is buggy, and generates wildly non-optimal paths. Check out some examples of the wackiness here.
Next step (aside from fixing the pathfinding) is to simulate the movement of traveling agents over time along the paths found, building up congestion data and modifying travel times accordingly. Along with that, I'll likely add some basic profiling code and start generating some stats. Once I get large complex maps generated, it'll be time to focus heavily on optimization, to see how far I can push those stats!
A simple model, consisting of the following elements:
- 1 residential building
- 1 resource
- 1 industrial building (spawns the resource)
- 1 retail commercial building (sells the resource)
- 1 service commercial building (construction)
- 1 transit type (on foot)
I want to use this simple model as a basis to test data-oriented design and an entity-component-system architecture for their fit with a city simulator that needs to crunch a lot of data. I hope to also test a synchronized simulation model for networked play, where all clients run the simulation identically, and pass minimal data across the network to remain synchronized.