Jump to content
  • Advertisement
Sign in to follow this  
AoS

Generating Dynamic Content

This topic is 2537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been thinking a lot about this topic in designing my game. I am making a virtual world for my game environment, or more properly, an infinite number of virtual worlds. I am creating a player driven economy with an emergent political system.
However, a big problem I have is with the environment. I can generate static factors like various resources. But its important for the game to have a good pve system as well. Now some games have tried a natural system and the players immediately came in and killed everything before it could kick in. Essentially it is necessary to use a fiat system. Natural systems won't work because the game isn't real. If you introduce consequences of player actions on the environment you are just going to have a crashed game because players can't possibly understand the real results of their actions. This is why creatures spawn from nowhere rather than somewhere.
I was thinking that given my multiworld system, a good way to generate monster spawns is by having rifts, no Rift jokes please, which are permanent and constantly generate monsters. Monsters spread out from the rifts based on their power. Stronger monsters take longer to spread from the rifts. The concentration of all creatures is greater at the rifts. A given world possesses a number of randomly placed rifts equal to the number of players. I will probably fiddle with the equation, maybe apply roots or division to the number because a world can't actually hold that number of rifts if the population gets too large and possibly the creature per area value will be too high to survive. Perhaps a rift forms as soon as one player arrives and each rift is worth 10 or 100 players and the power of its release grows with that number of players. And once it maxes out a new rift forms. I have also not decided whether the creatures from various rifts will fight or be on the same side.
I am thinking that varying kinds of walls can restrict some creatures. So smaller creatures can't pass dirt walls, and medium ones cant get past log palisades and what not. Large creatures need stone walls, very large need metal reinforced and huge creatures need enchanted defenses or whatnot. It will probably be a number based system actually, but generally their will be those tiers connected.
Now that is how the standard monster distribution will be set up. There may be a random chance that a monster will choose to nest somewhere and stop spreading out from the nexus. This may be based on if it likes caves forests rivers valleys mountains and so forth.
Now I also want some more random dynamic creature events. I suppose I could have temporary gates to other worlds. I might even be able to set it up so that a group of monsters from another world opens their own gate in a remote part of the world and begins bringing in troops for conquest or something. But I am trying to think of other methods.
Players are able to set up gates to new worlds as well for pvp and also just finding new resources, but that is crafting and pvp and not pve.
Aside from world gates I am trying to think up other automated dynamic events. Perhaps very high level creatures already in the world could do very things. Maybe creatures can evolve in a way. For instance over time as they age dragons could grow in stats and gain powers. They might be able to breed and spawn new dragons. Perhaps they gain intelligence or decide to attack the nearest settlement. Maybe they decide to enlist other high intelligence creatures or open a new rift. I would really like the game to generate its own such events of varied kinds and levels of danger.
In any case since my game is free form I would really like to get away from quests.
Now one issue I have with this system is that it may overwhelm a given world. Suppose that there are 1000 players in a world and 10 max level rifts. Suppose that some of them transfer through a gate to colonize a new world. Then suppose that an AI monster invasion sparks up. No one explores the area for a long time and the forces there build up. Maybe some demons or dragons already in the world become more powerful and start armies and attack players. Since there is no inherent safe zone, aside from perhaps the area directly around a gate terminus which may be "protected by a higher power" or "the laws of physics"(in which case the initial and later player made gates would be separate from the rift system for monster) it could be possible for players to "lose" a world, at least for a period of time until players create a sufficiently powerful group to reclaim said world. It is likely that players would react very poorly to being forced out of a world where they have a lot of investment due to pve forces.
Now in many cases it is possible that even with a lot of rifts players will be able to effectively "tame" a world from a pve standpoint. There will be a way to suppress a rift, although it is complex. But is that balancing enough considering the possibility of losing a world?

Share this post


Link to post
Share on other sites
Advertisement
Wow...lot of text. A management summery and/or more structured text would help :P

Nevertheless, I had an similiar approach in mind for my game and implemented it to some degree. Now I'm going back to mix more designed content with dynamic content. Here're the reasons:
1. Balancing hell:
Automatically simluation of different creatures which expand on your map is really hard. When you want to prevent that the fittest creature expands on the whole region or even world, you need some good balancing between creatures (creature-player is hard, but creature vs creature makes it even harder). Just one simple flaw in your balancing (i.e. a weak monster with very high health) could result in a dominating population which is on the other hand easy meat for any experienced player.

2. Missunderstanding = bug
An earnest issue with procedural content is, that when the player encounters something, but doesn't know why this has happenend, he often declare it as bug or bad design. A simple example:

A dragon is born in a mountain, the mountain is attacked by undead , the dragon needs to flee into a nearby forest where he grow more powerful. At some time the dragon encounters a crypt filled with undead, being so powerful and hating the undead, the dragon destroys all undead and makes the crypt his new hord. (developer=amazed).

A noob player went from his newbie town to some nearby crypt, other players have told him, that there are some simple undead which could be grinded. But the player encounters a powerful dragon and dies very quickly(player=frustrated).

The player is frustrated and thinks, that this was a really bad design decision. When you do something like this, you need to deliver the story. Take as example dwarven fortress(a procedural world simulation similar to your approach), every entity has a log of all events of his whole life. When something like this would happen, the player would look at the log to understand the scene, the log will tell him the story.


Tell a story
I think that procedural content generation can help a lot, but you need to be very careful to choose the right degree. You need to tell the player a story, either a designed story or a procedural story, just don't create some procedural algorithm and confront the player with the final result only. A good way is to mix procedural content generation with design templates. Eventually procedural content generation should be tool to make the design of your world easier, but don't expect to let these generation tools do all the work for you, it would not result in an interesting world.

Share this post


Link to post
Share on other sites

Wow...lot of text. A management summery and/or more structured text would help :P

Nevertheless, I had an similiar approach in mind for my game and implemented it to some degree. Now I'm going back to mix more designed content with dynamic content. Here're the reasons:
1. Balancing hell:
Automatically simluation of different creatures which expand on your map is really hard. When you want to prevent that the fittest creature expands on the whole region or even world, you need some good balancing between creatures (creature-player is hard, but creature vs creature makes it even harder). Just one simple flaw in your balancing (i.e. a weak monster with very high health) could result in a dominating population which is on the other hand easy meat for any experienced player.

2. Missunderstanding = bug
An earnest issue with procedural content is, that when the player encounters something, but doesn't know why this has happenend, he often declare it as bug or bad design. A simple example:

A dragon is born in a mountain, the mountain is attacked by undead , the dragon needs to flee into a nearby forest where he grow more powerful. At some time the dragon encounters a crypt filled with undead, being so powerful and hating the undead, the dragon destroys all undead and makes the crypt his new hord. (developer=amazed).

A noob player went from his newbie town to some nearby crypt, other players have told him, that there are some simple undead which could be grinded. But the player encounters a powerful dragon and dies very quickly(player=frustrated).

The player is frustrated and thinks, that this was a really bad design decision. When you do something like this, you need to deliver the story. Take as example dwarven fortress(a procedural world simulation similar to your approach), every entity has a log of all events of his whole life. When something like this would happen, the player would look at the log to understand the scene, the log will tell him the story.


Tell a story
I think that procedural content generation can help a lot, but you need to be very careful to choose the right degree. You need to tell the player a story, either a designed story or a procedural story, just don't create some procedural algorithm and confront the player with the final result only. A good way is to mix procedural content generation with design templates. Eventually procedural content generation should be tool to make the design of your world easier, but don't expect to let these generation tools do all the work for you, it would not result in an interesting world.


My simulation isn't that complex. Creatures probably won't fight I think. They will coexist and attack players together. So no creature competition.
My game is sandbox, not theme park, it doesn't have rails. Players won't just stumble into a battle anyways, if they see a dragon they could run. And in any case with dynamic pve assaults on settlements the creatures will be hitting you out of nowhere and could be just as powerful as something in a lair so being smashed out of nowhere is hardly a novel occurrence. My game really isn't designed particularly for casuals.
Sandbox games don't tell stories. You do what you want. Even the pvp is player controlled.

Share this post


Link to post
Share on other sites
I recommend checking source codes of roguelikes, these are best to learn about generated content.

As for monsters spawn, this is traditionally limited by the number of monsters (generating stops after a certain thereshold in a region has been reached).

I might even be able to set it up so that a group of monsters from another world opens their own gate in a remote part of the world and begins bringing in troops for conquest or something.[/quote]Too complex, everything too complex :D Make a game not a simulator.

Share this post


Link to post
Share on other sites

I recommend checking source codes of roguelikes, these are best to learn about generated content.

As for monsters spawn, this is traditionally limited by the number of monsters (generating stops after a certain thereshold in a region has been reached).

I might even be able to set it up so that a group of monsters from another world opens their own gate in a remote part of the world and begins bringing in troops for conquest or something.
Too complex, everything too complex :D Make a game not a simulator.
[/quote]

It is a game, and its not too complex. DF is a million times more complicated. Although it is single player and unwinnable.

Share this post


Link to post
Share on other sites
@AltarofScience
So you want dynamic enviroments? Those rifts that pop up might change dynamically but once there, it sounds like they are very static. Also is this what you really wanted? It does sound a bit monotonous. I would probably go for something inspired more by real wildlife. Rifts are not very realistic, and not very exciting either.

I would probably focus more on how the monsters behare, rather than how they are spawned. Especially not making it a rift game, just to make spawning "realistic".


Some of my ideas:

Make areas quite large (areas where no players cover it by their LOS).
The world consists of creatures, and often found in groups. Whenever a player is not in the vicinity of a group, you will only keep track of group information.
Whenever a player get's close enough, the individuals in the group are generated, but there will be a group ai still "commanding" the individuals. Group AI will validate it's own situation. If things looks to bad it might try to escape. If it is taking damage, but unable to return damage, it migh consider changing to a different strategy (alternatively run). You could also do this with lone wanderers.

Most of these groups should be engaged in some prey/hunter relationship. These could happen even though no player is in the vicinity, only here the result is calculated. When a player is near such an occurence you will see it in real time.

Give these groups interesting behaviours, like attack a young member of a group, and get the entire herd after you. Make Some big grasser, and in large herds. When you scare them, the entire herd will flee, and in the same direction. This would be very difficult if every individual acted on their own, but with a group ai, it can simply command every animal to move in a specific direction. You might think players would be able to clear out a herd, but it's not that easy when the herd will flee (after taking a few losses), and they will move very far away, and at a much faster pace than you. The creatures themselves are adaptable.
You could genereally make creatures intelligent in when they fight and when they flee. They don't just stand around waiting to be slaughtered. This way you could make kills less rare (not 3/minute), but that means you can also make them more rewarding, not to mention that the mechanics to take down someone could be much more sophisticated.

You should make "safe" areas and treacherous areas. In "safe" areas there are no powerful predators that will track you down. In treacherous areas there would be computer controlled groups that would track you down, or waylay you whenever they believe you are an easy target, but the rewards are much greater here. Give players many tools to survive in the wilderness. Combat is an important aspect, but being able to go through dangerous areas should also be very important. It should be more than just a rogue specific sneak ability.

Oh, and groups could spawn wherever there aren't any players in the vicinity (preferably). The map could be made up of a network of small paths, with satisfying density. Groups will move along, and spawn on these paths (a group could store scent on paths, which predators are able to follow).

You could also mix in less intelligent creatures that could spawn by coming down of tree's, rising up from the sea. These could also be player triggered. In secret world you can set of car alarms which will make zombies appear.

Share this post


Link to post
Share on other sites

@AltarofScience
So you want dynamic enviroments? Those rifts that pop up might change dynamically but once there, it sounds like they are very static. Also is this what you really wanted? It does sound a bit monotonous. I would probably go for something inspired more by real wildlife. Rifts are not very realistic, and not very exciting either.
[color="#ff0000"]Well the problem is that that doesn't work. UO tried to do realistic environments and they didn't work. People fucked it up. They are realistic in my game world and even if they weren't its a fantasy video game. They are perfectly in line with my game world flavor. Rifts are just the UI for the spawn point if you want to look at it that way. A single rift is dynamic in that more players up to a point change the output of the rift and that the monster content of an area changes. Further the way rifts work as I describe they generate danger areas as a side effect of their existence. Numbers of monsters and power of individuals rise as you approach the rift. In addition the spawning of new rifts is constant. and they can spring up nearly anywhere. A rift springing up next to your town causes a dynamic event in the sense that you are now in danger of being slaughtered and overrun and losing your town. Further in combination based on placement and random spawning patterns rifts produce even more events. Further the rifts were described in the op as the replacement to hand placed spawns. The content focused entirely on being dynamic is the monster evolution and such. The rift created events are really cool side effects that i hadnt originally considered.
I would probably focus more on how the monsters behare, rather than how they are spawned. Especially not making it a rift game, just to make spawning "realistic".
[color="#ff0000"]Monster behavior is quite complex in the game. In fact as I have been reading RK's blog I realized I have been unintentionally rediscovering many of his ideas. Monsters have individual behaviors based on type, preferred biomes, nests and species behavior related to nests. Dragons can go on a "mating quest" among other complex behaviors.

Some of my ideas:

Make areas quite large (areas where no players cover it by their LOS).
The world consists of creatures, and often found in groups. Whenever a player is not in the vicinity of a group, you will only keep track of group information.
Whenever a player get's close enough, the individuals in the group are generated, but there will be a group ai still "commanding" the individuals. Group AI will validate it's own situation. If things looks to bad it might try to escape. If it is taking damage, but unable to return damage, it migh consider changing to a different strategy (alternatively run). You could also do this with lone wanderers.
[color="#ff0000"]There is some AI, don't feel like details.
Most of these groups should be engaged in some prey/hunter relationship. These could happen even though no player is in the vicinity, only here the result is calculated. When a player is near such an occurence you will see it in real time.
[color="#ff0000"]Monsters do not have cross species behaviors. Some monsters have increased intelligence functions where they might lead other monsters even of different types, but its not standard.
Give these groups interesting behaviours, like attack a young member of a group, and get the entire herd after you. Make Some big grasser, and in large herds. When you scare them, the entire herd will flee, and in the same direction. This would be very difficult if every individual acted on their own, but with a group ai, it can simply command every animal to move in a specific direction. You might think players would be able to clear out a herd, but it's not that easy when the herd will flee (after taking a few losses), and they will move very far away, and at a much faster pace than you. The creatures themselves are adaptable.
You could genereally make creatures intelligent in when they fight and when they flee. They don't just stand around waiting to be slaughtered. This way you could make kills less rare (not 3/minute), but that means you can also make them more rewarding, not to mention that the mechanics to take down someone could be much more sophisticated.

You should make "safe" areas and treacherous areas. In "safe" areas there are no powerful predators that will track you down. In treacherous areas there would be computer controlled groups that would track you down, or waylay you whenever they believe you are an easy target, but the rewards are much greater here. Give players many tools to survive in the wilderness. Combat is an important aspect, but being able to go through dangerous areas should also be very important. It should be more than just a rogue specific sneak ability.
[color="#ff0000"]Say could instead of should. Don't tell me what I should do. The rift mechanic provides automatic safety/danger systems.
Oh, and groups could spawn wherever there aren't any players in the vicinity (preferably). The map could be made up of a network of small paths, with satisfying density. Groups will move along, and spawn on these paths (a group could store scent on paths, which predators are able to follow).

You could also mix in less intelligent creatures that could spawn by coming down of tree's, rising up from the sea. These could also be player triggered. In secret world you can set of car alarms which will make zombies appear.


Responses in red.

Share this post


Link to post
Share on other sites
Say could instead of should. Don't tell me what I should do. The rift mechanic provides automatic safety/danger systems.[/QUOTE]
I did say they were my ideas, and so by should, I mean how some of the mechanics are supposed to be in my fictional mmo wilderness. You can look at it as suggestions.

Well the problem is that that doesn't work. UO tried to do realistic environments and they didn't work. People fucked it up[/QUOTE]
I was talking about dynamic/interesting behaviours, not that monsters needs to follow a realistic reproduction/eating pattern. You could however make spawning a little more sophisticated than popping out of thin air on a fixed location regardless of wether any player is nearby.
Oh, and the realistic part is that by making dynamic/interesting behaviours, it is often a good idea to look at what you see in real life.

UO's realistic ecology could work with the right game mechanics. You could make a hybrid, where mechanics stabilizes this dynamic ecology.
A simple stabilizing implementation would be to add a fairly significant base to every animal (about half the typical population). You could kill every wolf you can see, but the actual population (when determining reproduction) would still be a decent amount. So the typical amount of wolves you can see in a zone is 500, then you have a base of 500 wolves. If wolf population is only 100, then the base would contribute to a total population of 600 wolves (60% reproduction rate of typical case).
A large population of wolves in neigbouring zones could also lead to immigration to less populated zones.

There is some AI, don't feel like details.[/QUOTE] What do you mean?

Monsters do not have cross species behaviors.[/QUOTE] But this is exactly what is so important. It is what makes the world come to life.

Dragons can go on a "mating quest" among other complex behaviors.[/QUOTE]
How will you visualise this? A dragon going on the mating quest means nothing by itself. It is how you visualise this that really matters. Mating calls, mating rituals, competing against other males etc.

Share this post


Link to post
Share on other sites

[color="#ff0000"]Monsters have individual behaviors based on type, preferred biomes, nests and species behavior related to nests.

This is really funny, I use almost excatly same terminology in my game, but I dumped most approaches due to the complex handling and the lacking relevance to the player.
I hope you're more successfully than me.

Your rift system reminds me of tabula rasa(sci-fi MMORPG), instead of rifts, some kind of drop ship releases hords of enemies (including conquering/defending outposts).Whatever technology they used, as player it felt like scripted events/standard spawning.Tabula rasa has been shut down, but maybe you can still find some more information about the used technology, a post-mortem, player reviews etc.

The following passage is more about a philosophy of procedural content generation (atleast this is a forum to discuss such things :wink:), feel free to skip it :P

Your approach sounds good, but I'm telling you this to motivate a better focus on the target audience . There's always the danger of making a game, or let's say a simulation, which satisfy the developer , but the players, your audience, don't see the benefit of such a system, even worst, see more bugs and cheats than gamedesign.

Although I recommend to read some AI articles. A common issue with AI in games is, that 'clever' behaviour of the AI will not be interpreted as 'clever', more as 'bug/cheat', by the player. From the player point of view it is often better to let your AI agents talk about their actions, instead of just doing the 'clever' things. An example is, that the AI discovers, that the player is hiding, then sneaks up to the him and throw a grenade into the hiding spot. The player doesn't see the 'clever' behaviour, he just see the game-over screen and things about a cheating AI.

Procedural content generation is similar to AI (kind of god AI, creating and managing a world) and there're similiar pitfalls. One pitfall is the story. With story I don't mean written text, with story I mean the story of an image, an object, a character, an environment etc. When you encounter a forest, with blood splattered on the ground, plants which has been trampled etc. this environement tells you the story about a recent battle.

It is like a book story. A story without conflict is not a story. It like prince charming has been born, meets pricess boring, marries her, got some childs, dies from age, fin.... that is not a story. You need conflicts, an evil mage who wants to steal the pricess, threatens the children, an other prince who wants to marry your princess etc.

A story without conflict is like a procedural world without 'story'.

Share this post


Link to post
Share on other sites

Say could instead of should. Don't tell me what I should do. The rift mechanic provides automatic safety/danger systems.

I did say they were my ideas, and so by should, I mean how some of the mechanics are supposed to be in my fictional mmo wilderness. You can look at it as suggestions.
[color="#ff0000"]mmk, i am nitpicky about words.
Well the problem is that that doesn't work. UO tried to do realistic environments and they didn't work. People fucked it up[/QUOTE]
I was talking about dynamic/interesting behaviours, not that monsters needs to follow a realistic reproduction/eating pattern. You could however make spawning a little more sophisticated than popping out of thin air on a fixed location regardless of wether any player is nearby.
Oh, and the realistic part is that by making dynamic/interesting behaviours, it is often a good idea to look at what you see in real life.
[color="#ff0000"]the rift is only the base point of the spawn. monsters move out from there. besides my monsters will generally not be wolves.
UO's realistic ecology could work with the right game mechanics. You could make a hybrid, where mechanics stabilizes this dynamic ecology.
A simple stabilizing implementation would be to add a fairly significant base to every animal (about half the typical population). You could kill every wolf you can see, but the actual population (when determining reproduction) would still be a decent amount. So the typical amount of wolves you can see in a zone is 500, then you have a base of 500 wolves. If wolf population is only 100, then the base would contribute to a total population of 600 wolves (60% reproduction rate of typical case).
A large population of wolves in neigbouring zones could also lead to immigration to less populated zones.

There is some AI, don't feel like details.[/QUOTE] What do you mean?

Monsters do not have cross species behaviors.[/QUOTE] But this is exactly what is so important. It is what makes the world come to life.
[color="#ff0000"]monsters killing each other isn't really that useful to gameplay.
Dragons can go on a "mating quest" among other complex behaviors.[/QUOTE]
How will you visualise this? A dragon going on the mating quest means nothing by itself. It is how you visualise this that really matters. Mating calls, mating rituals, competing against other males etc.
[/quote]
[color="#ff0000"]essentially a dragon would head towards the nearest lair of a dragon of another sex, so it would be out of its normal territory. A new dragon would be spawned from this. Baby dragon's are weaker but they do grow eventually.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!