Discuss the massively-multiplayer home defense game.
You are not logged in.
Pages: 1
I was fiddling with a simple (unoriginal) design for a one-time robbable house when I came across this odd behaviour. This is a functional arrangement, but by removing a single wall tile (as in this) the cat's vision is obscured to the point that the house is broken.
It is likely a consequence of the new pet sight rules concerning diagonal gaps. Obviously this is a bug. Not a very exciting one though...
Offline
Yeah, this strange behavior is actually a consequence of the way the game fixes "diagonal gaps".
To deal with the "diagonal gap" issue, when a corner looks like this:
0000
0X00
00X0
0000
I "patch" one of the empty spots near the gap. The two spots are A and B like this:
0000
0XA0
0BX0
0000
I look for which of A or B is farthest from the robber, and I call this the "back side" of the gap. I fill it in with a full square of "vision blocking," as if a wall was there.
In your case, because of where the robber is standing, B is actually "farther" from the robber, so it gets filled in, as if there was a wall there. This blocks the cat's view of the robber.
Now, if you actually place a wall at A like this:
0000
0XX0
0BX0
0000
The "diagonal gap patching" code doesn't touch that corner, because there's no gap there, so B is not filled in.
I'm not sure that it's worth fixing.... it would further complicate that part of the code, and I'm sure there would still be some other case that wasn't perfect.
Offline
It doesn't seem like it would be too complicated to fix this one. For any diagonal there will be regions from which you could never see through it:
eg. Given the following diagonal:
000000
000000
00X000
000X00
000000
000000
if the player is in any of the regions marked below with an A there is no point in patching the gap:
AAABBB
AAABBB
AAXBBB
CCCXAA
CCCAAA
CCCAAA
Whilst if you are in the B region you should patch on the C side, and if in the C region patch on the B side. To figure out which region you are in for any given diagonal seems fairly simple and you could scrap the code for figuring out which is closer. I also don't see how this could create cases in which it gets it wrong.
Offline
Yes! You're right about this. Great thinking here. Will do in v19.
Offline
This has been fixed in v19.
Offline
With a diagonal gap, are you supposed to be able to see through it? Say, if I'm in area C, and little Timmy's in area B (in the above examples), should he see me and start to run?
Fortress Theory Mod - New objects, tools, and paintings!
I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.
Offline
No, he should not.
You can sometimes see him there, though, lurking in the shadows, because of the soft edge on the black visibility fog.
Offline
Ok, I had a case where my son wasn't seeing me correctly (or seeing me incorrectly).
If you have a diagonal wall, and a family member is on the corner of the walls, then they'll see you through the wall.
X
X
WX
XXXA
A
A
If a family member is at W, and you step into A(basically, a diagonal perpindicular to the wall diagonal), they'll see you and start moving.
Fortress Theory Mod - New objects, tools, and paintings!
I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.
Offline
Ah, yes, you're right! It happens with dogs to.... hmm...
Well, that's obviously a bug. I'll move this back onto the other list.
Offline
Not sure if this is the same bug, but there is a problem with dogs' vision/behavior. In this particular case:
The dog doesn't see me. If I go down he doesn't follow. If I go up once, he moves forward and kills me. So I guess it's a bug, isn't it?
Offline
Mouse over the pit...
Dogs hate the smell of other, non-human animal corpses.
Offline
Oh ok, didn't know that (and TBH I don't see the point but that's just me ).
So there's no way to go past this dog without a gun, am I right?
Offline
Now you see the point.
Offline
Now you see the point.
I think he means the point of why dogs won't move near dead animals.
The reason is because, due to the way the game is designed, dogs can't step on the same tile as another "Mobile" (Animals, panic button, and shotgun). That means that if you're standing on a dog corpse, you're perfectly safe from dogs.
Now, if the dogs DIDN'T stay away from dog corpses (like they do now), hallways of dogs would be trivial to pass. You'd simply shoot the first one, stay behind the corpse until the rest of the dogs lined up on the other side. Then, step on the corpse, and the dogs will be right beside you in clubbing range, but since you're on a corpse, they can't kill you.
The way it is now, since they'll only step beside a corpse if YOU are there, you can't step on a corpse and club dogs safely.
So there's no way to go past this dog without a gun, am I right?
Correct
Last edited by iceman (2014-01-22 11:33:30)
Fortress Theory Mod - New objects, tools, and paintings!
I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.
Offline
Thanks for the answers iceman, it's always better to know how it works exactly!
Offline
Pages: 1