Bay 12 Games Forum

Please login or register.

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

Author Topic: Raw-Editable Procedural Worldgen Cities  (Read 16638 times)

Foamy

  • Bay Watcher
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #30 on: August 07, 2010, 12:10:42 pm »

I think building them between the trees would be the most efficient. Also they don't necessarily have to have walls. just a roof and floor.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #31 on: August 07, 2010, 12:28:59 pm »

While bulding them between trees (which would be like living in a giant hammock) would be possible, that raises the problem of how densly packed large trees can be - the larger the tree, the more ground space gets taken up by roots, and the more their canopy will strangle out other trees by absorbing all available sunlight.

This would actually be more feasable in a smaller, younger forest (with 1 tile diameter trees) that only grow about 5-10 tiles high, with most of the upper half bieng a thin, flexible pole, if not splitting off into branches and leaves entirely.

Not having walls at all is amusing, meaning that elves have no privacy, and pretty much, like Pandorans, just 'Do it in the Open'.

Let me see if I can put something together...
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #32 on: August 07, 2010, 01:23:13 pm »

Allright, I took a look at some spars-ish forests, and came up with something like this:


Now, the general trick to this would be that you would have to tie some spiderweb-like ropes between the trees to make the places you could build trees.  Theoretically, you could declare just about anything between that tree layer to be between, but if we want it to actually look like it's kept up by rope, it should be based on something like an intersection of where the lines between these trees could be drawn...



The problem is, that gets really, really hard to ask a computer to do in a way that looks correct.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Foamy

  • Bay Watcher
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #33 on: August 07, 2010, 01:35:10 pm »

But what if the trees (which support constructions) were considered buildings? then it would only have to place predesigned sections. the end result would be very similar.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #34 on: August 07, 2010, 01:40:13 pm »

Well, two things...

First, we don't want every tree fort to look exactly the same, as if trees that elves want to live in just happen to always grow in the same patters.

Second, if we want to make it procudurally somewhat randomized, we'd end up in the same problem as if we simply let those trees grow naturally - they'd require finding a routine that could cram them in the places that happen to have the right amount of support.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Foamy

  • Bay Watcher
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #35 on: August 07, 2010, 01:51:37 pm »

What if each tree had a ring around it on all levels where a floor could be built. then you could either look for places where these rings overlap or come within a certain distance. i don't think that would be too complex although obviously it would need more to it.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #36 on: August 07, 2010, 02:05:32 pm »

While that could work, it would create the problem of making many areas where trees are somewhat densly packed become just large, open floorspace.  Without walls, that would pretty much just be the same as simply sleeping on the ground, except with there being a giant forest mezzanine in the air.

... Actually, I'm rethinking the original ground-level tree idea that Solace was talking about...

We could try building "pods" into the trees - elves basically just set up some sort of foreign objects into the tops of trees, and force the trees to grow around them, creating a hollow space inside the tree itself, even if the tree isn't wide enough to normally be built into.

As the trees grow taller, the pods could be stacked, making multi-floor pod spaces...

Code: [Select]
T = Tree,  W = Wall, + = Floor, D = Door, X = stairs (vines)

   TTTTT
  TW+++WT
X+D++X++T
  TW+++WT
   TTTTT

Trees could be made somewhat taller thanks to some sort of elven magical tree pampering techniques, if it wasn't too extreme, although this really does need Toady to get to making multi-tile trees.

For the really large, royal/druidical important buildings, perhaps multiple trees could be tied together and shaped into a bizzare giant tripod where the trees fuse with one another, and the upper ranking elves live inside.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Foamy

  • Bay Watcher
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #37 on: August 07, 2010, 02:17:09 pm »

That's an interesting idea. They could also connect the trees with branch type walkways (across reasonable distance) which would help with the problem of representing rope bridges with solid floors.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #38 on: August 07, 2010, 02:43:03 pm »

Of course, we could also "cheat" and make "rope bridge" a type of material so that the floors would be called "rope bridge floor".
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Kilo24

  • Bay Watcher
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #39 on: August 07, 2010, 05:31:11 pm »

It's definitely a lot better than the current implementation of cities.  Time to see if I can free up a vote for it.

What about having generic templates to apply to these modules as well?  Like looted (randomly destroying fragile walls and adding other damage), aging (growing moss and rotting organic constructions into fragility\nothingness), migrated (like a race of giants widening doors\tunnels to fit them and refurnishing the area for more racially appropriate decorations: heaps of trash for kobolds, traps for dwarves, and planted trees for elves), fortified (adding in city walls, hidden bunkers and reinforced doors), or several related to wealthiness that would affect the quality and material of items/constructions?
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #40 on: August 08, 2010, 04:29:16 pm »

Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #41 on: August 08, 2010, 05:16:48 pm »

I'm late on this one, but a similar suggestion was posted a couple months ago.

... Hmm... I thought I searched, but I guess I missed this one.  Sorry.

Still, I hope that, especially with the notion of how to handle "hallways", this would be a little more robust a suggestion.

Having buildings is nice, but not everything can just look like the way that human towns work now, we'll need the ability to work how they actually get mashed together in a way that has sanity-checking, so that doors don't face a completely walled in courtyard.

Having some predefined rooms is nice.  Having the ability to put in some procedural elements, like turning something into a randomly trashed ruin, even better.  But what can really make the difference is in how those rooms are strung together. 

The Romans, for example, after conquering a land would build their new cities along a centrally planned, grid-based pattern, as opposed to the haphazard construction of buildings by individual families as they saw the need, because the straight, right-angular construction was supposed to show that not only were the Romans now here and in charge, but that they had come to bring Order to a previously chaotic barbarian land.  That kind of visual aesthetic would do much to making modded civs look distinct, custom buildings notwithstanding.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #42 on: August 22, 2010, 01:14:49 pm »

Well, anyway, I think that we can all handle the "rooms" and "houses" parts of this fairly easily.  Maybe elven tree houses are a little hard, but I think the real stumbling block is the "hallway" or "highway" that connects them together. 

Does anyone have proposals regarding this?
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #43 on: August 25, 2010, 10:00:33 am »

A response from Toady on the Future of the Fortress thread:

Quote from: NW_Kohaku
Will you code in the ability to create our own raw-defined building types for worldgen?  Using the Arena Mode and Custom Workshops as a model, we already have most of the pieces to create both custom buildings and define functions for them.

I'm not eager to get into this right now, since I'm not sure what the overall specs need to be and I don't want to tie myself to a raw format early.  One of the main things is that I'm not sure I'd be satisfied with static maps of buildings, rather than buildings that are a bit more adaptable.  For instance, I'm not sure what raws would look like for the existing temples, which adapt portions of their architecture to the spheres associated to their deities.  The raw format would inevitable restrict my ability to do things like that, unless it were really complicated.  At the same time, I can see how a modder would want to be able to deviate wildly from what is currently available.  It might be most simple to allow static building maps to be used by custom races, but since I won't be using that in vanilla it's difficult to prioritize.

This means that we should also work on ways to make pieces of the raws procedural.  We've already talked a little about it, but we might need to talk about ways to actually try and impliment it if we are to give a compelling argument for Toady.

I already think the simplest way to do this is to simply let the raws define functions for each building we create, (so that we have multiple entries that fill the role of "peasant house") and generate probability weights the way that we already can do for castes, so that we can make random-looking buildings by just making 50 different buildings, and giving them varying weights to occur, so that, unweighted, each individual building would only occur 2% of the time.  You could largely copy-paste the same overall building shape, and just re-arrange the furniture if you saw fit to make something that would seem different to the player who walked into town. 

It isn't REALLY proceedural, but if you just throw enough minor variations at it, it would sure look procedural.  It would also give you direct control over what everything looks like, which real procedural buildings wouldn't give you.

This would mean that you define a base of building, and then, on certain parts, you designate a special zone that actually calls on a procedural function that will look for sub-building pieces.  Sub-pieces may call for further sub-pieces, so that you could define a noble's estate by having a grand hallway with additoinal pieces being rooms that are branches off the hallways.

For example, you could have a set of "ground floor" plans for a farmer's house, and a seperate set of "second story" plans for a farmer's house.  Not all ground floors would have a second story, but ones that did would make a call to add onto a certain anchor point (specifically, in this case, the stairs) upon potential sub-sections of the house.  The function that calls for the additional sub-section of the house could be a weighted list of potential building floorplans, rather than simply something defined to fill a particular function, so that you could know the exact dimensions of the building pieces you are calling in beforehand.

As a sanity check, this would probably require some kind of arbitrary limit on recursions (say, no building segment tree with more than 100 nodes), so that some player who wants to test the limits doesn't blow up the world by making a building that is infinitely recursive by, for example, making a tower (Tower of Babel?) where each floor calls upon making another version of itself on the floor above, or some set pattern of floors so that it could extend infinitely high into the sky... not that such a thing wouldn't be cool, but infinite recursions tend to be bad.

For the purposes of fulfilling the needs of a sphere-based temple, these areas, then, you could either do the same copy-pasting solution I talked about, above, where each temple has a slightly different floorplan, but the bulk of it is repeated each time.  Alternately, it might be possible to build it "tricky", and make a set of TEMPLE_OF_SPHERE_NAME, with only the changing parts that filled in, which calls a default temple set of pews or the like, possibly including the door to enter the temple proper.  (Making "buildings from the top down" may require some special sets of sanity checks be added to make sure that all buildings have at least one door to the outside, and that it can link to the "main throughway" at some point.)

Similarly, the building could have the same floor plan, but have areas that are designated "furniture zones", where the game is simply given a list of furniture that needs to be in the house, and the game will just mix-and-match ways of placing that furniture... although this would need to be somewhat complex if you wanted to make sure tables always had chairs next to them, (calling up mini-floor plans that only deploy furniture in some pre-set raw-defined arrangements for particular floor spaces) and outright randomized furniture placement may likely be best for "abandoned" houses or outright ruins, where the stuff is supposed to be randomly strewn about.
« Last Edit: August 25, 2010, 11:31:38 am by NW_Kohaku »
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Andeerz

  • Bay Watcher
  • ...likes cows for their haunting moos.
    • View Profile
Re: Raw-Editable Procedural Worldgen Cities
« Reply #44 on: August 26, 2010, 07:28:24 pm »

Yeah, what you said just now!  I like this idea lots and is what I would imagine to be the most plausible and close-to-ideal solution.

It also offers a sort of way to plug into a possible technology/knowledge/culture-spread arc, with making certain architectural/engineering motifs more likely to occur when the technology/knowledge/culture upon which such things might be dependent makes its way to a particular population.  :D  And the player/modder could have a hand in determining this!

Also, perhaps looking into the scientific literature could yield some cool articles on how to model urban layouts, especially with regards to roads.  Network theory-related crap has probably already gone apeshit on this stuff at some point.  I'll see if I can look into it.  As Toady is a mathemagiciantician, I'd imagine he might be privy to some really cool references on the matter of modeling infrastructure layout!  :D

Oooh!  Here's a cool wikipedia article: http://en.wikipedia.org/wiki/Hippodamian
This guy appeared to like to use math when devising his city layouts... perhaps he might have a system worth looking into that could be adapted to our needs.
« Last Edit: August 26, 2010, 07:38:56 pm by Andeerz »
Logged
Pages: 1 2 [3] 4