Author Topic: Noob Timing - George read this! :-)  (Read 10515 times)

guest509

  • Guest
Noob Timing - George read this! :-)
« on: March 29, 2013, 04:01:47 AM »
  Having checked out George's article on timing I was hoping to get some feedback on the timing idea I have.

  It works off of a 12 count, as 12 is highly divisible. Every time the player passes the turn the program will cycle 12 times.
 
  Whenever a creature's count exceeds or equals 12 then the creature moves and count resets (or subtract 12).

  Each cycle the creature's count will increase by its speed score.

  So...
Speed 1 moves 1 time, and moves in the last cycle.
Speed 2 moves 2 times, and always gets it's first move BEFORE the speed 1 guy. Every 6 cycles.
Speed 3 moves 3 times (every 4 cycles)
Speed 4 moves 4 times (every 3 cycles)
Speed 5 is messy mathematically, the guy moves on cycle 3, 5, 8, 10, 12. 5 times.
Speed 6 moves 6 times (every 2 cycles)
Speed 12 will move every cycle, and be reserved for arrows and such things.
Speed 0 objects don't move at all.

This has the advantage of the faster guy moving first and more often than the slower ones. It's meant for a game where the player controls multiple allies all fighting and moving according to whatever commands were given. So more turnbased RTS than roguelike.

I like all of my stats to be between 1-6, as I've rolled so many dice in my life that the numbers make a ton of sense for me.

I could probably cycle the program 6 times with a base count of 6 as well...hmm...projectiles would just be special cases that moved their entire distance between turns...

EDIT: TO be clear, I want to give orders to multiple allies and have them all go about their business at a rate dependent on their speed. When I hit "GO" all hell breaks loose for 6 (or 12) cycles.

EDIT2: You can do cool things with this, like set the 'wait' time on abilities very easily. The speed stat can be for movement, the agility stat can control non-movement actions and abilities. If an ability is used early enough in a turn and the agility is high enough the ability can be used multiple times. Like a rogue that starts adjacent to an enemy, has an agility of 3 so is able to hit multiple times.

requerent

  • Rogueliker
  • ***
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #1 on: March 29, 2013, 06:07:28 AM »
You might be better of describing it as a fatigue-type system that revolves around the number 12. That is, everyone has 12 Action points and their particular abilities/stats determine how much each action costs. Thats

If you can then make it meaningful to not use all 12 APs, perhaps as a choice or because a particular configuration of actions doesn't allow total utilization, then you can facilitate an interesting meta-game. Maybe- the entity that used the least amount of APs gains initiative the next turn- or unused AP serve as a damage shield. Attacks that deal/drain AP add an interesting level of depth.

Regardless, what your describing seems more like an x-com-style system.

If you don't want funky rounding issues (like those provided by speed 5), you could try using powers-of, that way you can still describes stats as 1-6, but they represent the power of some base. Using bitwise operators (or operators specific to whatever base you want to use), you can ensure that there is never any arbitrary actions- they will all fit perfectly and evenly into the scope of a single turn.

guest509

  • Guest
Re: Noob Timing - George read this! :-)
« Reply #2 on: March 29, 2013, 07:10:11 AM »
Good call on the powers thing. I'll probably not ever do that though. After all these years you start to figure out what makes sense to you and what doesn't. 6 or 12 speed is sufficient for what I'm trying to do. I now that sounds willfully ignorant and unwilling to learn.

You're right about it being an x-com style system. I want to give orders, have my objects go about their business, give some more orders, do it again. I want the character to move and do actions, hit space bar, then all the allies and baddies do their thing. Stop. Repeat.

Ex

  • IRC Communications Delegate
  • Rogueliker
  • ***
  • Posts: 313
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #3 on: March 29, 2013, 07:55:25 AM »
For timing, you only really need to know how many actions per turn each monster has. Actually, you need to know two things:

X many actions (Monster Actions Per Turn)
(once every)
Y many turns (Monster Turns Until Action)

This is relative to the player, so you need some way to determine these things in a relative way based on the player's speed. Usually, you have a player speed variable, something like this:

Monster Actions Per Turn = Monster Turns Until Action = 1
if Monster Speed > Player Speed
Monster Actions Per Turn = Monster Speed-Player Speed
if Monster Speed < Player Speed
Monster Turns Until Action = Player Speed-Monster Speed

You don't really need to know the order in which monsters commit actions within a single turn because from the player's perspective everything during a turn happens all at once, and it really won't be noticeable to have a more complicated system to determine who goes first. The only exception is that the player should go before any monsters, so that if the player drinks a potion of health he will be healed before any of the monsters hit him.
« Last Edit: March 29, 2013, 07:57:38 AM by Elig »

requerent

  • Rogueliker
  • ***
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #4 on: March 29, 2013, 02:59:48 PM »
You don't really need to know the order in which monsters commit actions within a single turn because from the player's perspective everything during a turn happens all at once, and it really won't be noticeable to have a more complicated system to determine who goes first.

I don't know about that.

Code: [Select]
g@D
#.#
#.#
#.#

Ex

  • IRC Communications Delegate
  • Rogueliker
  • ***
  • Posts: 313
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #5 on: March 29, 2013, 03:11:53 PM »
I don't see the relevance of that situation.

requerent

  • Rogueliker
  • ***
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #6 on: March 29, 2013, 03:17:16 PM »
g = Goblin, D = Dragon, @ = you.


You move south. The enemy that occupies the tile directly north of you, after you move south, is of incredible importance.

george

  • Rogueliker
  • ***
  • Posts: 201
  • Karma: +1/-1
    • View Profile
    • Email
Re: Noob Timing - George read this! :-)
« Reply #7 on: March 29, 2013, 03:27:40 PM »
I feel obligated to reply, but since I'm no expert at roguelike timing (I can just read lots of rgrd archives ;) ), luckily I don't feel like I have to make insightful observations.

Though I would like to hear more about that powers-of, I don't quite follow how that works.

requerent

  • Rogueliker
  • ***
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #8 on: March 29, 2013, 10:48:02 PM »
I feel obligated to reply, but since I'm no expert at roguelike timing (I can just read lots of rgrd archives ;) ), luckily I don't feel like I have to make insightful observations.

Though I would like to hear more about that powers-of, I don't quite follow how that works.

I don't think powers-of is specifically used by anybody since I haven't actually read about it being used prior to mentioning it in a few threads. To me, it's intuitive and obvious and I assume most people already use something similar for that reason-- I come from a GUI background, so user-experience and comprehension, to me, is always the most important aspect of an application.

A problem with roguelikes is maintaining chronological consistency between entities in a comprehensible way. That is, the player's perception of the rate at which objects moves may not reflect the way the engine works. A speed of 100 and 99 are virtually the same in regards to ticks, but on that 100th tick the player's inference is shown to be arbitrarily wrong when one entity seems to get a free action.

For example, if you have an Orc with speed 10 and a Unicorn with speed 11- every 10 turns the unicorn will appear to perform an extra action. This inconsistency isn't easy to communicate in a meaningful way to a player in a turn-based game. In a real-time game, you can have all the arbitrary timing things you want- but in turn-based, you just can't get away with it unless you have some really slick graphics (that communicate subtle differences of speed via tweening).

A simple solution is to base your timing system on powers-of some base. So that a speed of 0 = b^0, speed of 1 = b^1, speed of 2 = b^2- etc. This ensures that all aspects of the timing system align in a coherent way. This can allow you to implement asynchronous timing schemes without losing coherence (that is, turn-order can change, but the meaningfulness of each action is measurable). If you perceive that an orc makes actions at half the speed that you do, you can infer that a special ability that moves at half your current speed won't incur any hidden or imperceptible/unexpected penalty- like a free hit- which could be the case in the speed 10/11 issue.

In this sense, you can use powers-of with a tick-based system and priority queue and ensure that all elements of the timing system function in an expected way. This can have far reaching implications if you choose to simulate simple physics- like being able to step out of the way of an arrow if you can move fast enough- and other aspects.

It's really just about applying a standards to a tick-based system so that the player isn't forced to think about timing elements that only obfuscate the fun of the actual game. I personally feel that the benefit of a powers-of system is much better, because the rules are consistent. If one object moves 3x faster and another moves 5x faster- we're already getting into largest common factors for referencing the sensation of a complete 'cycle' of actions. If everything shares a common divisor, these inconsistencies won't exist. IMO- Flexibility is less important than coherence.
« Last Edit: March 29, 2013, 10:50:30 PM by requerent »

Ex

  • IRC Communications Delegate
  • Rogueliker
  • ***
  • Posts: 313
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #9 on: March 30, 2013, 01:05:59 AM »
Who moves first into the tunnel behind you between a goblin and a dragon doesn't matter. First, the player won't bat an eye no matter who moves first. If you have a complicated system to determine that, the player isn't going to notice. Even if the goblin is directly behind you, the dragon is still only one tile away, and probably has magic and breath weapons and can still hit you. The goblin is going to be defeated very quickly leaving you with the dragon regardless of who goes in first. If you run, the only place you can run to is another room where both can hit you at the same time.

The player just isn't going to bat an eye at the goblin or the dragon going first. It's just not something that gets noticed or thought about. Even if it did, it isn't helpful in this or other situations. Creating a complicated system to determine these things is pointless, over engineering, and a waste of time and energy.
« Last Edit: March 30, 2013, 01:12:51 AM by Elig »

Ex

  • IRC Communications Delegate
  • Rogueliker
  • ***
  • Posts: 313
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #10 on: March 30, 2013, 01:06:49 AM »
(accidental double post)

requerent

  • Rogueliker
  • ***
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Noob Timing - George read this! :-)
« Reply #11 on: March 30, 2013, 01:15:54 AM »
Who moves first into the tunnel behind you between a goblin and a dragon doesn't matter. First, the player won't bat an eye no matter who moves first. If you have a complicated system to determine that, the player isn't going to notice. Even if the goblin is directly behind you, the dragon is still only one tile away, and probably has magic and breath weapons and can still hit you. The goblin is going to be defeated very quickly leaving you with the dragon regardless of who goes in first. If you run, the only place you can run to is another room where both can hit you at the same time.

The player just isn't going to bat an eye at the goblin or the dragon going first. It's just not something that gets noticed or thought about. Even if it did, it isn't helpful in this or other situations.

I guess it isn't obvious.

Original situation (A).
Code: [Select]
g@D
#.#

If goblin moves first (B).
Code: [Select]
.gD
#@#

If Dragon moves first (C).
Code: [Select]
gD.
#@#

The tactical decision to move to A in the first place depends on whether we can ensure the outcome of B over C. There is an implication that it is favorable to be as far from a dragon as possible- or to not allow the Dragon to have LOS to you. Either way- order matters.

guest509

  • Guest
Re: Noob Timing - George read this! :-)
« Reply #12 on: March 30, 2013, 04:54:14 AM »
  Ah, and if the Dragon goes first maybe it fireballs the goblin before it can move. I see.