Chaosforge Forum

Coding => FPC Valkyrie => Topic started by: konijn on March 14, 2007, 10:23

Title: TimeLine
Post by: konijn 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.


Title: Re: TimeLine
Post by: Kornel Kisielewicz 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 :>.
Title: Re: TimeLine
Post by: konijn 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.