Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old September 6, 2009, 10:07   #1
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
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.
Magnate is offline   Reply With Quote
Old September 6, 2009, 20:05   #2
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Magnate View Post
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.
PowerDiver is offline   Reply With Quote
Old September 6, 2009, 21:10   #3
RogerN
Swordsman
 
RogerN's Avatar
 
Join Date: Jul 2008
Posts: 308
RogerN is on a distinguished road
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?
RogerN is offline   Reply With Quote
Old September 7, 2009, 02:21   #4
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
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.
buzzkill is offline   Reply With Quote
Old September 7, 2009, 07:24   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by PowerDiver View Post
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".
Magnate is offline   Reply With Quote
Old September 7, 2009, 07:26   #6
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by RogerN View Post
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.
Magnate is offline   Reply With Quote
Old September 7, 2009, 07:43   #7
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Magnate View Post
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.
PowerDiver is offline   Reply With Quote
Old September 7, 2009, 08:12   #8
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,658
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by PowerDiver View Post
(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.)
Pete Mack is online now   Reply With Quote
Old September 7, 2009, 08:48   #9
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
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".
PowerDiver is offline   Reply With Quote
Old September 7, 2009, 18:26   #10
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by PowerDiver View Post
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.
Quote:
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.)
Magnate is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Old player is back... aia Vanilla 5 May 28, 2009 06:15
How many turns do you "lose" when recalling back to town? bebo Vanilla 32 February 11, 2009 14:22
Yet another new player Sordino AAR 19 May 14, 2008 10:52
player ghosts daft Vanilla 10 April 27, 2008 17:20
[All] Protecting the @ from player stupidity. andrewdoull Variants 10 July 3, 2007 13:39


All times are GMT +1. The time now is 15:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.