Sign in to follow this  
Nikkon

Dynamic World: How do you...?

Recommended Posts

Nikkon    122
For the last week or so I have been brainstorming on how to actually create a dynamic or changing world. Here is some of what I have been experimenting with: 1. The Grid - basically what i am using to represent a planet (think of square matrix wrapped around sphere) This is what everything on the planet is attached to. 2. Planet Resource Generation - Stage1: Non-Living Resources (Plants/Foliage/Rocks/Mountains/Rivers/streams etc...) - during this part of the generation process Developers can either input locations for objects or have the system randomly generate the placement for a given object. Each object has generation (spawn) rules: example: (tree) * must have access to water source (can't spawn in desert) * x object nodes per planet/grid (total number allowed at any given time) * x units of resource per node (range of numbers like 1-5 units of wood "elm") * x # of objects per a given radius (how dense can nodes be placed together) * tree life-span (range) *tree maturation/birthcycle life timeline (how long till it can generate a new object (mating/seeds/etc....) Once the object has been placed in the world given the rules, it then transitions to reproduction rules which guide how fast or slow a given object can generate a new object. Normal generation rules will contain rules to specify that a given object/tree/character etc.. can never go extinct and if that does happen or doesn't have a sufficient number then it will generate (Spawn) more onto the grid or another planet/whatever..... Stage2 Generation - Npc/Characters/Creatures/Mobs these follow the generation (spawn) and reprodution (mating) rules kind of like the non-living objects. example: NPC first name: (randomly generated) last/surname; (Inherited from Mother/Father) from previous generation or generated if first generation. Model/Avatar/Looks = randomly generated options where attributes from Mother/Father have weighted options (meaning that some parents looks pass on to the kid) [Parent Information] - their story, backstory, what they did/where known for, blah blah [Sibling information] - information and stuff about other children in the family [Food Information] - carnivore/herbivore, favorite foods, foods they hate (used in spawn rules for placement as they will be spawned near the food source where they can survive) Strenght/Agility/Intelligence (Attributes) - help determine later on what the character can do, or can utilize [who they know] - friends, co-workers, people they remember, or interact with [personality info] - aggressiveness, ethical values, moral values, leader/follower, evil/good etc.... (help determine actions and professions as well as what they do, how they interact or respond to certain situations) [professions info] - what they can do as far as making or their job, where they work etc..... who they work for, their employeers/employees etc...... [government type] - follow the structure of monarchy, democracy, dictatorship [skills they can teach] - [actions they know] - [organization] - do they group with others like a tribe, later forming a city/government, are they solo or whatever.... [beliefs] - monothesic, polythesim, atheist, etc.... many more options .... blah blah blah Hopefully you can see what i've been doing with these options, but the real question here is how to take these options and generate meaningful content out of the vast amount of data..... would there be a way to create or end up with a mass effect 2 story line out of emergent (growing/dying) world? What are your ideas on content?

Share this post


Link to post
Share on other sites
klefebz    261
Well, I don't think you can get a touching story out of a machine, actually is hard to get any kind of art out of machines. Drama and emotion are imposible to measure by computers, so you can't code:

Story = generate.random.story();
while (get.story.emotion(Story) < 70)
{
Story = generate.random.story();
}

You can use lego style story creation but you will have to add a LOT of plot pieces to make it non repetitive, and also make'em fit smoothly

Share this post


Link to post
Share on other sites
Krohm    5031
I am a bit puzzled by how you put a tree (and write about a life timeline) in Stage1: Non-Living Resources.
You say that each object has certain properties, but you then show some of them by example. I suppose it would be a good idea to start from generic object properties and build on them.

In general, this system is going to be massively complicated. There's data, and there's algorithms to be fetched. One could use a scripting language to support this degree of flexibility... but to be completely honest, I'm not 100% sure I see what you would like to get.

The example of a tree is particularly interesting for me because my parent's house features a pretty large garden and I can easily tell that based on my observations, even for a tree your model is both oversimplicistic and unnecessarily complicated at the same time.

Your NPC example properties also leave me wondering on what to do with this data. Designing something like that isn't just about dumping a load of properties to mangle. Suppose your NPC is carnivore and spawned near the food source as you say. Surprise, our NPC is a landlord and would much rather pay a chef to have it delivered to him. Suddendly the system has to link the behaviour information with the economical system, which interacts with social environment to get the job done. If you want to generate an extremely generic system then we're going to have an hard time even designing it whatever meaning you're associating to the word 'designing'.

A better definition of what you want to obtain would probably be a better fit, right now, the definition is "create a dynamic or changing world". This strikes me pretty badly as most of those properties look static. You may start by reviewing all those properties to provide a method to evolve the property itself, but to do this (even just for an exercise), limiting the scope of the storming would be useful (such as: create a dynamic or changing town-looking environment).

Share this post


Link to post
Share on other sites
Nikkon    122
Quote:
Original post by klefebz
Well, I don't think you can get a touching story out of a machine, actually is hard to get any kind of art out of machines. Drama and emotion are imposible to measure by computers, so you can't code:

Story = generate.random.story();
while (get.story.emotion(Story) < 70)
{
Story = generate.random.story();
}

You can use lego style story creation but you will have to add a LOT of plot pieces to make it non repetitive, and also make'em fit smoothly


Well its not like you would ever create a story that way, but the story would evolve from the random actions of all the pieces. Like in mass effect all dialog have a (good/neutral/bad) response to them and depending on how "you" the player choose determines future dialog (story) options... what if you were replaced and the character was an npc where based on his info and generated stats could also make those choices and thus change future events.....

Seems very massive but trying to predict or create a story from random pieces like this is complexity from hell but this random interactions don't guarantee that any of the pieces will join together in some meaningful way

Share this post


Link to post
Share on other sites
Nikkon    122
Quote:
Original post by Krohm
I am a bit puzzled by how you put a tree (and write about a life timeline) in Stage1: Non-Living Resources.
You say that each object has certain properties, but you then show some of them by example. I suppose it would be a good idea to start from generic object properties and build on them.

In general, this system is going to be massively complicated. There's data, and there's algorithms to be fetched. One could use a scripting language to support this degree of flexibility... but to be completely honest, I'm not 100% sure I see what you would like to get.

The example of a tree is particularly interesting for me because my parent's house features a pretty large garden and I can easily tell that based on my observations, even for a tree your model is both oversimplicistic and unnecessarily complicated at the same time.

Your NPC example properties also leave me wondering on what to do with this data. Designing something like that isn't just about dumping a load of properties to mangle. Suppose your NPC is carnivore and spawned near the food source as you say. Surprise, our NPC is a landlord and would much rather pay a chef to have it delivered to him. Suddendly the system has to link the behaviour information with the economical system, which interacts with social environment to get the job done. If you want to generate an extremely generic system then we're going to have an hard time even designing it whatever meaning you're associating to the word 'designing'.

A better definition of what you want to obtain would probably be a better fit, right now, the definition is "create a dynamic or changing world". This strikes me pretty badly as most of those properties look static. You may start by reviewing all those properties to provide a method to evolve the property itself, but to do this (even just for an exercise), limiting the scope of the storming would be useful (such as: create a dynamic or changing town-looking environment).



I think you have hit a point on my dilema but basically I think they are necessary.... I started like this:

You have a planet (grid)(square for simplicity sake) and either the dev or using random placement of land objects (rivers, lakes etc..) you create the terrain. You set a water level for the planet. This would set or form the oceans, rivers, streams etc...

You have a list of resources that go on the planet. Based on the rules of each resource it is generated into to the world.

You have a list of characters/npcs/creatures (non-players). Based on planet & resources & rules of given character, you spawn them into the world and they reproduce if they meet requirements.....

(Think of the game of life but with better rules)

But based on player actions or npc/creature actions that would affect the environment like cutting down trees or hunting animals it would or has the possibility to change anything from resources to how npcs/creatures can survive or interact in the future. Like if people hunt bees to extinction and they are spawn or restart a 2 and the bees are responsible for the reproduction of the peoples main crop and suddenly they aren't capable of doing that job anymore, then people have to take over doing the bees job or the crop dies or doesn't reproduce.

But most of the more complex actions come from high order processing like finding a job, or learning something, or in your example paying somebody to fetch food for a chef because they don't like to cook. How would you create these responses without knowing or having a set of data to draw these conclusions from such as what they eat or what they like etc...?


But the timeline or lifespan is there if the resource would not have an infinite amount of time given optimal conditions. Like if the tree only can survive a maximum of 50 years before it dies of natural causes. (Kind of like people have a lifespan), this of course doesn't affect how fast the resource could die from outside causes like people or fire or whatever...

Share this post


Link to post
Share on other sites
Wavinator    2017
Awesome. Very psyched to see someone else working on something like this!

Quote:
Original post by Nikkon
1. The Grid - basically what i am using to represent a planet (think of square matrix wrapped around sphere) This is what everything on the planet is attached to.


Have you considered more than one grid? I've been working with grids for planets that are 250 x 100 squares, which produces aesthetically pleasing continents. These squares can resolve to lower levels of detail, but I've seen the need to represent regions of the map at a higher level for the sake of speed and overall design clarity.


Quote:

2. Planet Resource Generation - Stage1: Non-Living Resources (Plants/Foliage/Rocks/Mountains/Rivers/streams etc...) - during this part of the generation process Developers can either input locations for objects or have the system randomly generate the placement for a given object.


I just finished the bulk of this part. Quick lesson I learned: You may need to mix top down and bottom up rules to get the right visual look. For instance, I generate vegetation on a square by square basis based on temperature, precipitation and the abstract effects of wind patterns. My first attempts encapsulated all the logic in a single square, but this resulted in terrain that was too randomized. I found that I needed to process the map as a whole in some cases (e.g., spreading effects from a river to create fertile flood plains) to make things look right.

Quote:

Each object has generation (spawn) rules:

example: (tree)

* must have access to water source (can't spawn in desert)


Another way, which I've found to be faster, is to "bomb" features based on these sorts of criteria. Rather than cell by cell analysis to see if an element conforms to rules, take random samples of an area and drop clusters of (in this case) trees.


Quote:

* tree life-span (range)

*tree maturation/birthcycle life timeline (how long till it can generate a new object (mating/seeds/etc....)


You might want this if you want to be able to carve your name on a specific tree and come back 10 years later and see it. If you chop down trees, however, and want to track whether they're regrowing this might better be simulated broadly, in the form of variables tracking old and new or even in two or more sets tree "age" types with corresponding random associations.

If you treat these on an object by object basis you may be looking at an incredible amount of data.


Quote:

Once the object has been placed in the world given the rules, it then transitions to reproduction rules which guide how fast or slow a given object can generate a new object.


Again you may be better served by aggregating the simulation here. In terms of gameplay, do you really need to know the age of the 247th tree the player has encountered? Or wouldn't it be better to keep the overall state of the forest?

On the other hand it is possible to track things down to the individual tree if you use the right techniques. I read some time ago that a GD member (Ysaneya) was going to track details for procedurally generated solar systems down to the asteroid in his MMO Infinity.

I just think you should have a compelling reason to do it.

Quote:

example: NPC

...

many more options .... blah blah blah


Careful of the trap here as this can easily be a rabbit hole. I think it's fine to have a wealth of detail, but don't simulate just to simulate (that's what Sid Meier calls "the designer having all the fun"). The elements you add should do something that affects the player's experience. You're going to have to trawl all that data, and the more there is and the larger the number of NPCs you'll have to sift through the slower your simulation will run.

Quote:

Hopefully you can see what i've been doing with these options, but the real question here is how to take these options and generate meaningful content out of the vast amount of data..... would there be a way to create or end up with a mass effect 2 story line out of emergent (growing/dying) world? What are your ideas on content?


I can't speak to Mass Effect 2 but if that's what you're aiming for I'd say stop now unless you've got years to burn or nothing else going on in life.

I don't mean to be utterly pessimistic-- there are actually some interesting angles in content generation coming out of AI research, alot of which is beyond my current understanding-- but I don't think we're anywhere near coming up with Mass Effect 2 out of procedural algorithms.

Rather than an ME2 storyline, which I understand requires some strangling of player choices in order to preserve narrative, the level of detail you're talking about might work well for a sandbox game with strong goals. The storylines of most AAA titles couldn't give a fig about the age of a tree nor the lineage of a specific NPC. By simulating gobs of detail you face the very real prospect of exposing the player to myriad experiences which have little to no narrative value-- repetition, ironic results, meaninglessness, disconnected context, the works.

I think a procedural universe at the moment is a different kind of animal. If it's any consolation it may well serve a player base that does not want the kind of restraints imposed by games like ME2 (the Rogue-like audience, for instance).

Share this post


Link to post
Share on other sites
Wavinator    2017
Quote:
Original post by Nikkon
(Think of the game of life but with better rules)


If you're more interested in dynamically generated narrative that's impacted by player options maybe separate the characters from the world generation stuff. Rather than "game of life with better rules" it may be far easier to create a matrix of relationships and actions. Personally, I'd recommend keeping them abstract ("A is plotting to kill B") rather than detailed for two reasons. First, it will help cut out what may prove to be an overwhelming amount of detail ("A waited on the main trail of the King's road, hid in some bushes which conferred a stealth advantage, attacked the caravan, fought off three guards, was wounded and ultimately driven off..."), some of which should be sensitive to player changes; and second it will give you greater authorial control ("A killed the king" because the story needs for this to happen) and prevent you from having to write an NPC AI that pits its wits directly against the player's.

In terms of player choice, it might be better to go with states the player can create, possibly by shifting stats that then drive the logic for the larger narrative generation system.

But I don't know, this could all be bull-- I haven't come up with anything on paper I like let alone in code.


Share this post


Link to post
Share on other sites
Psilobe    193
Creating a dynamic, organic and living worldfaces a lot of problems. From complexity in managing and creating it to the immense computerpower that you might need. Ayway this is something I'm very interested in, having a world that feels alive. I've been working on this problem ever since spore came and became the biggest let down ever, I actually though they would try and simulate the ecosystem of a planet. :(

There is one game that actually creates a world that feels living and it's called dwarf fortress. It can be played either in strategy or rpg mode where you eitehr build up your fort or go around adventure. The two can even be combined.

The inhabitants be they cat, dwarf or antmen all affect the world. It's a highly unpredictible game and really funny.

All those dwarfs need food and booze, they love they live and they learn but also mostly they die a gruesome death. Having a bad day at work (insane dwarf who failed at making an artifact) might set him of on a killing spree slaughtering your entire fort. Linking a preasure pad wroung could flood your fort with magma.

This game blends complexity of simplicity and it makes the world feel living.


From a top down perspective I think it would be a good idea to create a small control enviroment where you can test having randomized resourses, test simple social behaviors and simple economic models. From my experience it doesnt have to be complex to be fun and feel alive.

Another game you should take a look at is Majesty 2.It's a strategy/rpg with a simple economic system that I find really great. If it had only been developed a tiny bit further and then been put in a much larger world.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this