Time in turn-based systems yet again
flag
Messages 1 - 10 of 32 - Collapse all
/groups/adfetch?adid=Rx29MxEAAADKlFy9oURW9jhF5-EEZ_kjnT3luubDeskUok6AUQ17nQ
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
1.  Da-Breegster  
View profile  
 More options Dec 17 2005, 10:57 am
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Sat, 17 Dec 2005 15:57:03 GMT
Local: Sat, Dec 17 2005 10:57 am
Subject: Time in turn-based systems yet again

Hey. I know this topic has been brought up too many times before, but I just
don't get it in the way I'm thinking I should. I've already figured out how I'm
going to handle something like poisoning. Getting poisoned schedules a callback
to occur in the next turn, which depletes HP and schedules itself for the next
turn infinitely. (Thus making it viral.) A callback is scheduled to broadcast
an Unpoisoned event in about 6 turns. But what if a potion of healing is quaffed
between them? It will broadcast an Unpoisoned event as well. I'll implement a
dispatcher and watcher system and whatnot, and it will cancel those events.
(Yes, this isn't really time in the usual sense, but it's cool and it explains
the callback/event system.)

Something like delayed fireball, which takes one turn to chargeup and one to
execute, shouldn't be much harder. A callback to execute the attack itself is
scheduled in one turn and the current turn is spent "charging up", which pretty
much does nothing. The 'Hit' event for the actor can be broadcast to the
execute_fireball callback and interrupt it if that's how I decide to handle
that attack.

It gets tough in the case of picking up multiple items. Somebody suggested it
take 96 + (4 * x) ticks (with 100 being a turn) to pick up items. But in my
current system, there are no ticks. I don't want an overwhelming amount of
realism, but the possibility for it. What does 1.04 turns actually mean
practically? My first thought was to have it go towards which actor can go
first in a turn, thus making it a sort of priority queue. But the .04 wouldn't
really go away or change for most normal 1.00 turns until you do another action
with a remainder. Either way, this sort of realism and complexity isn't really
desirable. I was going to implement hasting/slowness by setting the amount of
actions that can be performed in a turn to a higher amount than usual. But then
how does that tie in with priority? Should the player be able to move twice in
a turn? Or should it move once, another monster do something, then another
move? How does the player know that's not a normal turn?

What I could do is have every action performed schedule itself to actually
occur in such and such time units. But that only seems to work for stuff like
a delayed magic attack. I just don't get how I should handle picking up
multiple items. I know there are different ways and I know I've asked this
before, but I still don't get it. Sorry. Can anybody help?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  Da-Breegster  
View profile  
 More options Dec 18 2005, 5:31 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Sun, 18 Dec 2005 22:31:36 GMT
Local: Sun, Dec 18 2005 5:31 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-17, Da-Breegster <dabreegs...@gmail.com> wrote:
[snip original message]
I probably wasn't too clear earlier. My basic conflict was how to handle
partial turns, like getting 6 items taking 1.2 turns. I've figured it
out, I think. For actions costing more than 1 turn and less than 2, they
will be performed in that one turn instead of carrying over to the next.
This is done to preserve proper order for characters. But the fact that
they rushed to perform a certain action will temporarily decrease their
dodging stat or the general preparedness and defence. I think this
should work out OK. Still, though, any advice? It's a solution, but it
doesn't seem "clean."

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  Michal Brzozowski  
View profile  
 More options Dec 19 2005, 5:05 am
Newsgroups: rec.games.roguelike.development
From: "Michal Brzozowski" <ruso...@poczta.fm>
Date: 19 Dec 2005 02:05:57 -0800
Local: Mon, Dec 19 2005 5:05 am
Subject: Re: Time in turn-based systems yet again

Da-Breegster wrote:
> On 2005-12-17, Da-Breegster <dabreegs...@gmail.com> wrote:
> [snip original message]
> I probably wasn't too clear earlier. My basic conflict was how to handle
> partial turns, like getting 6 items taking 1.2 turns. I've figured it
> out, I think. For actions costing more than 1 turn and less than 2, they
> will be performed in that one turn instead of carrying over to the next.
> This is done to preserve proper order for characters. But the fact that
> they rushed to perform a certain action will temporarily decrease their
> dodging stat or the general preparedness and defence. I think this
> should work out OK. Still, though, any advice? It's a solution, but it
> doesn't seem "clean."

I don't see the problem.  In my game I've got a priority queue, which
returns the creature earliest in time.  Then every move has some
assigned duration, say 100 for walking, 50 for running, etc.
A faster creature may have a multiplier for this.  So after every
move the creature is pushed back into the queue, with updated
time.  There are no turns.  You can say a turn is 100, but if your
PC moves in 80 units, you will get 5 moves in 4 turns.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
4.  Da-Breegster  
View profile  
 More options Dec 19 2005, 6:37 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Mon, 19 Dec 2005 23:37:23 GMT
Local: Mon, Dec 19 2005 6:37 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-19, Michal Brzozowski <ruso...@poczta.fm> wrote:

The possibility of simply eliminating the traditional concept of turns
did cross my mind in fact. Or rather, keeping turns or a 100/1000-tick
system simply for purposes of recording action points. I'll consider
this again without the concept of turns hindering me.

A thought. Say the player just executed some action and they 0 action
points allocated. When should they be allowed to choose another move?
When their AP reaches some value like 1/100, depending on ratio? What if
they choose to do an action costing 1.5 turns and another character goes
between them? It'd look weird:

> Pick up the bread ration? y
> Pick up the great sword? n
> Pick up the really heavy troll corpse? y

- The goblin thumps you in the head.
You've picked up the items.

The problem isn't an enemy killing them during this delay, as events
sucha s On_hit can interrupt accordingly. It just seems weird. But
still, when should the player be asked for their next move? When the AP
reaches the standard value, i.e. the one that most turns take?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
5.  nj...@hotmail.com  
View profile  
 More options Dec 19 2005, 8:57 am
Newsgroups: rec.games.roguelike.development
From: nj...@hotmail.com
Date: 19 Dec 2005 05:57:34 -0800
Local: Mon, Dec 19 2005 8:57 am
Subject: Re: Time in turn-based systems yet again
You can take a look at XRogue 8.0 at http://roguelike.sourceforge.net
or Advance Rogue 7.7 (i think, but i don't have that version posted
yet) which handle this. I haven't quite followed it completely, and I
am not 100% sure I like it. In those versions of rogue there are 10
segments of each turn, every command generates an action which is
assigned delay (counted in segments) until completion (when the action
actually occurs). What I don't like about it is that you can send a
command to move into an empty space but by the time that command is
acted on a monster could move into that space and your action result
will be to strike the monster. The players speed is adjusted due to
effects (haste, slow, etc) and attacks can take up variable amounts of
time. Not too much is still based on the full turn, but a couple things
get triggered every 10 segments so I guess thats still the definition
of a turn.The player and each creature can have only one action
pending. So I guess they can't walk and chew gum at the same time. Not
saying it is the best or most clever solution (it is not even *my*
solution). But it is *A* solution. It of course requires something
anagolous to ticks which I guess you didn't want to have.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
6.  Da-Breegster  
View profile  
 More options Dec 19 2005, 6:40 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Mon, 19 Dec 2005 23:40:43 GMT
Local: Mon, Dec 19 2005 6:40 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-19, nj...@hotmail.com <nj...@hotmail.com> wrote:
> You can take a look at XRogue 8.0 at http://roguelike.sourceforge.net
> or Advance Rogue 7.7 (i think, but i don't have that version posted
> yet) which handle this. I haven't quite followed it completely, and I
> am not 100% sure I like it. In those versions of rogue there are 10
> segments of each turn, every command generates an action which is
> assigned delay (counted in segments) until completion (when the action
> actually occurs). What I don't like about it is that you can send a
> command to move into an empty space but by the time that command is
> acted on a monster could move into that space and your action result
> will be to strike the monster.

That'd be a problem, yeah. But for something like moving one adjacent
space, I think the player will already require 1 action point, or
whatever the required amount is, so it won't be a problem. As far as a
long-term travel thing, an event could interrupt it when an enemy
appears on the screen, like with crawl's nifty Travel patch.

> The players speed is adjusted due to effects (haste, slow, etc) and
> attacks can take up variable amounts of time. Not too much is still
> based on the full turn, but a couple things get triggered every 10
> segments so I guess thats still the definition of a turn.The player
> and each creature can have only one action pending. So I guess they
> can't walk and chew gum at the same time. Not saying it is the best
> or most clever solution (it is not even *my* solution). But it is
> *A* solution. It of course requires something anagolous to ticks
> which I guess you didn't want to have.

It sounds decent, but I think I won't use it. I probably will eventually
allow for walking and chewing gun simultaneously. Thanks for the idea
though.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
7.  Gamer_2k4  
View profile  
 More options Dec 19 2005, 10:48 am
Newsgroups: rec.games.roguelike.development
From: "Gamer_2k4" <gamer...@gmail.com>
Date: 19 Dec 2005 07:48:14 -0800
Local: Mon, Dec 19 2005 10:48 am
Subject: Re: Time in turn-based systems yet again
My method gives creatures a turn counter and a speed for each action.
The counter starts at 0.  When the counter reaches 1000, the creature
can act again and 1000 is subtracted from the total.  When the creature
acts, the speed for that action is stored temporarily.  This happens
for each creature on that game turn.  Then the next turn comes, and the
counter is checked.  If it is less than 1000, the speed value of the
last action is added to the counter but the monster does not act.

Example:
Bat has a speed of 120.
Player has a speed of 100.
Turn:     1     2     3     4     5     6     7     8     9     10
Bat:      120   240   360   480   600   720   840   960   80    200
Player:   100   200   300   400   500   600   700   800   900   0

So we see that the bat moves again at turn 9, but the player can only
act at move 10 (because his speed is lower).  Also, partial moves (for
example ones that take up 1.2 turns) are accounted for with the
carryover (1020 -> 20, not 0).  You can give different values for
different actions too.  This makes it fairly simple to have heavy
weapons take longer to attack with, and to allow for pack weight.
(Speed = Speed - (pack / Str)).  If your speed was 100, your pack had
50 pounds in it, and your strength was 10, your speed would be reduced
by 5 (100 - (50 / 10)).  You could say that your attack speed is (Speed
- weapon weight).  This way you could attack very quickly with light
weapons (knives) or slowly with heavy weapons (hammer).  Obviously
heavy weapons would do more damage.  Attacking with hammer (weight 20)
would take 13 game turns, instead of the normal 10 for moving.  I hope
this system helps.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
8.  NIm  
View profile  
 More options Dec 19 2005, 11:36 am
Newsgroups: rec.games.roguelike.development
From: "NIm" <bladedpeng...@gmail.com>
Date: 19 Dec 2005 08:36:55 -0800
Local: Mon, Dec 19 2005 11:36 am
Subject: Re: Time in turn-based systems yet again

It seems like everyone is relying on  ticks for thier game turns, or
discarding the excess. Is there any way of taking up 1.2 turns without
that? I personally prefer ticks, but if you don't want to go there you
could keep a tally of how much time you gave left over, and when it's a
whole turn, you get an extra turn. That's kind of like ticks though.
other than that I like the OP's current solution, which makes the pc
'hurry' to finish a move, and suffer a stat drain. I like this solution
because stats are basically there to make up for what you can't
simulate. you can't simulate. You can't simulate the partial turn
without a tick system, so use a stat equivalent of not having a full
turn.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
9.  Gamer_2k4  
View profile  
 More options Dec 19 2005, 1:44 pm
Newsgroups: rec.games.roguelike.development
From: "Gamer_2k4" <gamer...@gmail.com>
Date: 19 Dec 2005 10:44:37 -0800
Local: Mon, Dec 19 2005 1:44 pm
Subject: Re: Time in turn-based systems yet again

Nlm wrote:
> You can't simulate the partial turn
> without a tick system, so use a stat equivalent of not having a full
> turn.

OTOH, it's not exactly fair to the player to penalize him for certain
actions.  There could be a game option, though: Rush Actions.  If it
was on, then all actions would take the same amount of time, but the
player would suffer stat penalties for slow actions (maybe bonuses for
quick ones?).  If it was off, then the player would take longer to
finish actions, but would suffer no penalizations.  This might be the
best way to implement this.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
10.  Da-Breegster  
View profile  
 More options Dec 19 2005, 7:01 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Tue, 20 Dec 2005 00:01:41 GMT
Local: Mon, Dec 19 2005 7:01 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-19, Gamer_2k4 <gamer...@gmail.com> wrote:
> Nlm wrote:
>> You can't simulate the partial turn
>> without a tick system, so use a stat equivalent of not having a full
>> turn.

> OTOH, it's not exactly fair to the player to penalize him for certain
> actions.  There could be a game option, though: Rush Actions.  If it
> was on, then all actions would take the same amount of time, but the
> player would suffer stat penalties for slow actions (maybe bonuses for
> quick ones?).  If it was off, then the player would take longer to
> finish actions, but would suffer no penalizations.  This might be the
> best way to implement this.

Since I'm designing an engine (see my reply to the post above this
subtree), this might be the way to go. You can choose (in the game or by
the player) to lose a turn and get a preparedness bonus on the carryover
or keep a turn but lose preparedness. As long as preparedness was an
essential factor in everything favoring the player (or actually,
whichever actor is going), this will work out. All actions would never
take the same amount of time in either system. Actions taking 2 turns
take 2 turns in both systems. I was just talking about fractional parts.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google