Temple of The Roguelike Forums

Development => Programming => Topic started by: JoshuaSmyth on January 26, 2008, 02:12:01 AM

Title: Action Points?
Post by: JoshuaSmyth on January 26, 2008, 02:12:01 AM
Are there any Roguelikes out the that use an 'action points' type system, most of them seem to have a you move/enemy(s) move system.

I was thinking something sorta like fallout, so the player might have 4 action points and walking uses 1 point, shooting 2, accessing the inventory 1, reloading 1 or whatever - Action points could of course be increased with dexterity or speed potions or some such thing.

And monsters could have n action points also - Order could be resolved by somekind of initiative test at the begining of a round.

Just a thought - might include something like that in my next rougelike (if I get around to making one)

An action points system might also be more condusive towards squad or party based games.
Title: Re: Action Points?
Post by: stu on January 26, 2008, 02:21:44 AM
I have something like it. Itsa kinda time system.

The baseline is 1000 points. Movement costs 1000 points. You regen 1000 after each round. Heavy armour costs, etc, so you might only regen 900 points...  so you miss a turn every so often or if you have a ring of speed you might regen 2000 points, in that case you can move twice a round.

Its also stacked, so you can cast haste on yourself 10 times and maybe get 10000 points a round so free 10 moves a round.

a round goes like

for every actor, >= 1000 points, they do something.
loop until everyone has <1000 points.

right now it isnt granular on the level of your example of 1 point a move, 2 points shooting etc.


I should add, its also timed. if you dont make a move inside x/ms you've skipped your turn, so its semi real time. and when you move the clock resets. difficulty level is tied to the time between moves

Walking into a nest of bee's.... not fun! :)


Title: Re: Action Points?
Post by: JoshuaSmyth on January 26, 2008, 04:19:23 AM
Is your game avail for download Stu?
Title: Re: Action Points?
Post by: Gamer_2k4 on January 26, 2008, 05:20:25 AM
Joshua, a speed system is actually a pretty common element in a roguelike, even if it's not readily noticeable.  I'm sure almost all of the Angbands have it; so does Gearhead, ADOM, Nethack, and pretty much any other major roguelike.

Stu, that idea sounds pretty good.  I might borrow (steal) it for my game.

Presently I use a count down system.  Each turn, if an actor has a positive amount of waiting time left, they subtract a certain amount from that time (determined by their speed).  If they have zero or less time remaining, the actor is allowed an action.  That action adds a certain number of points to the waiting time, and the process restarts.
Title: Re: Action Points?
Post by: Z on January 26, 2008, 08:15:26 AM
Joshua, IMHO the system you are proposing is not a natural one for standard roguelikes. It means that, for example, you get to move 4 times, then your enemy gets to move 4 times. I see this as less natural than the standard roguelike movement, which makes you alternate turns.

It can have some use to minimalize "context switching" between player characters, for either party-based (Exile/Avernum which is quite close to roguelikes used it) or multiplayer games (War of Wizards 7DRL? I am not sure). I also remember Lair of Demon Ape use something similar to action points.

A natural way is to have each being have a T value, which means, when will it be able to perform the next action (in global time). After each action, we find the creature which has the smallest value of T, set the global clock to T, let it do what it wants, and increase its T, which can depend on its speed and action. The system proposed by Gamer_2k4, and also used in ADOM at least, works similarly but is more complicated than my natural system, I guess in order to make it more effective, although it sometimes adds some weird behavior. (However, my system can be implemented effectively, in O(log n) per action, where n is the number of creatures.)
Title: Re: Action Points?
Post by: JoshuaSmyth on January 26, 2008, 09:53:51 AM
Ah, I did wonder what caused some monsters to act faster than others in rougelikes. But I didn't bother implementing it for my game. A time-for-next-action for each actor seems to make a lot of sense.

I still think action points could be interesting for tactical reasons; Say for example if you move then shoot you then get a penalty for shooting. Or some monsters could attack twice, or use a potion then attack etc... and if you get knocked down, then you might lose a couple points for the next round.

I think I'm just feeling giddy for some fallout :)

 
Title: Re: Action Points?
Post by: stu on January 26, 2008, 12:56:55 PM
my game is available, working on the 0.4 release currently, doing some magic.
check out http://www.mega-tokyo.com/blog/index.php/category/Cracks%20and%20Crevices/

the 0.3 isn't very playable but its ok.

releases page
http://www.mega-tokyo.com/blog/index.php/category/cracks_and_crevices_releases/



Title: Re: Action Points?
Post by: Anvilfolk on January 26, 2008, 04:26:52 PM
When I do my roguelike (which is like, never :'(), I think I'll use the same system as Z. It definitely seems to be the most natural. You can give a base time value to each action, and each action's time value gets modified by the character, his items, location, and any other factors you want. Pretty darn configurable! And you can emulate some creatures being faster than others.

Provided the "speed" or "agility" of a character is very low, say, his "moving action" could cost 10 time units, while a fast character's might only use up 5. This means that as soon as the slower guy moves, the faster one will get two moves before the slower guy can act again.

As far as attacking and getting two attacks or so, it can be hacked into the code by making an attack routine perform two or more attacks depending on the character attacking, or you can queue up events. If you're wanting to make a full attack, then maybe the first attack takes 5 units and the secondary 2 or 3. And maybe a "normal" attack from someone who doesn't have several attack moves is 7 or 8. With queued actions it's plausible that the double-attack character can attack once, get hit, and attack again immediately. The attack in the middle can affect the second attack negatively (if you were just hit, I'm pretty sure you won't be as effective).

Plenty of ways to do stuff :)
Title: Re: Action Points?
Post by: Z on January 29, 2008, 01:29:01 PM
Yes, action points are less natural than systems described above, but it does not necessarily mean that they could not be interesting :)

To make the speed system more interesting, one could add the following variation: the game remembers the last action which was done by the character, and make time/success of the next action depend on what it was. For example, if your last action was movement, then:

Title: Re: Action Points?
Post by: corremn on January 29, 2008, 11:18:56 PM
To make the speed system more interesting, one could add the following variation: the game remembers the last action which was done by the character, and make time/success of the next action depend on what it was. For example, if your last action was movement, then: ...

Warlocks Mountain did this but the effect was totally unnoticable by the player.  I think the player generally wants more deterministic behaviour from actions.
Title: Re: Action Points?
Post by: Adral on January 30, 2008, 01:00:15 PM
I think the player generally wants more deterministic behaviour from actions.

That's true - I, as a player, like to *know* what I'm doing. After all, the roguelikes are all about tactical decisions, aren't they? If I don't know if I am doing something wrong or right, or what effects are a certain action doing, it feels as if I'm playing blindly.
Title: Re: Action Points?
Post by: elsairon on February 03, 2008, 03:27:50 PM
Good points all around.

Here's the idea that I'm using for developing my RL.

Any change needs to be noticable by the player, clearly visible on the screen in some way, (or perhaps via some sound if you use those).. maybe by a message, or showing current bonuses, etc.

If the player doesn't notice it, it adds nothing to the game for that player.

Title: Re: Action Points?
Post by: Z on February 03, 2008, 03:55:07 PM
This topic (how to show values) is interesting.

For example, the player has an option to see attack values (accuracy, damage etc.) And he can also have an option to show how accuracy translates to probability, so he does not need to guess.

But we also want to give a dodge penalty (or equivalently accuracy bonus) when the victim does not see the attacker, e.g. when the attacker is invisible; and a dodge bonus when the victim is invisible to attacker. How to show that? If we always show improved values for invisible players, this will be wrong against monsters which can see invisible. (Actually, if you can't see your body and weapon, and your enemy can, then hitting should be even harder. But it is probably useless to take that into account.)
Title: Re: Action Points?
Post by: Anvilfolk on February 03, 2008, 05:07:47 PM
This is actually a matter of preference. I've always stayed clear of AD&D games because of the horrendous focus on numbers, numbers, numbers. I guess that due to the small lifespan of most characters in a roguelike, this might actually be ideal. You're always searching for the better items to you can SURVIVE longer.

However, in a longer-spanned game, I much prefer no numbers at all! I played Shadows of Isildur (http://www.middle-earth.us) for a few years, and I loved how the focus wasn't on getting the higher numbers. Another example is Dwarf Fortress... but every example I can come up with makes your character(s) survive for much longer than a roguelike.

Unreal World could do away with all the numbers, from my point of view.

The fact of hiding numbers behind adjectives completely changes the focus of the game. Now it depends only on what type of game you want :)



About what you've said: yes... there have been some experiments made, and unless the player sees direct, really, REALLY noticeable differences in what he's doing, there's no point putting it in the game. Players have a tendency of missing just about everything ;)
Title: Re: Action Points?
Post by: Z on February 03, 2008, 10:18:21 PM
Probably a matter of preference... but I don't think using adjectives instead of numbers is the way to go. It is true that human feelings in nature (e.g. how strong am I) are not in numbers, but they are not in words either. Using bars or color progressions would be appropriate for that. And with adjectives, you have to think whether e.g. "awesome" is better than "major", and how big the difference is. And whether "average" means average among population, or normal for a middle level character. There are no such problems with numbers. At least if you have some basic skill in maths.

Note that this is for computer games only. For P&P roleplaying, numbers are as useful as in fantasy books.
Title: Re: Action Points?
Post by: Anvilfolk on February 03, 2008, 10:35:11 PM
Well, you'd surely have a scale, detailing which adjectives are better than the others.

My point was that the focus changes. The idea is precisely that you don't have an exact idea about where you are in terms of skill, just a general, relative idea. This is different than a progress bar, which is still a lot more exact than 6 adjectives to cover 100 different values. Then the focus isn't about getting sword X above sword Y, because X is 10-16 damange and Y is only 8-12... it's whether, for example, which fits your character the most.

Since these changes and slight improvements aren't as obvious, more than likely the player won't notice them... he can't give it as much importance, then. He'll focus his attention elsewhere, changing the way the game is played.

I still think that for "classic" die-a-lot roguelikes, numbers are fine. All the problems you set for "adjectifying" (does this word even exist?:P) can be resolved by, say, reading a help page.
Title: Re: Action Points?
Post by: Z on February 04, 2008, 01:32:22 AM
Then, why show these 6 adjectives at all? The player should have a general idea about their skills without them. For example, the player should know (from their knowledge, or manual, or experiments) that elven archers are very good with bows. No use for writing "bow skill: very good".
Title: Re: Action Points?
Post by: purestrain on February 04, 2008, 08:20:34 AM
I think a general classification should always exist. I planned that the player should be given no real numbers; and only estiminations about what he or others can. It would help and doesn't require me e.g. to count hits and make an average of them to know my skill in swordfighting. I'm against number; since numbers can force a good game into a calculation sheet.
Title: Re: Action Points?
Post by: stu on February 04, 2008, 02:45:19 PM
the fudge system of using "very good" for skills instead of "75/100" its pretty good and works well.

underneath you still need to turn it into numbers.
Title: Re: Action Points?
Post by: Gamer_2k4 on February 04, 2008, 07:51:25 PM
the fudge system of using "very good" for skills instead of "75/100" its pretty good and works well.

It's too general for me.  If I'm "very good" with both swords and hammers, but my actual stats (unseen) are 75 for swords and 80 for hammers, I'd like to know that.  And if the difference isn't significant enough, then why is it on a scale of 0-100 instead of, say, 1-10?
Title: Re: Action Points?
Post by: Anvilfolk on February 04, 2008, 11:17:33 PM
Again, it comes down to what kind of gameplay you want to emphasize.

You're looking at it simply from a roguelike's perspective. In that case, I do like knowing what I'm more proficient with so that I can use that weapon and have better chances of ... not dying:)

Imagine a MMORPG, where RolePlaying is actually meaningful in the context of the game (it is not simply an excuse for a hack'n'slash environment)... it makes sense to me that certain characters will want to re-inforce their "burliness" by using a warhammer instead of a sword (of realistic proportions). If both their stats are "very good", the player will, generally speaking, see no technical advantage in using either. He'll probably choose the warhammer for his stocky character - even though in your case, the sword would be deadlier.

Anyone seeing him wearing blacks, bearskin cloak, heavy (blackened) plate mail, chainlinks for "adornment" and such, along with his nice'n'heavy warhammer will think him a lot "cooler" than if he had a regular run-of-the-mill longsword at his belt.

This is just one of the limitless number of examples one could find where players start caring more about the actual roleplaying than about maximizing numbers. The underlying system can still be as technically complicated as you want, even equal to the roguelike's, but you've effectively changed the way the game is played - which was my original point.
Title: Re: Action Points?
Post by: Xan on June 28, 2011, 08:36:47 PM
A natural way is to have each being have a T value, which means, when will it be able to perform the next action (in global time). After each action, we find the creature which has the smallest value of T, set the global clock to T, let it do what it wants, and increase its T, which can depend on its speed and action. The system proposed by Gamer_2k4, and also used in ADOM at least, works similarly but is more complicated than my natural system, I guess in order to make it more effective, although it sometimes adds some weird behavior. (However, my system can be implemented effectively, in O(log n) per action, where n is the number of creatures.)

I had thought about implementing action scheduling this way in my roguelike, but I ran into a little problem with it, and I'd like to know what you think about it.  The problem I had was in determining the T value for the next action of a creature whose speed was being modified, and that speed modification depended on the elapsed time from the beginning of the effect.  E.g., the speed modification decreases over time, so it wouldn't be accurate to calculate the T value from the creature's current modified speed.  It could be done using calculus, but that assumes that the scheduler knows the formula for the modification, which in my case it cannot, since modifications are all self-contained units.

The same problem is found in action point systems as well, since there time is incremented in discrete ticks, but there is a good approximation there if the ticks are generally small enough in relation to the time normal actions take.

So I ended up going with an energy system similar to ADOM's, and although I'm not completely satisfied with it, it seems to work better than the alternatives that I've tried.
Title: Re: Action Points?
Post by: Z on June 28, 2011, 10:37:04 PM
I just base the T-value on the current speed, ignoring the fact that the speed can be changed in meantime. Can you show me a situation where this loss of accuracy is really a problem?
Title: Re: Action Points?
Post by: Xan on June 29, 2011, 07:40:44 AM
I just base the T-value on the current speed, ignoring the fact that the speed can be changed in meantime. Can you show me a situation where this loss of accuracy is really a problem?


Well, one example of an action that takes a long time is equipping some sorts of armor, which can take up to ten turns at normal speed to complete (so, somewhat similar to ADOM).  There is also a potion which dramatically increases your speed, but has a sharp dropoff of effect over time, so while you start out moving e.g., 10 times normal speed, before even the time of a normal turn has passed, you will be moving less than 3 times normal speed.  So if the time to equip the armor was calculated based on the current speed right after using the potion, it would only take the time of one normal turn to do it, rather than ~3 that it would using an approximation of the decreasing effect.  That's certainly a noticeable difference;  I'm not sure everyone would think that it's a "problem".
Title: Re: Action Points?
Post by: Z on June 29, 2011, 11:44:25 AM
There are also other reasons why you should not use this system directly for long actions (say, complexity 1000 where a normal action has complexity 100). You should be able to interrupt the action if something unexpected happens. The effects of wearing armor should not be immediate. Note that using a different time system does not solve these problems. You have to explicitly make long actions interruptible and have effect after completion only (or partial effect when in progress).

Replacing such action by 10 normal actions of complexity 100 (and interrupt checking after each of them) should make the inaccuracy very small again.