Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: the future distribution of ore  (Read 987 times)

schnobs

  • Bay Watcher
    • View Profile
the future distribution of ore
« on: March 17, 2007, 08:38:00 am »

Toady:  
quote:
The veins [...] aren't arranged in any meaningful way. They could either be arranged by depth vs value, or just made more rare based on value.

Local Map

Putting more valuable ores deeper into the mountain would perhaps be the best approach, gameplay-wise. However, I can foresee some difficulties. Looking at the map, I guess "deep inside" would be towards the right edge -- but I can envision sites where it wouldn't be easy to figure out where the mountain is deepest, or where no part is deep enough to qualify for precious ores.

A rarity vs. value approach might be easier to implement approach. Of that, there's two sub-variations:
a) smaller veins: you'd have a reasonable chance of finding some platinum even very early on. However, each individual vein would yield only small amounts, eventually forcing you to dig far and wide on your search for more of it.

a) fewer veins. You might need to dig forever until you discover the deposit; There might be only one or two on the whole map. However, once found, your fortress would be awash with the stuff. By and large, I like this one more; the only problem I foresee is that you may lose many many artisans to fey moods until you eventually discover the vein.

[ March 17, 2007: Message edited by: schnobs ]

[ March 18, 2007: Message edited by: schnobs ]

Logged

herrbdog

  • Bay Watcher
    • View Profile
Re: the future distribution of ore
« Reply #1 on: March 17, 2007, 10:03:00 am »

Did I miss an update? Or is that a screenie from Toady for the next update? My mountain face is still a straight line...
Logged

Ichyta

  • Escaped Lunatic
    • View Profile
Re: the future distribution of ore
« Reply #2 on: March 17, 2007, 10:04:00 am »

It's a screenie from Toady of what's to come.
Logged

Aquillion

  • Bay Watcher
    • View Profile
Re: the future distribution of ore
« Reply #3 on: March 18, 2007, 02:29:00 am »

Honestly?  Since we're only doing it once when the area for the fortress is detail-generated, I don't see why the game can't take the time to generate actual depth.  I'll bet there's an easy algorithm to do it, too...  hmm.  Go over the map, mark every internal square that's adjacent to an outside square with a depth of 1.  Then, recursively go over the map, and each time mark every unmarked square that is adjacent to a marked square with the lowest adjacent marked square's number + 1.  Presto, you have exact depths for every square.

Worried this will take too long?  Just do it for 10x10 blocks or whatever--that's close enough, really.  Divide the map, representationally, into 10x10 blocks, then go over all of them and mark any that contain external squares as '0'.  Then, proceed as in the previous example, marking each unmarked 10x10 square as the lowest of its neighbors + 1 on each iteration.  Shouldn't take too long, really.  Presto, you can now distribute ore, gems, and features based on the depth of these 10x10 squares.

If you use lists of adjacent unmarked squares properly and update them as you go, the algorithm works in linear time, too.  The 42 * 42 = 1764 10x10 squares in a typical map would take no time at all.

[ March 18, 2007: Message edited by: Aquillion ]

Logged
We don't want another cheap fantasy universe, we want a cheap fantasy universe generator. --Toady One

Chthon

  • Bay Watcher
    • View Profile
Re: the future distribution of ore
« Reply #4 on: March 18, 2007, 04:52:00 am »

You wouldn't even need to do this often, once upon map generation would be enough.
Logged
''d be perfect if I weren''t so arrogant.

schnobs

  • Bay Watcher
    • View Profile
Re: the future distribution of ore
« Reply #5 on: March 18, 2007, 04:35:00 pm »

quote:
Go over the map, mark every internal square that's adjacent to...

That's beside the point. Look at that screenshot. See the valley up north? Good.

Now imagine there'd be several small dells dotted all over the map. Or a narrow valley running up the middle. As a result, no place on the entire map would be deep enough to qualify for the good ores.

Logged

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: the future distribution of ore
« Reply #6 on: March 18, 2007, 05:04:00 pm »

I think a combination of the mentioned systems would be good.  Allocate depth in terms of 8x8 chunks and have only five or so depth levels.  You wouldn't have to dig particularly deep to get to the good stuff, but at the same time you wouldn't be able to just dig lightly either.

I think the allocation should be in terms of many smaller veins as opposed to fewer larger veins.  It's always a matter of luck in the current game, and while that's good for realism it's pretty piss-poor for gameplay.

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Aquillion

  • Bay Watcher
    • View Profile
Re: the future distribution of ore
« Reply #7 on: March 19, 2007, 03:20:00 am »

quote:
Originally posted by schnobs:
<STRONG>

That's beside the point. Look at that screenshot. See the valley up north? Good.

Now imagine there'd be several small dells dotted all over the map. Or a narrow valley running up the middle. As a result, no place on the entire map would be deep enough to qualify for the good ores.</STRONG>


A map like that is probably not suitable for a fortress.  It won't have any good ores; this is quite realistic.  You aren't going to get enough ores to make a useful fortress when you barely even have a mountain!

The game will probably have to detect and discard such starting locations when they're detail-generated.  I doubt it will happen very often, though...  the detail-generation used for fortresses is intended to make a mountain, so it would probably take an extreme series of quirks to result in someplace with no depths at all.

[ March 19, 2007: Message edited by: Aquillion ]

Logged
We don't want another cheap fantasy universe, we want a cheap fantasy universe generator. --Toady One

krige

  • Bay Watcher
  • [TILE:dwarf:fire]
    • View Profile
Re: the future distribution of ore
« Reply #8 on: March 19, 2007, 03:50:00 am »

"barely even have a mountain"? Excuse me, but who forces you to dig up ALL the way through? I thought it would be natural to turn right instantly and then proceed as usual.
Logged
Sheriff of Nottingham: That's it then. Cancel the kitchen scraps for lepers and orphans, no more merciful beheadings, and call off Christmas.

Chthon

  • Bay Watcher
    • View Profile
Re: the future distribution of ore
« Reply #9 on: March 19, 2007, 07:45:00 am »

I'd start at the back of a valley and have the barracks come forward with fortifications all the way  :)
Logged
''d be perfect if I weren''t so arrogant.

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: the future distribution of ore
« Reply #10 on: March 20, 2007, 04:50:00 am »

Unfortunately, it generates the mountain in 48x48 blocks that must be created independently (e.g. for adventure mode travel), so that kind of algorithm won't work.  It would need to be adjusted through the mid-level maps and work a little more loosely.  Now, it *could* generate the entire map as a 'dwarf map' when the adventurer gets there, and do things more specifically at that time, but I didn't want to get into generating game areas like that, since it will hamstring me later.  I still haven't decided exactly what I think about the depth vs. rarity issue.
Logged
The Toad, a Natural Resource:  Preserve yours today!

Jaqie Fox

  • Bay Watcher
  • Genuine Girl Techie!
    • View Profile
Re: the future distribution of ore
« Reply #11 on: March 20, 2007, 10:04:00 am »

In a natural undisturbed landscape, there are surface-eroding deposits of precious resources.  How do you think mining began? aincent people found the resources on the surface and slowly developed technology to follow that exposed vein deeper and deeper.

I am not a geology major, but I do think that you should take advantage of the way things really are in OUR world, and implement that into the game.

Logged