[MUD-Dev] ecologies and random encounters
John Robert Arras
johna at wam.umd.edu
Wed Jun 5 13:14:17 CEST 2002
I was looking at the recent threads on ecologies and resets and
simulations and random encounters of mobs in SWG and the Skotos
cellular automata articles and had been kicking around this idea
about how to make a big dynamic world without actually creating
everything in it. This is an alife/agent simulation that I tried out
that works well in a MUD context.
First, start with either a 2d/3d world or a 2d/3d wilderness grid of
rooms. Then, use the idea of random encounters as you walk along in
the world, but layer a very coarse simulation on top of the
encounters.
Before I started,
I had a few alignments/kingdoms Neutral, then others. I also had
things called societies that were used for RTS simulations, but all
I cared about for this is that they had data that would allow me to
make a good group of the mobs all at once if I had to.
Then, I decided to layer an NxN grid of sectors on top of your world
map (N is maybe 50-100?). I think the size of the sectors should be
dozens of rooms across, or what appears to be miles across in a 3d
world just to get enough room to do things.
Figure out some resource limitations for each sector. (If you have a
room-based system, this is simple, but in a coordinate system you
may have to do a little more.)
Randomly populate the world with populations drawn from the
societies. These populations contain a power rating (which is the
sum of the levels of all of the creatures in that population) and a
reference to what society spawned the population, but not much else.
>From time to time, update the grid. Updating consists of updating
the sectors asynchronously, and only a few at a time. The update of
a sector consists of the following:
- Add up the total power contained in the sector and see how
this compares to the resource caps. There may be a shortfall
or not.
- Attempt to increase the power of each population in the
sector by a percent of its present population, but scale
this based on whether or not there's a shortfall, so too
much population actually leads to a population decrease.
- Check if the populations want to settle. This just
consists of seeing if a certain percentage of the power gets
moved to an adjacent sector. This chance increases as the
resources used increase.
- Check if populations attack each other, and resolve
combat. (This was done simply by comparing the relative
powers of the two populations and giving a better chance for
the larger population to win.)
- The aligned populations may also carry out coordinated
attacks on a single enemy population (so that several small
allies have a chance vs a single larger enemy).
- The populations may also check if populations from the
same society need help in adjacent sectors. If so, they send
power to those sectors to help. A population needs help if
it loses too many combats and its alert level gets too high.
- Clean up any "dead" populations that have been wiped out
either from combat or famine.
Run this simulation over time and it looks really amazing. You start
out with a random grid of populations and they develop into large
distinct regions with possibly several populations of the same
alignment working together, and then battle lines where there's
fighting between the alignments.
I also found that making each society have bonuses to growth and
combat could also affect things dramatically in a very short time,
and that one side or the other would usually get pushed into small
corners or get killed off completely after a while.
But, I digress. The main point of all this is to have a useful
spawning system.
To do that, as players walk around the world, you generate
encounters for them. But you don't just generate random things
because they're in a forest or a desert. You look at the population
totals in the sector they're in and the more populations that are
there, and the larger that their powers are the more likely they
will encounter a bunch of society creatures.
yWhen an encounter is created, the game will load some society mobs
and the encounters should be based on the power of the population,
not the power of the player. This would force players to constantly
"clean up" the orcs near their home cities, and it would mean that
it gets more and more dangerous the farther they travel into the
wilderness (since those sectors won't be cleaned up by players as
often).
When the society creatures repop, you pick a society (or more than
one at a time) and load some of them nearby, and you reduce the
power of that population in that sector. If the mobs are killed,
that power doesn't go back into the sector population. If they are
reabsorbed without their power being added back into the population
total.
I haven't thought of many extensions yet, but perhaps you could
allow the populations to have heroes or named members and allowing
these things to be captured when a population gets obliterated in a
sector could lead to quests as they "pass" the captured princess
deeper into enemy held sectors. You might have diplomacy and allow
populations to change alignment. You could let players "track orc"
to increase their chances of finding orcs to kill. You could have
cities or outposts created in certain sectors so that you don't just
run into roving bands of creatures.
A system like this could be used to cheaply create meaningful
dynamic encounters for a huge world. Any comments, ideas? Is anyone
currently integrating something like this into their game?
John
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list