Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - SquashMonster

Pages: 1 2 [3] 4 5
31
DF Suggestions / Re: Cave-in algorithm ideas thread
« on: August 17, 2007, 03:22:00 am »
Personally, I think adding a random timer to the actual cavein when a place to cave in is discovered would do plenty.

However, adding the weight of the contents of a square to the weight would randomize it plenty if needed.

Don't put a stockpile on top of a big room.  Or a big hallway that'll fill up with dwarves.


32
DF Suggestions / Re: Cave-in algorithm ideas thread
« on: August 17, 2007, 12:11:00 am »
In light of the fact that dwarves will be able to move diagonally, I added diagonals to the simulation.  Diagonal corridors are still slightly more stable than horizontal and vertical corridors due to their jagged shape, however.

More importantly, I extended my algorithms to work in 3D.  There will be a demo again near the end of this post.

The 3D algorithm is incredibly simple.

Repeat the following until no change, capping all values at 1000.

Reset the weight of every cube to 0.

For each filled cube, check whether it is directly supported.  If it is not, give an equal portion of its previous weight to all adjacent cubes and back to itself.  If any of the adjacent cubes are not filled, give that portion of the weight back to the cube that was trying to pass it off.  If the cube is directly supported, give half of its previous weight to the cube directly underneath.  Give all cubes the weight of their material.

That's it.  Once it's done, check if the weight on any unsupported cube is past its tension strength, and check if the weight of any supported cube is past its compression strength.  If either of these is true, collapse.  A cube past its tension strength will fall straight down and turn into rubble.  A cube past its compression strength will shatter, shoot rubble out into adjacent squares, and disappear.  Either of these is extremely likely to cause a chain reaction in a very bad way.

This algorithm is missing one important thing.   That thing is dissipation.  Currently, supported cubes send half their weight downwards.  Technically, they should send all their weight downwards and outwards, to all 9 cubes below them, and additionally weight should decrease over time somehow.  My current approach of just passing down half the weight works very well in most cases, but it makes building overly tall rooms too easy -- as a room gets taller, the lower parts of the supports actually are under less stress!  I'll attempt to fix it some time if people think the algorithm is worthwhile.

And a few quirks of the simulation that are not really errors:
- Any number over 1000 is wrong.
- Any form of stalactite type formation will get over 1000 weight and automatically cave in.

Otherwise, it works fine.  Yes, you can have domes.  I personally am terrible at them though   :p.

Link: http://squashmonster.googlepages.com/DwarfCeiling3D.zip

Mouse toggles whether a cube is filled.  Up and down arrow scroll the view vertically.


33
DF Suggestions / Re: Cave-in algorithm ideas thread
« on: August 16, 2007, 04:04:00 am »
Good eye, I didn't catch that at all.  I'm pretty sure nothing else in the game counts diagonals though, so the disadvantages of having to zig-zag to get anywhere probably make up for it.

How things like that effect the weight and tensile strength would be completely up to the devs, I only went as far as I did with the numbers because I wanted to make sure it worked.

Personally, I was definitely thinking materials would effect it.  Most would have similar weight (barring crazy stuff like pumice), metals would have a higher tensile strength, and stones would have a higher compression strength (something that the 3d version would care about), as that's vaguely accurate from a materials science perspective.  I have no idea what materials science says about adamant, though  ;).  

I figured statues as supports would have lower compression strength, but I didn't think of those others you mentioned at all.  I think detailing and smoothing would drop a small amount of weight off without effecting strengths, engraving would have a small negative effect on strength and no effect on weight, and fortifications would take out a bit of weight and a bit of strength.  All of those would have to be compression strength only though.

That whole thing naturally leads to ceilings lined with metal beams for extra support.  I don't know enough about dwarven architecture to know if that is accurate or not though.


34
DF Suggestions / Re: Cave-in algorithm ideas thread
« on: August 16, 2007, 02:23:00 am »
The version I gave might be simple in code, but it's pretty complicated in practice.  Try out the example code!

35
DF Suggestions / Re: Cave-in algorithm ideas thread
« on: August 16, 2007, 01:34:00 am »
I like the suggestion the first poster used.  It was fairly intuitive and simple.

But that's didn't stop me from trying to make my own   ;).

This is a 2d version, I'll come back with a 3d version once I figure out how to test it properly, but I was wondering what people think of it.

Assume the ceiling in every empty tile has a weight and tensile strength.  We'll assume the entire ceiling is rock for simplicity's sake.  The rocks used in my examples have weight 25, tensile strength 55.

To perform a cavein check on the map, start by setting the weight of every tile to its normal value (25 in our example case).

Next, repeat the following for each tile until no tiles change weight (about 15 times, it's pretty fast).
- Divide the weight by 5 (integer arithmetic, with rounding)
- If this tile is unsupported (empty), add this new weight to the weight of every adjacent tile.
- Add one fifth the original weight (still 25) to the weight of the tile.

Once that's done, check for tiles with weights over their tensile strength (55 in our example).  These tiles are not properly supported and will collapse.

I made a program to test this out (link at end of post) and it works really well.  Here are a few examples:

  • A 7x7 square with a support in the center is safe
  • A 7x7 square with two supports on the sides is safe
  • A 7x7 square with supports in the corner is not safe
  • A 13x13 square needs at least 5 supports to be safe
  • A 6xN corridor is safe
  • Two parallel 6xN corridors connected by a 2x1 door is safe
  • Two parallel 6xN corridors connected by a 3x1 door is not safe
  • A 6xN corridor that bends is completely unsafe
  • A 4xN corridor is safe even if it turns

And, since I know this is completely impossible to visualize without doing a ton of number crunching, here is the example:
http://squashmonster.googlepages.com/DwarfCeiling.zip

Click (didn't bother to put in click and drag) any square on that to toggle between supported and unsupported.  Light grey is support, dark grey is empty.

[ August 16, 2007: Message edited by: SquashMonster ]


36
DF Suggestions / Re: Workshop Chutes
« on: December 05, 2007, 01:31:00 pm »
Bins at the workshops make a lot of sense.

Though I like the idea of chutes.  How about just being able to build them anywhere?  A dwarf trying to store an item in a stockpile can check all the chutes connected to that stockpile and see if any of the are easier to get to than the pile itself.  The items would end up scattered about and make the dwarves want to go clean them up, but it'd still be quicker.

You could have a chute from your farm to your food stockpile, and save a bunch of time.  Or you could have a chute from outside into your wood stockpile, and save a ton of time.  And then a goblin raiding party jumps down said chute.


37
DF Suggestions / Re: Adding new mechanisms?
« on: December 02, 2007, 08:49:00 pm »
A lot of existing items, like axles, seem like things that would make more sense to have made at a mechanics workshop.  Maybe just reorganizing a little would help.

38
DF Suggestions / Re: Your priority fixes?
« on: December 02, 2007, 06:46:00 pm »
In order of importance to me:

1.) More stuff underground.  Currently, you can find everything under most mountains, but most other locations have nothing.  Just having more underground chasms and magma and rivers will help a lot.  Other surprises, like rooms full of nasties of any type, are also good.

2.) Better location balance.  I think the best way to balance locations is putting balancing factors underground.  If everything you need to make a great fortress is on the surface, then under the surface you're likely to find crypts and demon pits and other nasty things.  If you're settling a barren desert, the game will be more likely to throw you a bone and put beneficial features under the ground.

3.) Make mechanics and traps matter more.  There's currently fantastic options for making elaborate traps, but little to use them on.  Making invading armies actually attack will fix this, to large degree.  Also, I'm an advocate of removing the stonefall trap.  You can build it by hand using some ingenuity, a bridge, and a pressure plate, which is more interesting.

[ December 02, 2007: Message edited by: SquashMonster ]


39
DF Suggestions / Re: Ocean and sea ideas
« on: December 03, 2007, 06:07:00 pm »
You touch upon the idea of having boats.

I think that's the key.  Island areas need to be able to build boats.

Perhaps a boat would be a workshop, wood-only, that moves?


40
DF Suggestions / Re: stone beds
« on: December 02, 2007, 06:52:00 pm »
How about adding both stone beds and bedrolls?  A stone bed isn't actually better than the ground, but it gives the dwarf a place to sleep.  A bedroll makes up for sleeping on the ground, but they'll still be unhappy about not having a room to sleep in.  Having both, however, is as good as a wooden bed.

41
DF Suggestions / Location selection suggestions.
« on: November 30, 2007, 12:36:00 pm »
I noticed a few things that could be improved about the location selection interface at the start of a game.  So here they are.

1) Sometimes, desirable features straddle the line between two tiles on the regional map.  This prevents you from settling somewhere that has both of these features.  Perhaps moving the settlement area on the local map to the edge of the map can scroll the regional map by a partial region?  Moving the regional map the normal way would realign it to the grid, so you don't get lost by the world shifting.

2) Sometimes, you find a really good location that isn't quite what you're looking for at the moment.  Perhaps you want to make a glass fortress but you find a region with magma, water, and trees but no sand.  It would be nice to be able to mark such locations.  Press a key, enter a description.  Press another key, you get a list of the areas you've marked off and can scroll through them.  As an added bonus, if the saved areas are stored in a separate file, players can share their lists for given seeds.

3) It seems that the world map tiles are each based on a single tile of the regional map.  This leads to lots of regions that are predominantly one tile but show as a different one on the world map.  A simple fix would be to take a sampling of the region tiles and make the world map tile be the most common one.


42
DF Suggestions / Re: More underground features and biomes
« on: December 05, 2007, 01:19:00 pm »
That's actually what I meant.  When I say "floor tile" I mean the type of tile that's in the middle squares.  Changing it to unworked obsidian walls means it's full of obsidian, not just an obsidian floor.

43
DF Suggestions / Re: More underground features and biomes
« on: December 04, 2007, 05:29:00 pm »
I think a lot of what has been suggested can be implemented using something loaded from the raws, in a manner similar to what Captain Failmore suggested.  Some features, like geysers, require hand-coding.  Others, like mole-dens, require related features (burrowing creatures, in this case).  But most could be done in the raws.

However, how I would set up such a system differs from Failmore's enough that I think it's worth describing here.

This method involves two types of raw, rooms and complexes.  In exchange for that added complexity, there are far fewer tags.

Rooms have the following information:
- Range or list of sizes.  width/height/depth.
- Possible contents.  Each has a range of quantity, a probability, and a type.  The type can be general, like reaction types are currently.
- Possible buildings.  Type, quantity, probability.
- Possible creatures.  Type, quantity, probability.
- Wall material.  This forms the room's edges.  Something specific, something general, or no change.
- Wall type.  Any tile type will do.  Smoothed wall, unworked floor, whatever.
- Floor material.  This forms the inside of the room.  Defaults to same as wall material.
- Floor type.  Defaults to unworked stone floor.  Setting it to something like unworked wall makes your "room" not so much of a room.

Complexes have the following information:
- Average room distance.  The number of tiles between rooms on average.
- Rooms.  Each gets number of times, probability.
- Linking corridor wall type.
- Linking corridor floor type.
- Linking corridor width.
- Linking corridor height (vertically).
- Linking corridor stair type.  Tile type used when a corridor has to go up.
- Distance at which creatures activate.  By default, 0, IE; they're spawned when you breach the wall.  You could raise this to a higher number for moles.
- Information on the biome you'd find this in.  No giant bees in the arctic.  No unexplained pools of blood in joyous landscapes.

When the game decides it wants to put one of these in, it figures out how many rooms it needs and their total size.  It then multiplies this size by their linking distance and finds a region big enough to hold that complex.  The game places rooms in that area randomly.  If trying to place a room fails enough times, the room goes a bit off the edge.  Once done, it finds an unconnected room, connects it to the nearest room that it's not connected to, and repeats until they're all connected.

Examples:
- Giant beehive.  Define a 1x1x1 room with walls made of wax, a chance of having a bee, and a chance of having honey.  Define a slightly larger room with a guaranteed queen.  Make your complex out of lots of the small rooms and one of the queen room, and set the linking distance very low.
- Undead settlement.  Define 3x3 rooms with workshops, 5x5 rooms with lots of one kind of good, large rooms full of tables and chairs, and small rooms with beds.  Put a chance of an undead dwarf on each of those.  Make your complex out of lots of the workshops and stockpiles, one or two dining halls, and lots of bedrooms.  Set the linking distance moderately high and make the corridors semi-big.
- Lava flooded settlement.  Repeat the above, but remove all room contents.  Change the floor tile to unworked obsidian walls.
- Inexplicable bloody mess.  Just one room.  Fill it with water, a few dwarves, and undead carp.  Make the spawning distance high so the carp have time to make it into a bloody mess before you see how it's been done.

[ December 04, 2007: Message edited by: SquashMonster ]

[ December 04, 2007: Message edited by: SquashMonster ]


44
DF Suggestions / Re: More underground features and biomes
« on: December 03, 2007, 07:50:00 pm »
I like the fungi ideas, though I think having all the mentioned features for a given area alignment is too much.  Encountering any one type of evil fungus is an event in and of itself.  Poison fungus, cloth-eating mold, and miasma fungus all sound like pretty solid threats.

Finally, the idea of fungus taking over the fortress is fantastic.  Imagine a type of stone, "fungal mass", that spreads itself.  It has little or no use, but if you discover it you'll either need to wall off that shaft or dig out every last square of it.


45
DF Suggestions / Re: More underground features and biomes
« on: November 29, 2007, 09:03:00 pm »
That idea with the poison/acid/blood rivers in sinister landscapes is great.  Especially if they're underground.  Currently, going underground saves you from the bulk of what makes such a landscape scary.

Also, how about underground alcohol rivers in joyous landscapes?  Free booze for everyone, but also a river of flammable liquid.

[ November 29, 2007: Message edited by: SquashMonster ]


Pages: 1 2 [3] 4 5