The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2014-01-07 08:06:51

arakira
Member
Registered: 2013-12-01
Posts: 176

Visibility issues not related to the shroud

I noticed two weird things related to visibility.

First one is about throwable objects. In some cases an animal is in sight (I mean that he can see you, and hovering the mouse displays its name) and is at throwable distance, but you can't throw him anything. For example in this case:
XXD            X:wall; D:dog; P:player
P
I guess there is a condition testing if some straight line is found between you and the dog, but the player is not aware of this rule and so the ability to throw objects looks, at times, arbitrary. It would be clearer if any object in sight -and of course within range- could be reachable.

Second one is just cosmetic: animals that felt into a pit or trapdoor are drawn almost at the bottom of the tile, and so are invisible if there is a wall beneath.
P             P:pit with crippled animal
X             X: wall
This can, sometimes, make a big difference smile

[edit]
While thinking about the first point, I got to realize this paradoxical behaviour:
A
  XB
Imagine X is a wall. A and B can see each other if the player is on tile A, but not if it is on tile B!
Actually I never noticed this paradox before (and nobody complained about it) because I think we got used to this behaviour early on...

Last edited by arakira (2014-01-07 08:38:18)

Offline

#2 2014-01-07 18:51:27

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Visibility issues not related to the shroud

Yes, that looks like a bug with the targeting distance code.  Looking into it.

Regarding dead animals in pits... they really do need to be drawn near the bottom.  Otherwise, they look weird.


That paradox is not a bug, because vision is computed from the player's perspective.  If the player is at B, the wall is much closer to the player, so it obscures more.  If the player is at A, the player is farther from the wall, so the wall blocks less.  If you study it, you'll see that indeed the "cone" of invisibility cast from the player is much wider when the player is standing at B.

AND... to keep things reasonable in the "who saw who" mechanisms, it all depends on what the player can see (I don't compute separate view cones for each vision-sensitive object in the house).  If you can see them, they can see you.  If you can't see them, they can't see you.

Offline

#3 2014-01-07 19:12:57

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Visibility issues not related to the shroud

Actually, in this case, the line passing between the center of the robber and the center of the dog crosses the wall, so the throw is blocked.  You can see the dog in this case because you have line of sight onto the corner of its tile, but throws require that you have line of sight to the center of its tile.

Offline

#4 2014-01-07 19:53:19

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: Visibility issues not related to the shroud

Yes, I understand that there is a geometrical reason behind the ability to throw, I just mean that it is annoying when you don't know it. You have to learn a new "hidden" rule, and, even after you learn it, you'll have to draw a line between centers of tiles, and look for intersections... Sometimes you plan a robbery requiring a precise throw, and you don't want to gamble on whether or not you'll be able to perform the throw (or end up being frustrated if the throw is not allowed). To me it just seems more natural that if you see some object, than you can throw at it or shoot it.

Offline

#5 2014-01-07 20:13:42

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Visibility issues not related to the shroud

Hmm... yes, that does seem natural.

The current code came from some tools in older versions having much longer reaches, combined with windows that were supposed to block these tools.  So, you could "see" the object, and it might be "reachable in 7 steps" in a round-about way, but it shouldn't be targetable because there's no line-of-sight unobstructed path.

Now that reaches are shorter, it might not be as much of an issue.  I will look into it.

Offline

#6 2014-01-08 07:25:38

Antiblitz
Member
Registered: 2013-12-31
Posts: 32

Re: Visibility issues not related to the shroud

I know these arent related as much to the topic, but they are somewhat related.

Could the possibility exist to shoot animals with the gun, through windows?

I only make the suggestion as i have noticed an increase in the magic dance houses, which i do not want to commit to try and break, because i dont have the money, lol.  A lot of houses have now come along with a window, and a dog of which you can clearly see.  The dog then follows you beyond your visibility pushing a random series of buttons of which you dont know what they do, then at the end is either a series of doors, leading to the dog insta-attacking you, or a row of grates to kill you as the dog follows pushing buttons.

The other suggestion would be, allowing the dog to break chase after he has lost sight of you for several moves, like say 2 or 3 moves.

Offline

#7 2014-01-08 12:54:34

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Visibility issues not related to the shroud

To shoot a dog through a window, you must break it with a brick first.

Long before you came on board, we experimented with dogs that stopped moving after they could no longer see you.  We tried removing a lot of things, trying to pare house design down to a place were no "boring, too tough" security systems were possible.  It was never possible.  If we didn't have the magic dance thing, we'd have buttons that the robber had to hit.  Some kind of combo lock is always possible.  Even if you remove all electronics, people could make branching mazes with only one correct path.  That's effectively a combo lock where the answer is LLRRLLRLRL.

And, with each of these things that I removed, "interesting" designs got removed along with it.  If dogs no longer follow you when they can't see you, traps that "release the hounds" behind you (after you've already seen them through a window) become less possible.

Also, I recall people putting hidden buttons right at the edge of the screen with cats that would step off to hit the buttons (and you could see the cats across long pits).  So, yes the cat would stop moving after it went off screen and couldn't see you, but it was still being used to trigger hidden stuff!

In the end, I put most of this removed stuff back in (except for the "animals always follow you, even if they've never seen you at all" part), and shifted the income in the game to bounties, which encourages people to build houses that trick others instead of just scaring them away.

Offline

#8 2014-01-08 19:34:05

Antiblitz
Member
Registered: 2013-12-31
Posts: 32

Re: Visibility issues not related to the shroud

well im glad you came in to atleast justify your means for why you believe it is fine, and i accept that.  You dont normally get the level of socialization from a developer that you provide.

Offline

#9 2014-01-10 18:43:37

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Visibility issues not related to the shroud

I think this is the first spam I've seen on this site since I joined the forums.

Offline

#10 2014-01-11 03:17:45

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Visibility issues not related to the shroud

joshwithguitar wrote:

I think this is the first spam I've seen on this site since I joined the forums.

http://thecastledoctrine.net/forums/vie … p?id=5&p=3

There used to be tons, and still is some left over, but the join question stopped most of it.

Offline

#11 2014-01-12 22:06:14

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Visibility issues not related to the shroud

Removed that.  Yeah, spam was a HUGE problem at first, even with robot-proof math and color questions.  Only a question that required real work (like a question about the game) stopped it. 

I think most spammers are humans!

Offline

#12 2014-01-13 06:12:49

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Visibility issues not related to the shroud

jasonrohrer wrote:

Hmm... yes, that does seem natural.

The current code came from some tools in older versions having much longer reaches, combined with windows that were supposed to block these tools.  So, you could "see" the object, and it might be "reachable in 7 steps" in a round-about way, but it shouldn't be targetable because there's no line-of-sight unobstructed path.

Now that reaches are shorter, it might not be as much of an issue.  I will look into it.

I personally like the fact that there are some things that you are aware of but can't get a good aim at, and it seems fairly natural to me. You catch a glimpse of a cat around the corner but can't get a good aim at it with a brick. This also allows for interesting tactical trap making in small spaces which allows a home owner to pack more into a house, which I think is a good thing.

Offline

#13 2014-01-13 11:32:54

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Visibility issues not related to the shroud

I made this change, and with the current, short reaches of everything, it doesn't change the feel very much.  Except it fixes the stuff that looks obviously targetable but was not before because of subtle issues in the line-of-sight code.

Now the way that it works is this:  If you can see it, and you can clearly walk there in 3 steps, you can hit it with a 3-reach tool, regardless of  a clear throw line.  Something behind a window must thus be closer to you than something with no window in the way (because you'd have to take extra steps to walk around the window).  Logically, it would be kind of a "leaning throw" to throw around the window, which couldn't go as far.

Offline

Board footer

Powered by FluxBB 1.5.8