Chaosforge Forum

  • October 07, 2024, 04:49
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: TimeLine  (Read 5645 times)

konijn

  • Elder
  • Private FC
  • *
  • *
  • Offline Offline
  • Posts: 17
    • View Profile
TimeLine
« on: March 14, 2007, 10:23 »

Hey,

every RL after a bit of tinkering has different speeds, effects that work after a while, and effects which only last a certain amount of time.

So a standard valkyrie object with 2 add methods :
timeline.add( actor , howmanytimeunitsfromnowwillitact? );
timeline.add( actor , whenwillthetimedeffectstartexpressedinunitsoftimefromnow? , whenwillthetimedeffectendexpressedintimeunitsfromthestartofthetimedeffect? )

The first method would add the actor to the timeline-slot, once the timeslot is reached it would call the 'doYourThing' method of the actor

The second method would also add the actor to the timeline-slot, also call 'doYourThing' but then once the actor should stop it would call 'stopYourThing'.

Ofcourse I leave the naming up to you ;)

then finally I would need a timeline.run or something to call from the main method ;)

He Who Sheds Light,
T.


Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: TimeLine
« Reply #1 on: March 14, 2007, 14:22 »

Valkyrie has it's own speed system, tough I don't know whether it's in the official distribution, by using a EventQueue. The funny thing here is that ALL my released roguelikes completely ignore this system and use a ADOMesque speed count system. The only roguelike that used the Event Queue was GenRogue, but it's currently on halt. I'll adress this problem in the near future. And yes, there will be many usefull inherent functions there, that will make handling time a breeze :>.
Logged
at your service,
Kornel Kisielewicz

konijn

  • Elder
  • Private FC
  • *
  • *
  • Offline Offline
  • Posts: 17
    • View Profile
Re: TimeLine
« Reply #2 on: March 15, 2007, 05:51 »

Valkyrie has it's own speed system, tough I don't know whether it's in the official distribution, by using a EventQueue.

Just FYI , it is not in the official distribution ;)

He Who Sheds Light,
T.
Logged
Pages: [1]