SimNation

GlassBox Engine explained

GlassBox Engine explained
Share this article

This revolutionary simulation paradigm being implemented by Maxis on the new SimCity is, in simple words, why simulation in game will become so accurate. Let's first explain what simulation is, then jump on the new technology.

SimCity 4 and before

On the previous titles, simulation was performed statistically. If I have X citizens in this area, and the 20% of the population goes to primary school, it means that 20% of these X citizens will go to the neighborhood primary school. Using data and values, it can sort of "predict" or rather "simulate" how much power consumption there is, the traffic, etc...

However, when you see a traffic jam on SimCity 4, there are no actual sims getting stuck there. Just pan your camera away, then come back. Bam! The cars and jam are gone. It's because the game was "representing" a very high dense traffic road, with tons of cars, just because statistically there should be a lot of cars there.

GlassBox engine

This new engine instead, enables a very precise simulation. Instead of just putting a lot of cars in one road because "statistically" that road has dense traffic, each car has a reason to be there and go through there. Sims actually "decided" to go through that road. They will remain stuck even if you pan out and in again with your camera. They ARE there.

And this happens with everything. Power and water supply, garbage, jobs, not just traffic. How? To understand that, let me introduce you Agents. A very, very interesting concept. In programming, we would call this Object Orientated Programming.

Agents

Agents are objects located in the map, that represent something. Agents, when created, are told what to do, what to look for if they encounter a target, or what path to take. Among other stuff.

Let's say you spread pipes across your city, for water to go from the pump to all of the houses in a residential area. The water pump every now and then will send a Water agent through the pipes. For every house that agent "touches" through the pipes, will tell each House object "Hey, you have water". If the house was unwatered before that, it now becomes watered. If the house was already watered, it remains the same way.
If for some reason the Water agent can't reach some houses (House objects), due to pipes being blocked out of pollution, non-connected pipes or getting "consumed" by other Houses on it's pipe trip, the "unvisited" Houses will become unwatered. They must be visited every once in a while by the Water agent to "renew" the watered status.

This is how water goes through pipes and to your Sims houses. And in this way, it can perfectly simulate every little aspect of water distribution, because it actually makes water flow through pipes, you may say.

Another example. When a building requires new workforce, it will send Hiring agents around it's blocks, and those Sims willing to accept the job offer will take it. If none around does, more agents are sent farther in town. This enables to match potential workers that are closer to work first, and if none is available, try matching potential workers that live farther away.

Just like that, Sims and their cars are agents as well. Everything is an agent. The whole simulation is done through them, which makes everything happen for a reason, or not happen for a reason too. No traffic jam because there will be "statistically" lots of sims on that road on the morning commute. They are really stuck there and they are cursing you. But hey! They are ACTUALLY cursing you! That is the beauty of the engine and it's agents. Everything is actually happening, for real.

Possibilities

This creates a whole new paradigm in simulation, that is by far more accurate than previous techniques. It makes the game more intuitive as well, since everything that happens has a visible cause, and is not just predicted by stats it would happen. You can understand truly why everything occurs.

Just because of this model, the game could have very, very, very, very interesting content, and millions of ideas for expansion packs. If they open all this power to the modding community, we will probably see one of the most interesting simulation games since the launch of Spore. Seriously. The possibilities? Are literally endless.

Inside the GlassBox

Want to see more? Here is a video showing off what the engine can do. Please notice this is not the final artwork, design nor interface of the game. This is an engine test only. Of course graphics will look cooler and with more diversity of content. Now, enjoy!