Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: Closed Ecosystem Roguelike  (Read 6933 times)

atomfullerene

  • Bay Watcher
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #30 on: April 16, 2010, 09:49:02 am »

Ecologist speaking here!

There are two things going on in ecology here: biodiversity and ecosystem function.  Both are somewhat connected, but not identical.  Biodiversity is basically the variety of species present, while ecosystem function is what the ecosystem does, like produce oxygen, food, filter water, that sort of thing. 

Now, both of these are valuable.  Ecosystem function is clearly valuable because the things I listed above are pretty useful.  Everybody needs clean air and water and food to eat.  Biodiversity is sometimes useful just for it's own sake....sometimes having a wide choice of animals and plants gives you exactly the thing you need: medicine discovered in some rare plant, valuable bones discovered in some rare mermaid.  But biodiversity can also help ecosystem function work better...a forest with lots of tree species will be able to have some species grow well in all its specialized environments (hilltops, flat-lands, stream sides), while one with only one tree species will produce less oxygen and lumber, because the one species won't grow as well in all the environments.  Having more species also gives you backup, so if a disease or whatever comes through and decimates one population, another is there to pick up the slack and fill in the same function.

And yes, you can expect evolution to fill in the slack.....but it's likely to take a few million years, so don't hold your breath. 
Logged

Naero

  • Bay Watcher
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #31 on: April 19, 2010, 09:48:46 am »

I've put some thought into such a system. I've been looking at creating a roguelike with advanced AI, on a level where monsters are capable of living their lives from birth to death, each one having to find food every day and discover how objects work through experimentation (or having someone else tell them). That kind of stuff.

Anyway, I realised early on that any world in which these monsters were allowed to run around within would have to be pretty robust to not either become cluttered with the accumulated crap produced by these monsters or end up a wasteland as they destroy everything. Thus the idea of a closed system wherein nothing could be created or destroyed, only rearranged.

The key here is 'pocket reality'. It needs to have consistent and logical rules that define how things work, but they don't need to mimic our reality's rules exactly (and you couldn't anyway, they're too complex). A simplified model of reality is called for. For example, I came up with the following system to act as a foundation for my pocket reality;

There is the ground. It is divided into tiles, and each tile has only two properties - what is upon the tile, and the energy of the tile. There is a basic 'entropy' mechanic that equalises energy across tiles, so a tile with high energy will transfer some energy every turn to surrounding tiles with lower energy.

Then we add plant life. Plants have one property - their mass. They take the energy from the ground tile beneath them and convert it into mass that they store. When they reach an arbitrary mass quota they convert some of their mass into seeds which they randomly spread to surrounding tiles. Yes, this means plants can never die unless eaten, but these are pocket reality rules!

Monsters can eat the plants and gain the mass the plant had. If a monster moves it transfers a small amount of it's mass into the ground, and if it runs out of mass it dies (so it has to keep eating to move, and it has to keep moving to eat!). When it dies, it adds all of it's mass into the ground, after rotting. The mass now transferred to the ground is the energy the plants eat to gain mass! Ecosystem closed!

You can let the monsters make items out of the plants, in the form of wood. When the wood rots it's added back to the ground. It's a pretty basic system anyway, but it's a start.

You still face the problem of a mischievious player killing either all plants or all monsters. The easiest solution is to make the world big enough that you can't possibly kill things faster than the areas you've just slaughtered your way through are repopulated. That won't work when your model becomes more advanced than ground > plants > monsters > ground though, as all the ecosystem talk identifies. First steps first, I guess?
Logged
Quote from: Toady One
# 03/17/2009: The broken-armed dwarf understood that he needed to run off to the hospital zone properly, but care never came, because I'm still working on that. Poor little buddy.
#  03/18/2009: He's now surrounded by many skilled medical professionals. They still aren't all that useful, but just their presence must be encouraging for him. Well, I guess that's not true either.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #32 on: April 19, 2010, 12:58:06 pm »

 ;D
Just had an idea of RTS (starcraft like) where you would go around battlefields harvesting corpses to recycle resources :)
Logged

tylor

  • Bay Watcher
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #33 on: April 19, 2010, 05:58:34 pm »

Monsters can eat the plants and gain the mass the plant had. If a monster moves it transfers a small amount of it's mass into the ground, and if it runs out of mass it dies (so it has to keep eating to move, and it has to keep moving to eat!). When it dies, it adds all of it's mass into the ground, after rotting. The mass now transferred to the ground is the energy the plants eat to gain mass! Ecosystem closed!

Yes, I also was thinking about one resource(mass) being a cornerstone of the model.

But I think that if modelled territory is really big, then there is no sense (or way)  to model each tile at every moment. Better solution is to model it like a cloud of "atoms", each one of which is an animal, plant, or group of plants or animals, or just some item placed or dropped by player or someone else. Then if player is around, it is possible to calculate each nearby based on what "atoms" are in vicinity - if there is a "conifer forest" atom, then there is a chance that some tiles will have trees, based on that atom mass and distance to it.

Or - just use "aquarium" that is comparatively small? but still self-sufficient - island or space ship (like in System Shock 2) or something.
Logged

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #34 on: April 20, 2010, 12:16:51 am »

What? Like the 'Creatures' game series?
Logged

atomfullerene

  • Bay Watcher
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #35 on: April 20, 2010, 05:45:41 pm »

We were talking about modeling ecosystems today, so I thought I'd drop in a few bits of advice for making stable ecologies:

First, divide up your terrain into semi-isolated segments-like nearby islands, caves connected by winding passages, or mountain valleys.  Dividing it up like this makes it harder for things to go extinct across the entire area:  they may be wiped out locally, but can repopulate from neighboring segments.  This also divides the game up into nice, defined areas

Second, provide prey with refugia.  This is an area where prey can live and breed but predators can't get to.  Prey constantly move in and out of these areas, and can repopulate areas where they have become eradicated.  This could also be a safe zone for early players, out of reach of major monsters

Third, use trade offs to encourage coexistance among competitors.  For example, have one species that is better at colonizing empty areas, and another that can always beat the first species and replace it in an area.  Then have some force or predator clear areas out on occasion.  You'll get a situation where the good colonizer survives by getting into newly cleared spots quickly, and spreading from there, while the good competitor survives by displacing it from places where it lives.  The player could use this...for example, if you want healing salve plant you could clear out a patch of ground and wait for it to grow there, or if you want tasty food plant you defend an area from disturbance, giving the plant a chance to grow.
Logged

Grakelin

  • Bay Watcher
  • Stay thirsty, my friends
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #36 on: April 21, 2010, 12:43:16 am »

What? Like the 'Creatures' game series?

The ecosystems in Creatures 3 (the only one with an actual ecosystem, as far as I am aware) is astoundingly simple and boring. It actually kind of ruined it for me, because things kept getting in my way.
Logged
I am have extensive knowledge of philosophy and a strong morality
Okay, so, today this girl I know-Lauren, just took a sudden dis-interest in talking to me. Is she just on her period or something?

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #37 on: April 21, 2010, 06:41:13 am »

Alright, I haven't played it really. But the aquarium ecosystem is there. And as you've noticed it doesn't work well.
I think the main problem with ecology in games is different degrees of realism for different objects in game. Like, in strategies, the player is given an ability to pop out soldiers almost indefinitely, but animals are left with long spawn periods. Or, in a roguelike, ridiculous regeneration-healing rates for the player, without modeling of how it will affect the rest of the world.
Also, it will be really hard to model an ecosystem without evolution. I think it's nigh to impossible to include manually all the necessary components/species for it to sustain itself.
It's even possible that trying to model closely a closed ecosystem in computer is a futile idea, as far as games go. You will probably have to make it just "kind of closed", with some invisible external forces like DF migrants to keep the equilibrium.
Logged

tylor

  • Bay Watcher
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #38 on: April 21, 2010, 12:55:24 pm »

We were talking about modeling ecosystems today, so I thought I'd drop in a few bits of advice for making stable ecologies:
Thanks, it's very good ideas.
Logged

Grakelin

  • Bay Watcher
  • Stay thirsty, my friends
    • View Profile
Re: Closed Ecosystem Roguelike
« Reply #39 on: April 21, 2010, 06:55:48 pm »

Like, in strategies, the player is given an ability to pop out soldiers almost indefinitely, but animals are left with long spawn periods.

I think a game where you have a certain number of people in a village that reproduces over time, and you have to draw all the jobs from that would be interesting.

Which is actually just Dwarf Fortress, but without migrants and preferably at a faster speed to make up for the fact that people can only be born, never collected through migration.
Logged
I am have extensive knowledge of philosophy and a strong morality
Okay, so, today this girl I know-Lauren, just took a sudden dis-interest in talking to me. Is she just on her period or something?
Pages: 1 2 [3]