Light in caverns

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jens
    Swordsman
    • Apr 2011
    • 348

    Light in caverns

    Suggestion:
    I would like a fix to the light code, so that when I cast the spell/scroll/activation to 'Light Area', rooms in cave levels get lit. This would remove the tedium of running around all the walls to find potential exits from the room.

    I presume that the original levels have a flag set for being a room, so lighting a room just makes a check for being in the same room or something like that?
    There are some formations on the old levels that when you first enter you assume it is a room, but when trying to light it, it's not lit.

    What about an algorithm like:
    From @, put all 8 surrounding squares in a queue and let them follow this process:
    - if it's already been in the queue, ignore it.
    - if it's a wall, turn on the light.
    - if it's a floor with 2 or more adjacent walls, turn on the light.
    - if it's a floor with less than 2 adjacent wall tiles, it's lit, and all 8 adjacent tiles are added to the queue.

    With this algorithm most rooms would be completely lit, but it would not light up corridors. It would light up corridors that are 3 tiles wide, but not corridors that are 2 tiles wide.

    Another solution would be to add the same flag that is used on ordinary levels to the 'rooms' in cavern levels.
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    You might want to add a max-radius check, either by directly measuring the distance from the illumination source, or by tracking the number of iterations that have passed before a given tile got enqueued.

    Comment

    • jens
      Swordsman
      • Apr 2011
      • 348

      #3
      Sure, depending on how large rooms there are, or if some rooms are connected by corridors 3 wide etc. That basically depends on how powerful you want to make the 'Light' spell. The cavern levels I've seen so far haven't had rooms so large that it would seem strange to me to light the whole room.

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by jens
        Sure, depending on how large rooms there are, or if some rooms are connected by corridors 3 wide etc. That basically depends on how powerful you want to make the 'Light' spell. The cavern levels I've seen so far haven't had rooms so large that it would seem strange to me to light the whole room.
        I have argued very hard for the Light spell NOT to light entire rooms in cavern levels. Cavern levels are intentionally different, and should be creepy and frightening. This is ultimately d_m's call (no ... it's ultimately takkaria's, but it's d_m's code) and I don't know what will end up happening, but IMO the Light spell should have a max radius of 20 (same as sight range) and should not light any further. To be consistent, this should apply in large rooms on normal levels also. (In fact I think it may already do this, I'm not sure.)
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • jens
          Swordsman
          • Apr 2011
          • 348

          #5
          Originally posted by Magnate
          I have argued very hard for the Light spell NOT to light entire rooms in cavern levels. Cavern levels are intentionally different, and should be creepy and frightening. This is ultimately d_m's call (no ... it's ultimately takkaria's, but it's d_m's code) and I don't know what will end up happening, but IMO the Light spell should have a max radius of 20 (same as sight range) and should not light any further. To be consistent, this should apply in large rooms on normal levels also. (In fact I think it may already do this, I'm not sure.)
          They have a different feel, independent on how we do with the lighting issue, so we do not need to have bad light to accomplish that effect. What bad light does accomplish is increase tedium. In every room you need to walk around the whole room by the walls to find exits from it. What this does for my playing stile is: Oh, cavern, lets get away from this level ASAP. But with working lighting I would find them a welcome change.

          Side note: When it comes to frightening, the caverns could be made more dangerous by having a few wider corridors, so play tactics would need to change even more.

          About max radius for the light spell: No, in the current game there is no radius, and has never been. I have not actually checked this in code, but I have nerver come across a room that did not become completely lit.

          I do like the suggestion though, and it would certainly make more sence than the current model. It would affect playstile as well, since if you want to light a big room you can choose to use the spell twice, or venture into the room first to cover the entire room with one spell.

          I would prefer a clvl dependant radius though, since I like spells getting more powerful with increased clvl. Maybe something like 10+clvl, or 15+clvl/3. For perspective, imagine a vault with open space around it, instead of using one spell effect to light the entire room, you would need at least two, and probably more spell effects even with the highest of those max radii.

          Comment

          • Tobias
            Adept
            • Dec 2009
            • 172

            #6
            One possibility , which probably would take too much programming work, would be to adapt the run command to caves better.

            If you could just use shift-direction or .direction to walk along a cave wall without stopping all the time for small bulges, caves would loose most of their tedium.
            My Angband videos : http://www.youtube.com/view_play_lis...385E85F31166B2

            Comment

            • d_m
              Angband Devteam member
              • Aug 2008
              • 1517

              #7
              Originally posted by Tobias
              One possibility , which probably would take too much programming work, would be to adapt the run command to caves better.

              If you could just use shift-direction or .direction to walk along a cave wall without stopping all the time for small bulges, caves would loose most of their tedium.
              I am planning to try this. I'm not sure how much work it will be, but I will at least give it a show for 3.3.

              I also do want to make illumination work (a bit) better in caverns, but I will probably start with something simple like increasing the radius in all cases a bit and see how that plays.
              linux->xterm->screen->pmacs

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #8
                With a limited radius, you'll just be casting the light spell over and over again, turning caverns into levels that are straightforward for classes that are able to cast the spell repeatedly (basically everyone but warriors and possibly rogues).

                I do agree that awareness is a problem in cavern levels, but I'm not convinced that buffing the light spell is the best solution to the problem. Personally I make it a point to start carrying Magic Mapping in some form as soon as possible.

                Comment

                • buzzkill
                  Prophet
                  • May 2008
                  • 2939

                  #9
                  Originally posted by Magnate
                  I have argued very hard for the Light spell NOT to light entire rooms in cavern levels.
                  Which would be fine if there was a level playing field, which there isn't. Players need light. Monsters do just fine in complete darkness (even monsters that should need light to function). Restrict the monsters ESP-like ability and night vision on cavern levels and I've no problem with virtually no lighting. Until then caverns, IMO, are to be avoided which is a shame because they're pretty cool.
                  www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
                  My banding life on Buzzkill's ladder.

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 5110

                    #10
                    Originally posted by buzzkill
                    Which would be fine if there was a level playing field, which there isn't. Players need light. Monsters do just fine in complete darkness (even monsters that should need light to function). Restrict the monsters ESP-like ability and night vision on cavern levels and I've no problem with virtually no lighting. Until then caverns, IMO, are to be avoided which is a shame because they're pretty cool.
                    Well fortunately we have a ticket to look at the whole monster detection thing, though it's not imminent.

                    I haven't actually played much real playing (not counting dedicated bug-test playing) since cavern levels came in - I'm gonna do a bit of that and get back to you.
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    Working...
                    😀
                    😂
                    🥰
                    😘
                    🤢
                    😎
                    😞
                    😡
                    👍
                    👎