Worker Teleporting: Remember Ceasar III?

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

shi4stone

Private
36 Badges
Apr 18, 2008
23
0
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Pride of Nations
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • 500k Club
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Cities: Skylines
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Wealth of Nations
  • Magicka
  • Crusader Kings II
There has been a lot of discussion on this issue. And as more people begin to realize this is probably not a bug, and some consider it a 'cheat' to overcome the computation burden. However, IMHO this is a very smart design decision, with a little more additional feature to reflect the commute time, this could strike the sweet point between realism and scalability.

And let's be frank, simcity 2013 is a real agent based game, however broken it is. This game is NOT a pure agent based simulation. The game mechanic here is more similar to Ceasar III, with the addition of traffic simulation.

Why? Because the only real agents in this game are the ambulances, garbage trucks and etc, basically all the civil service vehicles and goods transports. I call them as the REAL agent because their physical presence brings certain service to a location. Really it is the same thing as the priest, engineer, goods delivery guys in Ceasar III.

Most of the cims, i.e., the workers going to and from work, are NOT real agents. Each with a certain destination in mind, they are there just to create a traffic pattern, which may slow down the REAL agents mentioned above, thus forcing us to design a rational road network. Whether they ever reach the work place or disappear in a traffic jam has no impact on the operation of the work place at all. All the game engine needs is just to find a connection to the work place when assigning one cim to a job. (Still remember the in Ceasar III, once a citizen reached a work place, it never returns home?)

Now some may call this cheat, but I thank the developer to take this approach because I can play this game on my aging laptop. And before anyone rage-uninstall the game, think twice about whether it is really necessary to simulate every single cims as an independent REAL agent? what effect do we want/need to model anyway?

I can basically think of four, and hope others can add to it:
1. affect whether work place is operating or not depending on if the cims have arrived or left.
2. impact the customer count in commercial buildings.
3. create a realistic road traffic.
4. commute time

The first effect is really difficult to implement even with each cim as a real agent. Because then should we force a same working hour for the people? No city builder game can ever re-create the real time scale/pattern.

The second one I really would like to see, but it can be done based on the traffic amount on the road, similar to Simcity 4, which would be good enough for me at least. Otherwise more elaborated economic model needs to apply.

The third one is already achieved, that means there is working pathfinding AI, even if not optimal, but people are not always rational anyway.

The last one I think has the most visible impact on the game, as it is really easy to create a situation where people cannot reach their work place without a proper transport connection. But it is not that hard to fix. Adding a commuting time count for each cim and setting an upper limit might do. For cims living at certain place, If all the available jobs have a commuting time higher than certain threshold, then the cims cannot reach their work and will abandon the house, which takes into account the distance and the congestion along the path.

(There are two uncertain assumptions about how the game work now: first, how do cim find a job? It seems to be based on matching education level+shorter distance+random factor; second, do the pathfinding AI take into account the road congestion, i.e., if one road is congested do they change to another route in the future? this is relevant because the commuting time need to be re-caculated regularly, say every game month, to check if road congestion changes or not)

Such implementation could add considerable realism to the game without needing to revamp the game into a fully agent based simulation. I am not sure how much extra memory would be needed to store the commuting time for each cim, but possibly not much. However, any mod or update tackling this issue will need thorough test on large scale cities and see if the job-associating simulation could reach an equilibrium, because the game maybe very sensitive to the commuting time threshold and mass abandonment might occur (it might also be better to set a different value of the threshold for each cim).

All in all, if I understand the game mechanic correctly I am optimistic about seeing the teleporting issue solved. Would love to hear modders and developers’s comment on its feasibility.
 

Dinges

Sergeant
33 Badges
Nov 5, 2012
74
1
  • Stellaris: Synthetic Dawn
  • Stellaris: Nemesis
  • Crusader Kings III: Royal Edition
  • Stellaris: Federations
  • Age of Wonders: Planetfall Sign Up
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • 500k Club
  • Europa Universalis IV
  • Crusader Kings II
  • Cities in Motion 2
  • Cities: Skylines
Well, for point nr 1 I think I did see a suggestion for cims to try to go to a workplace once in a while. I personally think you can limit the CPU usage with this as long as you limit how many agents are currently trying to get to their job based on your current population. Once they are forced to teleport, some penalty can be applied to either the cim, the workplace or both. So you don't need every cim to reach their workplace all the time, but you still need a good transportation system if you don't want to fail if the penalty is severe enough.

This is probably still exploitable, but I think it is a nice compromise.

Either way, I'm not a programmer or a designer so I don't really know if this will work, but it seems like it would.
 

Illanair

Space Duck
81 Badges
Feb 28, 2011
6.337
626
  • Victoria 2
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • Magicka
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Sword of the Stars
  • Sword of the Stars II
  • The Showdown Effect
  • Cities in Motion
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • War of the Vikings
  • Stellaris - Path to Destruction bundle
  • Age of Wonders III
  • Stellaris
  • Stellaris: Galaxy Edition
  • A Game of Dwarves
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Heir to the Throne
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Cities: Skylines - Snowfall
  • Stellaris: Galaxy Edition
  • Magicka 2 - Signup Campaign
  • Warlock: Master of the Arcane
  • Pillars of Eternity
  • Victoria 2 Beta
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • 500k Club
  • War of the Roses
  • Victoria 3 Sign Up
  • Europa Universalis III Complete
  • Europa Universalis IV
Pharaoh and it's expansion had a similar mechanic.

Workplaces would have to be visited by a randomly walking "worker" that spawned from housing - Once (and if) they did, the workplace would pull workers from anywhere on the map.

Of course the game didn't have any kind of traffic component either - This was before that was even a consideration.
 

zyphial

Colonel
66 Badges
Feb 17, 2013
860
780
  • Crusader Kings II
  • Hearts of Iron IV: Field Marshal
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - After Dark
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Magicka
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • For the Motherland
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Stellaris: Apocalypse
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Conclave
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
Actually there's an easy way to satisfy the Low-CPU camp and the Teleporting Blows camp. Just make all buildings store a "worked hours" value that always depreciates over time. Any time a worker arrives to work, he dumps a flat boost to worked hours. Make worked hours trigger abandonment if they're too low, and without adding ANYTHING particularly CPU intensive or RAM hogging (at worst, an short/int to every building) you've fixed the issue. You can easily scale this in difficulty settings too.

Provided buildings have a max worked hours, what will happen is that hard to reach buildings will depreciate faster than the gain and eventually close, while easy to reach buildings will always have max worked hours.
 

Inge Jones

Colonel
7 Badges
Apr 2, 2013
951
159
  • Cities in Motion 2
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Parklife
  • Prison Architect
Actually there's an easy way to satisfy the Low-CPU camp and the Teleporting Blows camp. Just make all buildings store a "worked hours" value that always depreciates over time. Any time a worker arrives to work, he dumps a flat boost to worked hours. Make worked hours trigger abandonment if they're too low, and without adding ANYTHING particularly CPU intensive or RAM hogging (at worst, an short/int to every building) you've fixed the issue. You can easily scale this in difficulty settings too.

It still might not be totally fair, because if workers are triggered to journey to work with any sort of randomness, one factory might just by chance not get sent any of its workers for a period of time, while another gets a load of visits. However, the player would at least be aware that to give *all* workplaces the best chance the game will allow them, they need to lay good roadways. So I agree that your idea is one of the more viable ones I have seen, and one of the least disruptive for CO to implement.
 

shi4stone

Private
36 Badges
Apr 18, 2008
23
0
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Pride of Nations
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • 500k Club
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Cities: Skylines
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Wealth of Nations
  • Magicka
  • Crusader Kings II
I also think this approach can be somewhat unpredictable. To reach a stable situation, it needs quite careful test and tuning. I still think an estimated commute time based approach is easier to implement and more predictable.
 

Person012345

Field Marshal
92 Badges
Jan 27, 2010
2.594
914
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Pre-order
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Cities in Motion 2
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Third Rome
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Cities in Motion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Leviathan: Warships
  • Hearts of Iron III
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris: Necroids
  • Crusader Kings II: Conclave
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Victoria 2
It needs to happen less quickly. I can't tell if a jam is just a temporary thing from an increase in traffic or if it's a significant problem because vehicles are disappearing at the first hint of a blockage.