The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#26 2013-12-28 10:44:21

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

Re: Visibility issues and Gamma

arakira:

There are some speed control keys in the game that can be turned on.  Look for settings/enableSpeedControlKeys.ini and set that to 1.

After that, you can control game frame rate with these keys:

^   Slow 2 FPS
&   Normal 60 FPS
*    120 FPS
(    240 FPS
)    480 FPS

Essentially, SHIFT plus the keys 6 through 0 becomes a row of speed control keys like on a tape deck.  It effects the whole game (but also works if you're watching a recording).

Of course, you computer might not actually be able to do 480 FPS... in that case, it will simply run as fast as possible.

Also, on my machines, higher frame rates become possible if I move the window most of the way off the edge of the screen (so that the whole thing doesn't need to be redrawn by the graphics card).  You can leave the top-left corner visible so that you can watch the playback percentage display.

That helps me watch longer game recordings and "get to the good part" faster.

Offline

#27 2013-12-28 10:46:48

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

Re: Visibility issues and Gamma

Doors visible behind doors is a side-effect of some hairy "what should be visible" logic that I barely understand as I read through it.  I'll need to fix that!

There are also some ugly, cut-off looking walls in Simoon's screen shot.


Please, if anyone notices anything that looks less-than-beautiful (or gives more info than it should to gamma-rampers) with the new visibility code, press "=" and send me that screen shot!

I've tested a bunch of configurations of tiles, but it's clear that I've missed some.

Offline

#28 2013-12-28 11:46:10

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

Re: Visibility issues and Gamma

Mmm, I have an AZERTY mac keyboard (ouch) and on this I can only get shift+^ and & to do something (slow and normal). I've tried many different key combinations, and also plugged in an external PC (azerty) keyboard, but without success... Any idea what the mapping should be on my keyboard?

Offline

#29 2013-12-28 18:10:18

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

Re: Visibility issues and Gamma

There is something weird with animals fried on electric floors:
if the electric floor is visible but is not in "animal sight" then you see the grid but not the animal.
for example:
P               P: player
X               X: wall
X#             #: animal fried

Offline

#30 2013-12-28 18:13:05

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

Re: Visibility issues and Gamma

(I didn't check, but it may be the same with, say, an animal shot on a button..)

Offline

#31 2013-12-28 18:37:32

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

Re: Visibility issues and Gamma

Jason I just sent you an e-mail with the 3 candidate files for the laddered trapdoor glitch and how to find it.

Offline

#32 2013-12-29 11:35:06

Simoon
Member
Registered: 2013-05-12
Posts: 31

Re: Visibility issues and Gamma

@Jason : could you check the videotape of Duane Douglas Garza ($200 bounty) ?
You can clearly see pits behind closed doors.

Offline

#33 2013-12-30 11:16:27

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

Re: Visibility issues and Gamma

arakira:
ARGGGG.... damn keyboard differences!  Sorry about that.  Yes, I got your email and will watch (and hints about what you remember are great, because I can often look through the recording with a text editor first and look for the name of a house owner, etc).


Simoon:
Yes, I see that on that tape. More strange stuff that needs to be fixed with visibility.  I'm on it!

Offline

#34 2013-12-30 13:07:02

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

Re: Visibility issues and Gamma

Okay, Arakira---thanks SO much for taking the time to send me that recording.  Indeed, there was a bug in the way that pits were being drawn in the latest code.  I've fixed it for v28.

(Anyone annoyed by this can edit their gameElements/houseObjects/pit  and open the various "properties.txt" files in the sub-folders 0, 1, and 3.  Add "forceUnderShadows" to each of those property files.  Pits will stop floating above the floor!

Offline

#35 2013-12-30 13:23:45

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

Re: Visibility issues and Gamma

Simoon... as it turns out, a similar issue to "pits being drawn on top of player" was causing pits to be visible behind doors.  In v27, the were marked as "walls," which gave them special status in terms of when they get drawn when they are technically invisible.  I've now switched them to being structural (so that windows orient around them" but not walls.  If you want to change this yourself, edit the properties.txt files and remove the "wall" property from each one.

Offline

#36 2013-12-30 13:32:09

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

Re: Visibility issues and Gamma

my pleasure!

Offline

#37 2013-12-31 16:59:17

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

Re: Visibility issues and Gamma

I'm reworking the vision-fading stuff from the ground up to address many of the visual/logical shortcomings of the recently-added system.  It's almost done, and I'm pretty sure it fixes everything, so hold off on reporting more visual glitches until I get this new one out the door.

Offline

#38 2014-01-04 13:44:07

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

Re: Visibility issues and Gamma

I see no visual glitch in v28, nice work! However I can get some valuable information by cranking up levels on most of the screenshots: I can see about one tile further through thick walls if they are made of the same material. In the case a mix of wooden walls and wired wooden walls, it helps to understand the circuitry of the house. Also, sometimes I can see if there is a dead end behind a door, even if the tile immediately behind the door is not a wall. In other words, I can often see the wall 2 tiles behind the door if the walls are well connected.
I remember that v26 didn't allow to exploit the images so much (though I don't remember exactly why, I just checked earlier posts in this thread). I guess that the issue comes from the way connected walls are drawn...

Offline

#39 2014-01-05 17:45:10

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

Re: Visibility issues and Gamma

Right... v26 drew less tiles, I think.  But it had some major problems with visual consistency (walls being cut off abruptly, etc.)  v28 focuses on the space in between where slightly more stuff is drawn, but it never looks bad, and the extra stuff that is drawn isn't THAT big of a deal (like you'll never see a dog or vault or family member completely through a wall like you could in v25).  Yes, you can sometimes see connected walls peeking through, but that isn't so huge.  If you really want to make invisible dead-ends behind doors, you can put the end cap 3 back.  That's much more practical than having to make EVERY wall in the game 3 thick like before!

Offline

#40 2014-01-06 06:59:03

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

Re: Visibility issues and Gamma

Yes, sure, it is visually more consistent. But I am back like in v25, making screenshots in every new corridor, in front of every door and around every corner, because I get hidden informations from most of the images (when I say "most of", I mean in at least 50% cases). In addition to what I wrote yesterday, I noticed that it can also reveal, for example, what's behind a wall near a U-turn, tiles behind a non-connected piece of wall, or animals far away in zig-zag corridors.
But, well, maybe that is just me being too perfectionist... I'd like to know what the other players are thinking about this.

Offline

#41 2014-01-06 10:34:55

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

Re: Visibility issues and Gamma

I've just started playing again and, although I like reducing the advantages of different monitors, to me the appearing of tiles seems really glitchy and jarring. If I can already see that a floor tile is there then it doesn't make much sense for it to suddenly be replaced with a wall.

The visibility shroud is already meant to represent things that you can't see,  I think it should be changed so it does that. It may mean making the edges a bit sharper but I think it would be better than having it incorrectly show fake tiles just to have it fade out more gradually.

Last edited by colorfusion (2014-01-06 10:43:07)

Offline

#42 2014-01-06 12:03:19

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

Re: Visibility issues and Gamma

Examples, please!

Here's one that I'm aware of:

http://castledraft.com/editor/KGsMOn

So, if you're standing where the robber is standing, the vault is invisible, though on most monitors you can see some "empty floor" back there where the vault should be.

When you move up to where the son is standing, the vault has a non-blocked diagonal neighbor (upper right neighbor floor to vault) that's now visible, so the vault fades into view.

So, what are our options here?  Really, the vault should not logically be visible through that gap.  But... drawing a shroud that FULLY makes that square back there black would impossible without it looking really ugly.   A soft edge of any kind would be impossible in this case, unless you want the shroud to be even wider and make seeing the should-be-visible walls impossible too.

Any other options?  Essentially, you can see empty floor back there because "you don't know what's back there."  It could be empty floor, or something else.  Could I draw "?" blocks back in places like that?

It also sucks how every monitor is different.  On my two main dev machines, this example actually looks pretty great, and not so shocking when the vault fades in.  But on a ThinkPad with a higher gamma monitor, the shroud actually looks pretty ugly and striated, with the empty floor CLEARLY visible.

I'll try tweaking the shrouds a bit more...

Offline

#43 2014-01-06 12:52:00

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

Re: Visibility issues and Gamma

jasonrohrer wrote:

Examples, please!
Any other options?  Essentially, you can see empty floor back there because "you don't know what's back there."  It could be empty floor, or something else.  Could I draw "?" blocks back in places like that?

Isn't the blackness already meant to be the areas that you don't know what is there? It just seems really strange to be to have the uncertain represented both by an empty tile and by the darkness, the latter is less confusing as it isn't already a possible tile.

With four doors around an object you can really distinctly see the floor tile, then the thing inside only appears when your character is adjacent to it:

http://imgur.com/CoIsKNS,PsyjgCi



This is one of the examples you gave where the current invisibility looks strange. With the current visual shroud, the only tiles you completely cannot see are these, whereas roughly these tiles are currently having the invisible effect.

That means it looks pretty strange if you have a high monitor where you can see all but the completely black tiles. Sharpening up the border to make it go from full colour to black more quickly can keep the right amount of tiles shown and hidden without giving an advantage to different monitors (Although my quick example there was pretty bad).  That image was the extreme where all tiles that should be invisible are completely blacked out, but it can be softened up a whole lot.

Last edited by colorfusion (2014-01-06 13:38:31)

Offline

#44 2014-01-06 15:36:37

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

Re: Visibility issues and Gamma

Yes, good points.  Working on this.

Offline

#45 2014-01-07 18:33:50

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

Re: Visibility issues and Gamma

I've made quite a bit of progress here, not by "sharpening" up the edge of the shroud (which is really hard to do without it becoming ugly, based on the fast way that I'm generating it as a 52x52 pixel image that gets blurred to hide the pixels), but by fixing some logical flaws in where the shroud is drawn.

First, I moved the whole shroud "up" so that it lines up with wall tops instead of wall bases.  This makes more sense and looks better, because the robber's head is near the wall tops.  Also, it "evens" the visibility from above and below.  Before, you could see a lot more if you were standing NORTH of something than you could if you were standing SOUTH.  Now you can see the same (limited) amount from either above or below.

Second, I changed the way that the shroud reacts to visible walls.  Before, it was "eaten into" by visible walls, to make sure that you could see them.  But now that the shroud lines up with the walls better, this isn't such an issue.  So, the shroud can be drawn at full strength right up to the edge of every wall top (with some special cases if the robber is in a corridor, or for the end cap of a corridor).

These two changes have a pretty big impact on "stuff visible around corners" without shrinking the "cone of visibility" as you look through an opening.

Granted, if you amp the gamma, more stuff is still visible around corners.  But without amped gamma, it looks much better now.

Old:
11829087246_d3f61edb39_o.png

New:
11829087286_6f07864e0d_o.png

Offline

#46 2014-01-07 21:52:54

Hippasus
Member
Registered: 2013-09-03
Posts: 32

Re: Visibility issues and Gamma

Your adjustments look great Jason but one concern, will this obscure wired walls? The shroud is now covering the innards of the wall, so how will tell what's inside? Wired walls are already pretty hard to spot, which I quite like, but I don't want to have to be forced hover my cursor over every bit of wooden wall...

Offline

#47 2014-01-07 23:07:36

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

Re: Visibility issues and Gamma

Yes, that's an issue for sure...  hmm...

Offline

#48 2014-01-08 06:02:50

ukuko
Member
Registered: 2013-04-06
Posts: 333

Re: Visibility issues and Gamma

I find in most cases I have to use the hover text to determine if a wall is wired anyway.

Offline

#49 2014-01-08 12:44:58

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

Re: Visibility issues and Gamma

I've tweaked the shroud to "pull back" slightly on wired walls, which restores their visibility to roughly what it used to be.

Offline

#50 2014-01-14 15:11:36

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

Re: Visibility issues and Gamma

It still feels like a problem not being able to tell what's behind a door. Every push door could be instantdeath, and unless I have tons of crowbars it's just an easy to set up guessing game. There are a lot of houses like this which don't really feel fair to die to when there was no reasonable way to know or counter it. Without previous life knowledge that would have cost $21600 just to get through that part of the house.

I think that one of the cheaper tools (brick, doorstop, saw) needs to be able to open doors, or you should be able to see exactly one tile behind a door when close up (through the keyhole).

Last edited by colorfusion (2014-01-14 15:13:59)

Offline

Board footer

Powered by FluxBB 1.5.8