Author Topic: Scheduling Systems  (Read 15913 times)

Shaggy

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
  • (╯°□°)╯︵ ┻━┻ <( !@#$ THIS, I'M OUT. )
    • View Profile
    • Not Quite ADoM
    • Email
Scheduling Systems
« on: March 21, 2010, 07:59:52 AM »
How do you, from a programmers standpoint, implement scheduling systems other than simple turn based?

The only way I could think to do it would be timers that count steps, but that'd take up a lot of memory I'd think. Am I missing something?
 
Check out my blog at http://NotQuiteADoM.blogspot.com/ !

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Scheduling Systems
« Reply #1 on: March 21, 2010, 09:10:23 AM »
I think this thread might contain some answers... Or this thread.

Etinarg

  • Rogueliker
  • ***
  • Posts: 424
  • Karma: +1/-1
  • Idea archivist and game tinkerer.
    • View Profile
    • Gedankenweber Blog (German)
Re: Scheduling Systems
« Reply #2 on: March 21, 2010, 04:29:50 PM »
I used so called "priority queues" with timestamps as priority. So that the closes future event is first in the queue. Then you only need to pop an even from the queue and react to it, and all newly generated events go into the queue again.

It seems I wrote a bit about this in my library already:
http://www.funkelwerk.de/library/index.php?n=Library.ActionQueues

george

  • Rogueliker
  • ***
  • Posts: 201
  • Karma: +1/-1
    • View Profile
    • Email
Re: Scheduling Systems
« Reply #3 on: March 21, 2010, 05:18:48 PM »
How do you, from a programmers standpoint, implement scheduling systems other than simple turn based?

So you're talking about real-time RLs? Or 'more complicated' turn-based?

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Scheduling Systems
« Reply #4 on: March 24, 2010, 06:48:07 PM »
All major roguelikes have 'more complicated' turn-based systems, I think. If you have a system where each action takes the same amount of time (a turn), and simple haste (x2 speed) and slow (/2 speed) effects, a simple turn-based system is okay. Anything more complicated, and it is probably better to use some "scheduling" system.

Although more complicated systems are richer, a simple turn system might be actually a good idea, since difficult systems are more difficult to reason about tactically -- you just have to put richness somewhere else then ;)