Time in turn-based systems yet again
flag
Messages 11 - 20 of 32 - Collapse all
/groups/adfetch?adid=3NHj2REAAABudYPnKsSrx32Kyb-VfMHxnT3luubDeskUok6AUQ17nQ
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
 
11.  Da-Breegster  
View profile  
 More options Dec 19 2005, 6:58 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Mon, 19 Dec 2005 23:58:32 GMT
Local: Mon, Dec 19 2005 6:58 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-19, NIm <bladedpeng...@gmail.com> wrote:

You think it's a good idea? I like it myself now, because it's simple,
this preparedness factor can be very generic and can account for any
scenario (since I'm writing an engine that'll let me and others create
multiple games, more on this in a bit). Maybe preparedness could even be
thought of as luck, or a factor that acts similar to luck. The more you
rush, the less successful you are in what you do.

A question though. For actions costing 1.5 turns, .5 is the deduction
from the preparedness factor. (That's not the exact number, obviously.)
The same for 1.6, 1.73469 (though I may decide not to get THAT exact),
and 1.9. For something like 1.9, though, should I round up, call it 2
turns (thus forcing the player to lose a turn) and give them a bonus?

It seems like I can either have players lose a turn and get a
preparedness bonus or keep a turn but lose preparedness. It should
probably be a choice, shouldn't it? Keeping a turn sounds more
beneficial. Maybe if I made the preparedness factor equivalent in
fairness to the loss of a turn factor.... I dunno.

Oh yeah, clarification on my project. I'm planning to create several
roguelike games, starting with a stereotypical one to polish my engine,
then experiment more and more. My original idea back in July was to
create something like an Earthbound clone in ASCII art format. Seems
silly now, but I might incorporate more non-random factors into some of
my other games. Multi-parties, online games, and other such rarely-used
ideas might creep their way into my projects, thus the engine will
benefit.


    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.
12.  Da-Breegster  
View profile  
 More options Dec 19 2005, 6:49 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Mon, 19 Dec 2005 23:49:47 GMT
Local: Mon, Dec 19 2005 6:49 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-19, Gamer_2k4 <gamer...@gmail.com> wrote:

I think it's pretty similar to the idea starting to form in my head now.
The concept of turns exist only to give action points back to actors.
When actors reach a certain value for AP, they get to choose an action.
If it only costs the amount they've already got, it happens immediatly.
If not, they wait a bit until they've got enough points. The carryover
from a turn (where a certain amount of action points are recovered) is
simply kept.

Wait. What's the carryover used for? If you only gain back X amount each
turn and there are no concept of mini-turns (ticks?), then it only
factors in for speed.

I'm all confused again. Thanks 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.
13.  Gamer_2k4  
View profile  
 More options Dec 20 2005, 1:53 pm
Newsgroups: rec.games.roguelike.development
From: "Gamer_2k4" <gamer...@gmail.com>
Date: 20 Dec 2005 10:53:32 -0800
Local: Tues, Dec 20 2005 1:53 pm
Subject: Re: Time in turn-based systems yet again
The carryover lets the monster act sooner the next time.  If it has 400
speed, then it takes 4 turns to move a second time (0 -> 400 -> 800 ->
1200), but only 3 turns to act a third time (200 -> 600 -> 1000).

    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.
14.  Da-Breegster  
View profile  
 More options Dec 20 2005, 4:02 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Tue, 20 Dec 2005 21:02:44 GMT
Local: Tues, Dec 20 2005 4:02 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-20, Gamer_2k4 <gamer...@gmail.com> wrote:
> The carryover lets the monster act sooner the next time.  If it has 400
> speed, then it takes 4 turns to move a second time (0 -> 400 -> 800 ->
> 1200), but only 3 turns to act a third time (200 -> 600 -> 1000).

I get it now. I've figured out how what I guess an energy/tick system
works. Every 10 ticks, or 1 turn, an actor gains back a certain amount
of energy. As soon as they can make a move, they'll go for it. I
understand now, thanks.

    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.
15.  derickd...@hotmail.com  
View profile  
 More options Dec 20 2005, 3:11 pm
Newsgroups: rec.games.roguelike.development
From: derickd...@hotmail.com
Date: 20 Dec 2005 12:11:32 -0800
Local: Tues, Dec 20 2005 3:11 pm
Subject: Re: Time in turn-based systems yet again

Da-Breegster wrote:
> I think it's pretty similar to the idea starting to form in my head now.
> The concept of turns exist only to give action points back to actors.
> When actors reach a certain value for AP, they get to choose an action.
> If it only costs the amount they've already got, it happens immediatly.
> If not, they wait a bit until they've got enough points. The carryover
> from a turn (where a certain amount of action points are recovered) is
> simply kept.

This is similar to the system I use, as well. There's a global turn
(basically, one time through the main game loop) where each actor is
given a certain amount of energy, which is based on their abilities,
items, etc. There are also two different types of energy - movement and
attack. Each action an actor can perform is classified as either
move-equivalent (basic movement, opening/closing doors) or
attack-equivalent (attacking, casting a spell, using an ability).
Currently, each action requires 1000 of the appropriate energy (but
that will probably change). When an actor attempts to do something, the
appropriate energy pool is checked to see if there's enough energy to
perform the action. Once both of the actor's energy pools drop below
the threshold for an action (1000), their turn has ended, and the next
actor begins their turn. Obviously, the actor can end their turn before
this happens, as well. If an actor does not have enough energy to
perform an action, their turn is simply skipped.

Now, if an actor is given 1500 movement energy on a turn (with an
initial pool of 0), they will be able to perform one move-equivalent
action. Their movement energy will then drop to 500. The next time
their turn comes around, they will have 2000 movement energy, and the
option of taking two move-equivalent actions. So, this actor will be
able to move twice every other turn.

Having everyone on the same turn is nice for the duration of effects,
as you can simply reduce the duration left for all effects by 1 each
turn. I like the separation of movement speed and attack speed, rather
than simply having a 'speed' value, as this opens up options for
different abilities. It also allows for creatures that can attack
quickly (like an actor with 6 arms) but moves slowly, and ones that can
move quickly, but attack at a normal rate. Actors also have the option
(with some restrictions) of using their attack energy for basic
movement. This will let them perform a 'double' move, and simulates the
actor focusing simply on moving.


    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.
16.  Brendan Guild  
View profile  
 More options Dec 24 2005, 4:22 pm
Newsgroups: rec.games.roguelike.development
From: Brendan Guild <d...@spam.me>
Date: Sat, 24 Dec 2005 21:22:35 GMT
Local: Sat, Dec 24 2005 4:22 pm
Subject: Re: Time in turn-based systems yet again
derickd...@hotmail.com wrote in
news:1135109492.889759.154020@g49g2000cwa.googlegroups.com:

Just to be clear, does this mean that nothing happens when the player
attempts to perform an action without enough energy? Would this
happen every turn as the player gets low on energy for that turn?
Having your keys sometimes perform actions and sometimes do nothing
is likely to seem frustrating and counter-intuitive, I think.

What happens when the player ends a turn before using up the energy?
Does the energy carry on to the next turn, growing larger and larger
until the actor chooses to use it? Probably not, because that would
seem to mean that the player can charge up the PC into a super-mode
by skipping a few turns, then suddenly perform a large number of
actions all within one turn. Taken to the extreme, I imagine the PC
locking himself in a closet and then holding down the 'skip' key for
a million turns to build up energy, then completing the entire game
in the next 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.
17.  bjorn.bergstrom@roguelike development.org  
View profile  
 More options Dec 20 2005, 2:45 am
Newsgroups: rec.games.roguelike.development
Followup-To: rec.games.roguelike.development
From: "bjorn.bergst...@roguelikedevelopment.org" <bjorn.bergst...@jadestone.se>
Date: 19 Dec 2005 23:45:30 -0800
Local: Tues, Dec 20 2005 2:45 am
Subject: Re: Time in turn-based systems yet again
All of this turn/tick/mini-turns talk twist my head. It seems
confusing. I prefer to handle the "who gets to act next" question using
a priority queue and think of how long different actions take to
perform measured in milliseconds. Consider this:

#######
#@....#
#...B.#
#.....#
#.T...#
#.....#
#######

You have the Player ('@') with speed 10
You have a Bat ('B') with speed 14
You have a Troll ('T') with speed 6

The average speed in your game is 10

Moving one mapcell takes 1000 milliseconds (1 second) for a creature
with average speed (ie. 10)

Attacking takes 300 milliseconds (0.3 seconds) for a creature with
average speed (ie. 10)

Then take a normal PQ and insert the Player, Bat and Troll, each with a
priority (time when they get to act next) of 0.

The PQ looks like this:

0 Player
0 Bat
0 Troll

Pop the creature with the lowest priority from the PQ, the Player.

The Player moves east. The time it takes to move one cell for the
Player is ((1000 * 10) / 10) = 1000 ms. Push the Player onto the PQ
again, now with a priority of 0 + 1000. PQ:

0 Bat
0 Troll
1000 Player

Pop the next creature, the Bat. The Bat moves one cell west which takes
((1000 * 10) / 14) = ~714 ms. Push the Bat onto the PQ again with a
priority of 0 + 714. PQ:

0 Troll
714 Bat
1000 Player

Pop the next creature, the Troll. The Troll moves north. This takes
((1000 * 10) / 6) = ~1667 ms. Push the Troll back onto the PQ with a
priority of 0 + 1667. PQ:

714 Bat
1000 Player
1667 Troll

#######
#.@...#
#..B..#
#.T...#
#.....#
#.....#
#######

Pop the next creature, the Bat. The Bat attacks the Player which takes
((300* 10) / 14) = ~214 ms. Push the Bat onto the PQ again with a
priority of 714 + 214. PQ:

928 Bat
1000 Player
1667 Troll

Pop the next creature, the Bat again! Due to it's speed it gets an
extra attack on the player, (((300* 10) / 14) = ~214 ms. Push the Bat
onto the PQ again with a priority of 928 + 214. PQ:

1000 Player
1142 Bat
1667 Troll

Next creature to act is the Player. The Player crushes the bat using a
normal attack, ((300 * 10) / 10) = 300 ms. The Bat dies and is removed
from the PQ. The Player is pushed back onto the PQ with a priority of
1000 + 300. PQ:

1300 Player
1667 Troll

Hope this was easy to follow. I think this is a neat way of solving
when different creatures get to act depending on speed and their
actions. Anything that should be scheduled to act can be put into the
PQ, not only creatures, but also poison effects, timed effects on the
map etc.

/Björn
 (posted via Google Groups, *shrug*, any good NNTP servers that allows
posting and are free?)


    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.
18.  Gamer_2k4  
View profile  
 More options Dec 20 2005, 2:00 pm
Newsgroups: rec.games.roguelike.development
From: "Gamer_2k4" <gamer...@gmail.com>
Date: 20 Dec 2005 11:00:48 -0800
Local: Tues, Dec 20 2005 2:00 pm
Subject: Re: Time in turn-based systems yet again
That's a decent system, but if you want realistic healing and poison
effects (as well as other time based features) it is probably better to
use a turn system.  In your example the Troll would probably only heal
on its turn, which would cause problems.  Suppose the Troll had 10 HP
and two monsters hit him for 5 before he could act again? Conversely,
do you want a bat to heal more often merely because it is faster?  It's
better to heal constantly, even when it's not the monster's turn.  A
Troll has incredible regeneration no matter how fast it moves.  You
would need to write seperate healing code using your method.  With the
turn system, all you need to do is check if (TURN % (50 - Toughness))
== 0), and if it does, then heal.  It seems fairer to have the Troll
slowly heal while in combat (10 -> 5 -> 6 -> 7 -> 2)  This way the
Troll won't have a cheap death.

    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.
19.  Sam Skipsey  
View profile  
 More options Dec 20 2005, 3:38 pm
Newsgroups: rec.games.roguelike.development
From: Sam Skipsey <scs...@york.ac.uk>
Date: Tue, 20 Dec 2005 20:38:10 +0000
Local: Tues, Dec 20 2005 3:38 pm
Subject: Re: Time in turn-based systems yet again

In my queueing system, there are three separate event queues - one for
"metabolic" effects, one for "physical" effect and one for "intelligence"
effects.
So, a Troll has a fast metabolism, a normal response to physical stimuli,
and a very slow thought-process. We pop off the queues at the relevant
tick, which leads to a transparent ordering of people's turns (the
"intelligence" queing), separate from the ordinary physical and metabolic
effects in the game.

Sam


    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.
20.  Da-Breegster  
View profile  
 More options Dec 20 2005, 4:11 pm
Newsgroups: rec.games.roguelike.development
From: Da-Breegster <dabreegs...@gmail.com>
Date: Tue, 20 Dec 2005 21:11:43 GMT
Local: Tues, Dec 20 2005 4:11 pm
Subject: Re: Time in turn-based systems yet again
On 2005-12-20, Gamer_2k4 <gamer...@gmail.com> wrote:
> That's a decent system, but if you want realistic healing and poison
> effects (as well as other time based features) it is probably better to
> use a turn system.  In your example the Troll would probably only heal
> on its turn, which would cause problems.  Suppose the Troll had 10 HP
> and two monsters hit him for 5 before he could act again? Conversely,
> do you want a bat to heal more often merely because it is faster?  It's
> better to heal constantly, even when it's not the monster's turn.  A
> Troll has incredible regeneration no matter how fast it moves.  You
> would need to write seperate healing code using your method.  With the
> turn system, all you need to do is check if (TURN % (50 - Toughness))
>== 0), and if it does, then heal.  It seems fairer to have the Troll
> slowly heal while in combat (10 -> 5 -> 6 -> 7 -> 2)  This way the
> Troll won't have a cheap death.

I see the problem. I haven't been thinking about healing at all. How
would this tie into an energy system without separating things into IQ,
physical, and metabolic tasks?

    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