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 - cephalo

Pages: 1 ... 57 58 [59] 60 61 ... 67
871
DF Suggestions / Re: Easy solution to the main pathing problem.
« on: October 12, 2009, 09:15:58 am »
The problem arises when the dwarf walks over or around the work tile because the left side is the first priority tile to work from.  It would be far easier simply to have the dwarf start building on the first adjacent tile it encounters, because it's reasonably safe to assume that if the dwarf could reach that tile without first crossing the work tile, then it's probably possible to leave when the work is done - with the exception of whether the dwarf walked over other work tiles to get to this one, but as long as they are always starting with the closest work tiles this problem should be avoided... unless new wall designations are added after the pathfinding.

To do this, a simple check could be added to see which direction the dwarf needs to approach the tile from (N, E, S, W), and then end the pathing on the square adjacent the work tile that is in the same direction as the approach.  There's no need for an additional pathfinding check to see whether the tile it's standing on will still be pathable after construction, because of our assumption above.

The dwarf should find the path directly to the work tile, not beside it.  Then, do the following:
-Cut off the very last step so that the dwarf ends its path in any of the eight tiles surrounding the designation.
-If the path ends on one of the adjacents, you're done.
-If the path ends on one of the diagonals, unfortunately you have no choice but to arbitrarily pick a side.  Use the following map to point the dwarf to the nearest adjacent tile.

Code: [Select]
>Nv
WXE
^S<

X: Designated work tile.
N/E/S/W: North/East/South/West-facing tile a dwarf can work from to build the wall.
>/v/</^: Arrows pointing to the tile the dwarf should move to.

The result should look like this:

Code: [Select]
nnnnnne
wnnnnee
wwnNeee
wwWXEee
wwwSsee
wwsssse
wssssss

X: Designated work tile.
N/E/S/W: North/East/South/West-facing tile a dwarf can work from to build the wall.
n/e/s/w: Example area of where dwarf could be approaching the work tile from.
This wont necessarily work if the dwarf approaches diagonally. Rotating around the work tile can still leave him on the wrong side.

872
DF Suggestions / Re: Easy solution to the main pathing problem.
« on: October 11, 2009, 09:39:08 pm »
Go ahead and tear me down if my logic here is flawed, but here is my thought... If a channel or a wall construction tile were to be considered 'impassable' by the dwarf doing the job, it should be impossible for the dwarf to get himself stuck on the wrong side. (unless he started from the wrong side)

Am I right?

Look it isn't that you are wrong, in fact you right. Except that isn't so much a solution as it is the concequence of a solution without actually explaining how one actually goes about solving this problem.

So of course it is an easy solution, it doesn't reflect any of the actual work required to enact it.

Ok, maybe I should clarify. I've actually done some astar pathfinding in the past. Often there's a system in place to avoid pathing failure, as that can be very expensive.

I imagine the game picks a tile adjacent to the work tile that is a known valid path. Currently it picks an arbitrary valid neighbor and goes with that. What you can do though, is check the pen-ultimate path step, if that tile is the work tile, you can reject that path. This is not something that would come up often enough to cause a big slowdown. At most you would have to generate a path for every neighbor of the work tile, and not very often at all. Depending on diagonal dig/build rules, you would generate at most 6 successful paths, as that is the most possible tiles that would cause a choke point.

873
DF Suggestions / Easy solution to the main pathing problem.
« on: October 11, 2009, 08:56:16 pm »
Go ahead and tear me down if my logic here is flawed, but here is my thought... If a channel or a wall construction tile were to be considered 'impassable' by the dwarf doing the job, it should be impossible for the dwarf to get himself stuck on the wrong side. (unless he started from the wrong side)

Am I right?

874
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 11, 2009, 08:17:32 pm »
Ok, I made a test patch on the obsidian cast that had some soil walls nearby on the z level below. Directly underneath was more obsidian, but within a couple of tiles was soil. I did get a sapling. So there's nothing involved with obsidian casting by itself that prevent's tree growth.

875
DF General Discussion / Re: What turns you off about DF?
« on: October 10, 2009, 11:39:06 pm »
One thing I could never get used to was < for up z and > for down z. I changed my bindings to pageup and pagedown, and it's 1000% more intuitive.

876
DF Bug Reports / [40d]Blacksmith's older brother is a Child.
« on: October 09, 2009, 02:48:56 pm »
I'm thinking this shouldn't be possible. I saw this in my blacksmith's relationship screen.

Ok after checking it seems that he is not in the unit screen anymore. I'm thinking he was one of the two that were stolen by goblins.

877
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 09, 2009, 11:31:39 am »
I concur that saplings and shrubs have appeared on my latest test patch. So either the soil walls at -1 z and nearby are required, or there is a limited number of z levels that the game checks for tree growth, in hopes of saving processing time.

I do have a place of obsidian cast that is the same level as the forest, I will try that next.

878
DF Dwarf Mode Discussion / Re: Engravings on second fort
« on: October 08, 2009, 03:24:19 pm »
Did you build in the same region as the old fort at all?

I know that dwarves will engrave historical events even having to do with other civilizations, even other races. It might be limited to ones in the same region, though.

No actually, this is far away. The only point of contact was an Elf civ that my previous dwarves were friendly with and that these new dwarves are at war with.

879
DF Dwarf Mode Discussion / Engravings on second fort
« on: October 08, 2009, 02:52:04 pm »
I am engraving a new fort in my world, and many of the engravings, probably half, are events that happened in the previous fort. That's ok, but my new fort is being built by dwarfs from a different dwarf civilization. Is that ok?

880
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 08, 2009, 11:11:27 am »
After a couple of days, my little test patch of obsidian cast that is 1 z level above the normal tree level has grass but no shrubs or trees, just like on my tower top. I wonder if I can stop trees from growing on natural soil by building and removing constructions. I'll try that next out in the forest.

881
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 07, 2009, 11:03:51 am »
Wow, I just got an actual rainstorm, and now my grass is completely greened up. Still no shrubs.

However, even without trees and shrubs it looks great! The experiment is a limited success! I just have to make sure to extract my bmps after a rain.

882
One of my best champion marksdwarfs walks around with a mangled lung. He moves slightly slow, but shoots with the best of em. I think once it's clear that the would won't heal, they just get out of bed.

883
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 07, 2009, 09:41:37 am »

I meant in a ring AROUND the dirt level. Like a trough.

Ah, yes I actually have a river running through it, but I have it turned off now because the waterfall was knocking my engravers pets off the scaffolding around the tower. Nearly caused a spiral!

Maybe once I can get that going full time something will happen.

884
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 06, 2009, 11:50:24 pm »
Yeah, probably not gonna happen. What biome is it in? Or, maybe it's too high up?

It's right on the coast, and it's waay up in the air, like 5 levels from the highest z. I have a test patch 1 z level above the ground but it's still too new.

885
DF Dwarf Mode Discussion / Re: grass, shrubs and trees rules
« on: October 06, 2009, 11:41:11 pm »
Have you thought of pumping water up there and making the soil damp all around? it might speed up the process, or at least make your grass nicer >.>

Yeah, it makes muddy dry grass.  :D

Pages: 1 ... 57 58 [59] 60 61 ... 67