Wilderness monster flags

New ideas, features you wish were in the game.
Post Reply
Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Wilderness monster flags

Post by Berendol » Wed 18.04.2007, 14:50

Someday, mobs could be given an "appears in this terrain" flag and that would be checked instead of an array in the code. Yes, it would be more expensive CPU wise, but we've all got the extra few cycles to burn. You could easily alter the wilderness monsters without recompiling, and you could add WILD_ONLY and NO_WILD flags that allow you to create new versions of stuff out in the wild.

A few examples:

* Breeders in the dungeon could be non-breeders in the wild but would appear in groups, and have more HP... like insects, and certain jelly pit mobs.
* Mountain lions
* Ancient dragons that only appear in mountains or evil swamps (Great Swamp Wyrms anyone?)
* Mountain trolls, swamp trolls
* Desert: birds like vultures and crows
* Forest: nymphs, birds, mushrooms, cats, dogs, etc

I consider this a justifiable extension beyond Vanilla Angband because we've got a wilderness which is currently handled similarly to dungeon monster pits. But I leave it up to discussion.
By appreciation, we make excellence in others our own property. (Voltaire)

Avenger
Skeleton 2-Headed Troll
Posts: 191
Joined: Wed 04.12.2002, 21:42
Location: Wisconsin
Contact:

Re: Wilderness monster flags

Post by Avenger » Thu 26.04.2007, 03:15

Sounds good to me, and you of all people would know whether this is feasible or not coding-wise, so I assume it's doable.

I always liked the wilderness in MAngband, I think it would be nice to add even more variety and independence to it, not to mention giving players more incentive to go there, rather then dive the dungeons all the time.

Narchan and I used to go exploring the wilderness sometimes, I think it would be cool to get a group together and go fight a swamp wyrm or something, especially if monsters in the wild are allowed to drop items rather then just copper coins.
Image

Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Re: Wilderness monster flags

Post by Berendol » Thu 26.04.2007, 14:33

It's not exactly trivial but it's doable. I'm wondering if a new variant based on MAngband that focuses on exploration and the wild, instead of the dungeon, would be any good? Not like I have time for it, but it sounds fun. We'd have to make permadeath and ghost play a thing of the past and have respawn "graveyards" like in some other games.

Back in the day when I had a server, I allowed mobs to drop in the wild. I didn't have a means whereby their drops would ever get cleaned up, though, so my server's wilderness eventually turned into a gigantic treasure pile. (Some people were so OCD that they insisted upon filling entire levels down to the last floor square.)

A new wilderness generator will be useful in the future when multiple towns and predefined levels are implemented. A plasma fractal could take care of the monster difficulty ratings for the wild, but is not suitable for terrain generation. Or just make a random irregular pocket generator algorithm that simulates splattering paint on a canvas... That way there could be "pockets" of harder monsters which could be sought out and destroyed.
By appreciation, we make excellence in others our own property. (Voltaire)

Crimson
King Lich
Posts: 315
Joined: Sat 26.10.2002, 15:00
Location: Mangband Project Team Member
Contact:

Re: Wilderness monster flags

Post by Crimson » Fri 27.04.2007, 10:17

The current (and horribly inefficient) system uses something towards a fractal generator I beleive.  It simply remembers the original "seed" for any given level, and it can regenerate it from scratch.  That saves the server from having to load in each level bit from the save file, which would be untendable.

The problem here is that speed becomes an issue.   I was playing with expanding that generator a bit ago, and adding even trivial things to it slows the process down to unusable.

Something else that should probably be recoded from scratch.
Are you not entertained?
Is this not what you came here for?

-- Maximus Decimus Meridias, The Gladiator

Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Re: Wilderness monster flags

Post by Berendol » Sat 28.04.2007, 02:33

I can agree with that. I managed to wrap my brain around the way it's all generated and I can say that for such complex code, it runs quite quickly. However, its results are somewhat unsatisfactory, thus making that benefit moot.

If you store the "seeds" aka droplets in a throw-paint-at-a-canvas method, you should be able to minimize the amount of data required to load/save the terrain. You would most likely be able to keep the current method of storing the random number seed for generating the levels.

I'm not so sure that storage or even memory usage is as big of a concern as it once was. Considering that there was a 1 TB drive (single unit, single drive) on sale for $500 last week... and you can buy 2GB of RAM for under $200 nowadays... we can perhaps loosen the requirements a little.

Speed is a valid concern, even on modern hardware. A good algorithm can be the difference between 100 and 10,000 loops per second, so to that extent using the more recent features of modern standard C libraries should be very useful. (They are usually tuned pretty well.) Remember, though, that the entire world need not be generated at every sever startup. Perhaps that function should be split off into a new program? That would allow us to use the C++ STL as well, for things like array manipulation. At any rate, loading some seeds and creating the required arrays in memory shouldn't be too expensive as long as it's a one-shot ordeal at startup only. What's an extra couple seconds of startup time, really, when the server runs for days at a time?
By appreciation, we make excellence in others our own property. (Voltaire)

Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Re: Wilderness monster flags

Post by Berendol » Sat 28.04.2007, 21:00

By the way, I forgot to mention that a conversion from the current pseudo-polar system to a Cartesian (x, y) coordinate system is absolutely necessary.

I have no idea why anyone would dream up something like that, except for ease of writing generation code on hardware that was considered extremely limited ten years ago.
By appreciation, we make excellence in others our own property. (Voltaire)

Post Reply