PDA

View Full Version : Speed


Zero
January 8, 2008, 04:27
I like the addition of +speed to certain artifacts. Perhaps we could add speed bonuses to certain ego items? Like *Slay Animal* could add to speed instead of INT... or something.

But, the fact that even a +1 to speed will grant extra rounds every set number of turns allows increased (ab)use of pillar dancing. Perhaps speed (and the corresponding energy system) could be changed so that every +10 speed gives you a 50% chance of getting an extra round that turn. So, for example, +1 speed means you have a 5% chance of getting one extra round per turn. +6 speed means you have a 30% chance of getting one extra round per turn. +11 speed means you have a 50% chance of getting an extra round and an additional 5% chance of getting a separate extra round per turn, yielding a 50% chance to get one extra round, a 47.5% chance to get no extra rounds, and a 2.5% chance to get two extra rounds each turn. +10N to speed gets you (Nd2 - N) extra rounds each turn. Negative speed could work the same way, but instead of getting extra rounds, it's turns lost before your next round. This would be similar to, or even implemented as, paralysis.

The only problem that I can see with this is that the RNG will occasionally eat you alive if you're fighting a monster that is very fast, regardless of your own speed. For example, you and a monster are both +40. There is a (0.5)^8 or 0.39% chance of a catastrophic worst-case scenario: you get no extra turns and the monster gets 4, which could quite possibly result in insta-death. To get around this problem, we just have to remember that it doesn't exist if both player and monster are +0 speed. So, we simply subtract the player's speed from the speed of each monster. In this case, the +40 player and +40 monster each get one round per turn, and a typical +0 monster will usually miss a few turns, but may surprise by keeping up with the player for a few turns. I think this would be a lot more interesting, challenging, and fun.

Note that with that correction, the player would never actually get any extra rounds, only monsters faster than the player would. Instead, the player's speed acts as a kind of baseline, with monsters slower than the player getting random pseudo-paralysis.

Also, monsters could have speeds that are not simply multiples of 10. Since a difference of 10 in speed translates to a huge difference in difficulty, this would allow more subtle adjustments to monster difficulty.

Here's a suggestion from the development wiki regarding making rogues more powerful:

"Another thing could be ... speed. A short boost of +5, but cumulative with haste self, in a relatively deep spellbook. Earliest and lowest-mana access to haste self (with mages getting it, from the same book, at a somewhat higher level and mana cost)."

Why not just give rogues a permanent +1 or +2 (or even +X, depending on CLvl) to speed?

Zero
January 8, 2008, 05:10
[EDIT] Fixed bad math in slow example.
[EDIT] Better slow example.
[EDIT] Added another fast example.

Better idea: monsters that are faster than the player get extra rounds at set intervals, just as it is now. Since the pillar dance issue only applies to monsters that are slower than the player, randomness only has to be added to slower monster movement. So, if each point of speed were to have the same magnitude as it does now:

Fast +11: Monster gets one extra round for 9 turns, two extra rounds every 10th turn: 2111111111...
Fast +12: 21111...
Fast +13: 2112112111...
Fast +14: 21211...
Fast +15: 21...
Fast +16: 22121...
Fast +17: 2221221221...
Fast +18: 22221...
Fast +19: 2222222221...

So, basically, something like:

fastMonster.fastness += fastMonster.speed; // It gets its energy this turn.
fastMonster.extraRounds = fastMonster.fastness / 10; // Groups of 10 stored energy give an extra round.
fastMonster.fastness = fastMonster.fastness % 10; // Store any leftover energy.

I know this isn't how energy currently works. The energy system would have to be changed.

Slow -14: Monster has a 50% chance of losing a round, a 50% chance of losing a round, and a 40% chance of losing a round. If it has any remaining "fastness" from when it was fast, that fastness is removed and the %chance of losing rounds is reduced by fastness*10. So, in this case, if it had 2 fastness remaining, it would be 50% + 50% + 20%.

These speeds would be relative to the player, who would always get one round a turn.

Djabanete
January 8, 2008, 06:34
The problems arising from the predictability of the Vanilla energy/speed system have been pretty much eliminated in Entro (and Heng I assume, I don't know how far back this change goes); monsters often gain or lose turns relative to the player, making strategies like pillar-dancing and hack-n-back pretty unfeasible. This has a side-effect of making things more dangerous --- you'll never really notice (or care) when you get a free turn on a baddie, but when they get free hits on you, you really feel it. I enjoy playing under this system because it makes combat more interesting and is also justified from a real-life standpoint.

Sorry if that's just exactly what you described :D

Bandobras
January 8, 2008, 15:20
4GAI, at least well tweaked one, eliminates most of the problems. If you hack and back, the monster hastes, switches to distance attacks (even if they are much weaker than his melee) or just flees to ambush you from another side of the dungeon. Similarly, monsters are creative with pillar dancing, so they may e.g. wait a turn or move away from the pillar and find LOS from some distance...

zaimoni
January 8, 2008, 17:28
The problems arising from the predictability of the Vanilla energy/speed system have been pretty much eliminated in Entro (and Heng I assume, I don't know how far back this change goes);Yes, this change is in Hengband as well.monsters often gain or lose turns relative to the player, making strategies like pillar-dancing and hack-n-back pretty unfeasible. This has a side-effect of making things more dangerous --- you'll never really notice (or care) when you get a free turn on a baddie, but when they get free hits on you, you really feel it. I enjoy playing under this system because it makes combat more interesting and is also justified from a real-life standpoint.

Sorry if that's just exactly what you described :D
Hengband's implementation is to put the base energy cost of a move (100) through a normal distribution.

The net effect is that once in a while, just about all normal speed monsters will get a double or triple move on the player at once. It's much more correlated than this proposal.

Zero
January 8, 2008, 21:08
Hengband's implementation is to put the base energy cost of a move (100) through a normal distribution... It's much more correlated than this proposal.

So, the energy cost for something's next round is chosen at random, and follows the bell curve? And the speed modifier is added to the energy it gets each--I don't know the correct term to use--tick? This would have the effect that monsters the same speed as the player would sometimes get an extra round, and sometimes lose a round. My idea would have monsters equal to the player's speed always keep pace with the player. That is, the player's rounds and the monster rounds would be perfectly interleaved. This would prevent people from attempting to kill something, and if the RNG doesn't favor them in the first few turns, run off and try again. Randomness is zero for a speed difference of zero, and increases with player speed advantage. This would seem to me to introduce only the necessary amount of randomness to prevent pillar dancing.

Also, the pillar dance works because the player can predict when the monster will move. With better "correlation", that is, if you know that the monster will be susceptible to the pillar trick *most* turns, then pillar dancing is still the best strategy. A 100% chance of success each turn (the perfect predictability that exists now) will remove 100% of the challenge. With a 90% chance of success each turn, the challenge is still dramatically reduced. Under my proposal, speed is still critical to have, random speed bursts are kept to a minimum, and the effectiveness of pillar dancing is also kept to a minimum because you have to have a much larger speed advantage to make it worthwhile.

This has a side-effect of making things more dangerous --- you'll never really notice (or care) when you get a free turn on a baddie, but when they get free hits on you, you really feel it.

Please read my second post. Because predictable monster rounds are only a problem with slower monsters, you only have to randomize their movements. Faster monsters can be kept deterministic to prevent that extra dangerousness.

Better AI for situations where the monster is slow is also a good idea.

zaimoni
January 8, 2008, 23:14
So, the energy cost for something's next round is chosen at random, and follows the bell curve? And the speed modifier is added to the energy it gets each--I don't know the correct term to use--tick? This would have the effect that monsters the same speed as the player would sometimes get an extra round, and sometimes lose a round.Yes.

In practice, the maximum number of rounds gained or lost for an equal-speed monster is two when the player is normal speed. (Which happens often enough to make life more dangerous; I've lost at least two mindflayer paladins to this.) However, if one equal-speed monster gains two rounds then most of the others will gain at least one round on the player.

Also, the pillar dance works because the player can predict when the monster will move. With better "correlation", that is, if you know that the monster will be susceptible to the pillar trick *most* turns, then pillar dancing is still the best strategy.The pillar dance is safest when one knows that the monster cannot get double-moves in most cases. (In Heng, it also requires that the monsters not have breath weapons -- they're allowed to target squares near the player). So Heng's energy system does a fairly good job of neutralizing the pillar dance without using proper movement direction randomization.

Zero
January 8, 2008, 23:35
Just two nitpicks:

The pillar dance is safest when one knows that the monster cannot get double-moves in most cases.

I think you mean, "The player can get double-moves in most cases." Right?

movement direction randomization

Direction randomization? I'm not talking about randomizing the direction the monster moves, only the order of and number of rounds it gets relative to the player.

I'd really like to get a developer's comments on this idea--someone who has implemented or modified a working speed system and knows all the intracacies and special cases.

zaimoni
January 9, 2008, 00:14
Just two nitpicks:The pillar dance is safest when one knows that the monster cannot get double-moves in most cases.I think you mean, "The player can get double-moves in most cases." Right?Ideally, you get double-moves while the monster never does. Hengband's energy system trashes this by giving the monster double-moves even when you have a slight speed advantage.
movement direction randomizationDirection randomization? I'm not talking about randomizing the direction the monster moves, only the order of and number of rounds it gets relative to the player.V currently uses a deterministic, fairly complicated function to determine which direction a monster moves in a pillar-dance situation.

In Zaiband, I'm planning to mostly replace the pathguessing/smelling code with a proper pathfinding system for 3.0.8 alpha. This system would resort to randomly deciding between equally fast optimal paths. This is responsible for two blocking feature requests: "Reasonable pathfinding" ( http://www.zaimoni.com/flyspray/index.php?do=details&task_id=2 ) and "AI fears instadeath" ( http://www.zaimoni.com/flyspray/index.php?do=details&task_id=7 )

takkaria
January 9, 2008, 02:21
I'd really like to get a developer's comments on this idea--someone who has implemented or modified a working speed system and knows all the intracacies and special cases.

I think most of those have disappeared from the scene. The only way you'll get feedback is doing it yourself and releasing it as a patch.