Grasp of the Fallen
Grasp of the Fallen / Engines /

world simulation notes

Updated: 4/8/2006

How to program a world simulation



Event history

Communication delay between connected nodes (not land radius)

New nodes must be connected to existing nodes based on the type.   (i.e. a flying fortress isn’t connected to a mine, unless the mine has an elevator)


Each nodes describes the nodes it can be connected to.


The likelihood of a node appearing is determined using fuzzy logic. 


Occasionally, nodes send their data up to the parent nodes for world re-calculation. 


Each node could be given the same stats as every game characters (physical, mind, spiritual)  this will determine the flow of energy in each region.   If a node is heavily populated with one race, then it will automatically inherit the traits of that race.   When the azuni warriors move through a region, the balance is disrupted and everything moves towards azuni. 


Throughout the people of the world and nature there are many opposing forces.  Every force in the world is called an “Allegiance”.  The elements of nature and the races of creatures that populate the world all belong to one or more allegiances. Each individual character, town, continent, etc is considered a node.  The traits of each node’s allegiances are combined with the parent node when calculating the allegiances for the larger parent nodes.  A history of prior allegiances is stored in order to allow the nodes to re-balance themselves after small disruptions.  A long disruption will permanently alter the balance of a node and its parent nodes. 


“Allegiance” values are 0.0 to 1.0



for(allegiance in childNode){

parentNode.everyStat = allegiance * childNode.everyStat



The cycle for updating all the nodes in the world must be fast enough to operate on at least 20 nodes per frame.  If I calculate and sort distance to the largest nodes, I can delay processing on these nodes to happen less often.  When the game is saved, the attributes of every node have to be dumped to file.  The file could be 20mb with the current design.  If I zip the file, then it would be small, but still a lot to load at start-up.  Not to mention all the events and the completion data and the communication delay data.  There could be a million records in the database for one save game…  I don’t think its possible to run the simulation without a database. Embed sqlite for free commercial use…


The balance of allegiances for each node is analyzed to determine the events that become possible. Examples are  the building of a town, a flood, a rebel army is formed…  all kinds of stuff depending on the node type.  Each node type can only support certain children and sometimes there is a limit to how many children of one type a parent can have.


So a village can become a town can become a castle / city


Likewise, a hill can become a volcano, a mountain, a river,


I should create icons for these node types and create a simulation that animates a virtual world over time.   Make each node selectable and view its branches in real-time.  I can create virtual characters that travel the world choosing and completing events that make short term and long term changes to the world. The goal is to create a dynamic world that doesn’t evolve too drastically too fast and relies more on the main characters in order to determine its path.  This means the majority of the characters in the world are busy supporting the minority.


·         Time

·         universe

o        space

o        galaxy1

o        sun1

o        planet1

§         moon1

§         atmosphere

§         storm1

§         surface

·         continent1

·         region1

o        river1

o        bridge1

o        lake1

o        mountain1

o        town1

§         building1

·         story1

·         story2

o        room1

§         character1



©2004-2022 - All Rights Reserved. An RPG game under development by Bruce Kirkpatrick | Jetendo CMS | Web Design | Have comments? Email Me