ToME: the Tales of Maj'Eyal

How is light is added to 'seen' tiles? Where?
Page 1 of 1

Author:  andar_b [ Wed Nov 14, 2012 6:07 am ]
Post subject:  How is light is added to 'seen' tiles? Where?

I'm goofing around with the ASCII display, and I wondered if there's a way to adjust the dynamic range of the lighting? I found the "all_lited" flag in the zone.lua but that doesn't do what I'm looking for. I'd like the light given off by the player to have a long radius, but the light intensity will control how far the player can see into the dark. Outside of the lit areas, I'd like to have monsters and walls be almost black.

I think it would be cool to display any monsters that have been seen, but are currently out of sight and in the dark - but they'd be hard to spot. Perhaps the minimum light level could be controlled by the character's infravision score? idk :p For that matter, debuffs could be placed that would make it harder to see in the dark.

Any suggestions? I googled around the site but didn't see anything I could really understand. I see a few references to 'lite' in Player.lua so I'll go look around some more.

Just trying to clarify the subject line to see if it can get some attention.

Author:  bricks [ Thu Nov 15, 2012 1:36 am ]
Post subject:  Re: Adjusting lighting 'contrast'?

Er, is this for a real-time module? If not, it seems odd that you'd force the player to stare at the screen harder simply for aesthetic purposes.

Author:  andar_b [ Thu Nov 15, 2012 5:15 pm ]
Post subject:  Re: Adjusting lighting 'contrast'?


It seems odd to me that you would think that, perhaps I didn't express myself too well. And maybe it would be better to adjust the alpha of creatures out in the 'dark' ? idk. I am reminded of scenes in LOTR (I think) and Fate of Atlantis where the player had to find a source of light or ran out of torches.

Normally, the player would actually have more information than in ToME for example, but if they chose to rely solely upon infravision in the dark, they'd better have a good score.

What got me thinking about it was tooling around with Grey's "F* that Jam* template he posted in another thread. The player has a nice bright light, but it doesn't get very dark behind a wall that is casting a shadow. The wall glyphs themselves DO seem to get brighter or dimmer based on light level, but I'd like to see them have a lower minimum darkness for my purposes.

Author:  bricks [ Thu Nov 15, 2012 10:52 pm ]
Post subject:  Re: Adjusting lighting 'contrast'?

It's very possible that I'm not understanding you properly, you seem to have a few different systems in mind. You said you want creatures to be "almost black" outside of lit areas. If they are, in truth, detectable, and there's no cost to the player for scanning the screen with the "look" function, then the net gameplay effect is increasing the duration of every turn. Not that you can't do some pretty things with full color ASCII, Brogue is incredible.

I brought it up because I've been learning a lot about design and presentation of information, and the general consensus is that color is not a good way to communicate information. I've also played with lighting-based color manipulation in some small libtcod projects, and it seems to be more trouble than it's worth. You have to consider how color blending obscures information, how it changes on different displays, and how the color-blind interpret it. If ToME can't easily support this, you may waste a lot of time with an effect you end up ditching.

Author:  andar_b [ Fri Nov 16, 2012 11:51 pm ]
Post subject:  Re: Adjusting lighting 'contrast'?

Your comment about conveying information with color is interesting, it brings to mind one of the games on Lumosity that my wife HATES. It might say BLUE and you have to react quickly for what color it is. Most people will have to double-take to be certain whether the COLOR of the word and the COLOR WORD do or don't match. That doesn't even bring into play the fact that human color perception is completely subjective.

I would expect to make tooltips for (l)ook somewhat less informative when the character cannot see what they're looking at. It might simply say "you see movement in the dark" or "probably just a grue." Better sense and night vision would increase your chances of actually being able to determine what the creature is.

In general, the effect would be aesthetic, but if the player can't see the enemy clearly, the character probably can't tell either.

I'd like to see if I can manage to make the enemies similar. They may be able to see a torch, but unaware of whether or not they should attack it without further input. (A need-based AI would be really fun, I think, but that's another thread.)

Author:  andar_b [ Sun Nov 18, 2012 8:25 pm ]
Post subject:  Re: How is light is added to 'seen' tiles? Where?

I think I've got a way to clarify what I want, if not the reason.

The bit I'm looking for is where the FOV/light level of the tile is actually applied to the screen. Say I wanted to make the light appear brighter at the character position, or darker beyond the edge of the FOV, how would I go about doing that?

I mucked around in Map.lua and Player.lua, and managed to find some interesting stuff that appears to be connected to this - but still can't quite pin down where the lighting adjustment to the displayed tile takes place.

It looks like playerFOV() in Player.lua calls applyLite() in Map.lua, but that code seems to only set whether or not that tile is visible or lit. I couldn't manage to follow the breadcrumbs any further. I looked around in updateMap() but it doesn't look like it changes anything in the way the tiles themselves are displayed, and there's no adjustable values that I can clearly pick out as likely for my needs. I did try switching a math.max to math.floor - which changed the blending and diameter of the FOV lighting, but it didn't have any effect on the dynamic range of light values. I made the player blind, which combined with the all_remembered flag in Zone.lua simply showed me the room as if it were pitch black with no lighting, but the walls were quite visible - just not the enemies.

(Incidentally, it DID show 'empty spaces' instead of the usual floor tile where the player and enemies were. That almost acts like the concept I mentioned of having 'shadows' visible at the edge of vision, but having the player unable to determine is there.)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group