Advertisement

Algorithms for strategy games

Started by September 23, 2002 08:42 AM
2 comments, last by thetrooper 22 years, 1 month ago
Hi, I''d like to know which kind of algorithm games like Sim City and Civilization use to reproduce city growing behaviour. Is there any link that provides info about them? Thanks in advance -------------------------------- The Trooper "You''ll take my life but I''ll take yours too"

Simcity and Civ are completely different in how they calculate pop growth. In Civ each city produces a number of the yellow food-symbols each turn, depending on which terrain (+bonus for irrigation/gov/supermarket) you make your population work on. The food goes in the foodbox, when its full it empties and pop grow by one.

Simcity uses a more complex model based on cellular automata. A more simple example of CA is Conways game of life, which you can try to download to get a feel for what it can do. Maxis don''t give an exact mathematical formula AFAIR, but basically each square calculates a lot of variables (pollution, crime, access to work/shops/schools etc) based on whats on the square (factory,church,police etc) AND the value of these variables on the neighbouring squares. One of these variables is the desirability of living on the square. If this increases, and its a housing zone, pop increases.
---------"It''s always useful when you face an enemy prepared to die for his country. That means both of you have exactly the same aim in mind." -Terry Pratchett
Advertisement
Thanks deformed rabbit. Knowing that it''s cellular automata already gives me something to work on. Are there any other algos good to make this kind of stuff?

thanks in advance

--------------------------------
The Trooper
"You''ll take my life but I''ll take yours too"

Well theres Sierras Caesar/Pharaoh etc city-builder games. These has a simpler CA than simcity, but some buildings sends out a worker, that will walk around distributing whatever the building produces to the houses the worker passes, following your roadnetwork.

I remember I once downloaded a shareware toy/utility called worldbuilder or something. It took a map where you drew in your continents, major rivers, mountains (w/ or w/o ore), and then it would use some algorithm to determine how popuklation, culture and economy would develop on this world.
---------"It''s always useful when you face an enemy prepared to die for his country. That means both of you have exactly the same aim in mind." -Terry Pratchett

This topic is closed to new replies.

Advertisement