V now counts player-turns

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    V now counts player-turns

    For anyone playing nightlies or compiling from trunk, r1661 now shows both Player Turns and Active Turns on the 'C' screen and in chardumps. Player Turns are simply the game turns adjusted for speed (i.e. if your whole game is at +0 speed then this figure will be game turns / 10). Active Turns discounts turns spent resting, and so represents the number of actual 'moves' made in the game.

    Next I'd quite like to count "town turns" separately, but let's get some testing of this first to make sure it works properly. Thanks to Pete Denison for the patch and to Unangband for the original implementation.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles
  • PowerDiver
    Prophet
    • Mar 2008
    • 2820

    #2
    Originally posted by Magnate
    Active Turns discounts turns spent resting, and so represents the number of actual 'moves' made in the game.
    I understand the complications of resting, since regeneration is based upon gameturns rather than energy, so I can see that it cannot help but be treated a little differently.

    However, I do not see why you think resting is not an actual move. How is it different to rest to regain hp as opposed to casting a spell to regain hp? It doesn't matter, but I am curious as to your viewpoint. The only difference I see is one of efficiency.

    Comment

    • RogerN
      Swordsman
      • Jul 2008
      • 308

      #3
      If resting doesn't count, and movement in the town doesn't count, then store-scumming is essentially free. Take stairs down, rest 1000 turns, take stairs back up. Stores all change their inventories, and the total number of active turns goes up by just 2?

      Comment

      • buzzkill
        Prophet
        • May 2008
        • 2939

        #4
        Turns spent resting should count as 2 turns (as well as increasing the rate of dungeon re-population).
        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

          #5
          Originally posted by PowerDiver
          However, I do not see why you think resting is not an actual move. How is it different to rest to regain hp as opposed to casting a spell to regain hp? It doesn't matter, but I am curious as to your viewpoint. The only difference I see is one of efficiency.
          Sorry, I wasn't clear. Let us define a pturn as "ten game turns adjusted for player speed". In most cases one pturn equals one "move", but when you rest, one move can span multiple pturns. So I did not mean to say that the action of resting does not count as a move, merely that when you do rest, you spend many non-moving pturns doing so.

          This is just an artifact of the "rest until healed" mechanic. If you only ever rested for a set amount of time, it would be easy to count "moves" spent choosing to rest. But my assumption is that most people (excluding your good self, I'll grant) tend to use rest-until-healed, which will make the number of moves spent choosing to rest a tiny fraction of the total number of pturns spent resting. Buzzkill is right though - this approximation could be improved by counting the first resting turn as "active".
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Originally posted by RogerN
            If resting doesn't count, and movement in the town doesn't count, then store-scumming is essentially free. Take stairs down, rest 1000 turns, take stairs back up. Stores all change their inventories, and the total number of active turns goes up by just 2?
            We're coming at this from different perspectives. I'm looking to count the number of town turns precisely so that I can see how much time I waste in town, and work on minimising it. I'm not suggesting that Active Turns should be used as an indicator of play speed. Total player turns is the correct indicator - anything else like resting turns or town turns are just guides to your own play style.

            And remember folks, it's not all about minimising turncount - a 25M turn win is still a win, and if it's more fun that way, that's cool.
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

            • PowerDiver
              Prophet
              • Mar 2008
              • 2820

              #7
              Originally posted by Magnate
              If you only ever rested for a set amount of time, it would be easy to count "moves" spent choosing to rest.
              How are you doing what you are doing? I am assuming that running down a corridor counts the same number of player actions as taking individual steps. Is that true?

              If I was doing it, I would

              (1) make sure energy is modified through a function, not direct access to a variable -- the easiest way to debug this is to declare the variable const and cast to modify it in the function

              (2) make the function that decreases player energy increase my total_player_energy variable


              [edit] rest until healed is say equivalent to 100 "rest 10 gameturn" commands. Why wouldn't that count as 100 actions? Am I missing something?

              except

              (3) if you are resting, increase by 10 energy/gameturn irrespective of speed. There is no point penalizing fast chars since resting is about gametime and not energy. I don't know how energy is maintained when resting, but it ought to be possible to find a single place to do this, or to put a check inside the decrease_energy function if that is called normally.

              Comment

              • Pete Mack
                Prophet
                • Apr 2007
                • 6883

                #8
                Originally posted by PowerDiver
                (3) if you are resting, increase by 10 energy/gameturn irrespective of speed. There is no point penalizing fast chars since resting is about gametime and not energy. I don't know how energy is maintained when resting, but it ought to be possible to find a single place to do this, or to put a check inside the decrease_energy function if that is called normally.
                I almost agree, but I think this would screw up random monster regeneration. Resting should take turns proportional to dungeon turns, not player turns, but I don't see why it should affect the behavior of the dungeon as a whole.

                Note that regeneration speed already scales faster than player speed, as it increases by up to 9x with increasing CON--or 18x if you throw in Regen from an Elven ring. (Player speed increases around 3x.)

                Comment

                • PowerDiver
                  Prophet
                  • Mar 2008
                  • 2820

                  #9
                  Originally posted by Pete Mack
                  I almost agree, but I think this would screw up random monster regeneration. Resting should take turns proportional to dungeon turns, not player turns, but I don't see why it should affect the behavior of the dungeon as a whole.

                  Note that regeneration speed already scales faster than player speed, as it increases by up to 9x with increasing CON--or 18x if you throw in Regen from an Elven ring. (Player speed increases around 3x.)
                  We seem to be talking at cross purposes. My suggestion is just how to count a descriptor to write to the dump. It would have no effect at all upon gameplay. If you rest a certain number of game turns [not energy], your mana and hp increase by a certain percentage [not sure if the same for both] of max, doubled if you have regen. That is the status quo as I understand it. Try repeated searching with and without a speed boost and that's what I observe.

                  I thought the whole point of counting player actions is that some people think gameturns is a poor metric if the char finds a ring of speed+10 on DL 1. It is likely that I don't understand the point, so feel free to suggest other reasons.

                  You shouldn't count more "actions" for a player who rests 100 gameturns just because he has higher speed and thus more energy wasted per gameturn. Do we agree on that? You don't want to set things up so that if it is used for a comp, people would need to remove speed items before resting if they wanted to minimize "actions".

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 5110

                    #10
                    Originally posted by PowerDiver
                    I thought the whole point of counting player actions is that some people think gameturns is a poor metric if the char finds a ring of speed+10 on DL 1. It is likely that I don't understand the point, so feel free to suggest other reasons.
                    That's the reason I implemented Player Turns and Active Turns, yes.
                    You shouldn't count more "actions" for a player who rests 100 gameturns just because he has higher speed and thus more energy wasted per gameturn. Do we agree on that? You don't want to set things up so that if it is used for a comp, people would need to remove speed items before resting if they wanted to minimize "actions".
                    I still haven't succeeded in communicating my intention here: rest-until-healed counts as one action, regardless of how many game turns or player turns you spend resting. So I am agreeing with you - faster characters are not penalised for resting.

                    (And yes, running down a corridor counts as one action per square moved, the same as walking. We're counting actions, not decisions. I can see that you could argue that resting and running should be consistent, but it seems obvious to me why they're treated differently.)
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    • PowerDiver
                      Prophet
                      • Mar 2008
                      • 2820

                      #11
                      Originally posted by Magnate
                      rest-until-healed counts as one action
                      Rest until healed is just auto-repeat on Rest_One_Player_Turn. Do you count the number of turns used when you autorepeat on tunneling or picking locks?

                      I'm sure you have a good reason for treating resting differently, but I guess I just don't get it. No worries. Presumably this is just another example of my difficulty understanding others' perspectives.

                      Comment

                      • Magnate
                        Angband Devteam member
                        • May 2007
                        • 5110

                        #12
                        Originally posted by PowerDiver
                        Rest until healed is just auto-repeat on Rest_One_Player_Turn. Do you count the number of turns used when you autorepeat on tunneling or picking locks?

                        I'm sure you have a good reason for treating resting differently, but I guess I just don't get it. No worries. Presumably this is just another example of my difficulty understanding others' perspectives.
                        Well, the honest reason is that that's the way it was done in Unangband and I just didn't think very hard before backporting it.

                        The more I think about it, the less helpful I think distinguishing resting is. If we're counting resting as one active turn, we really ought to count repeating lockpicks and tunnelling as a single active turn too, which gets silly.

                        The basic measure of player speed is player turns. I'd rather use the extra field to measure town turns, as that would have a useful function in telling me how well I'm optimising my time in town. Telling me how much time I spend resting isn't terribly useful - especially since it seems to be a function of character speed. (I really don't get that - lockpicking or tunnelling aren't affected by character speed, in terms of the number of player-turns they take, so why is resting??)
                        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                        Comment

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