System Timed

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
This will be much slower than the slowest timer system you can find.

In fact, it's crazy. Did I understand this right? Desynch data will cause a timer to be fired each period for just the offset? Why not just have a periodic timer going in the background the whole time? Removes the complexity of restarting the timer every period. O(n) complexity for simple timer procurements! o.o

And for the other stuff, this is exceptionally slow KT2? :|

And you seem to have a different definition of "ease of use" to some of us. KT2 exposes only 2 functions... <3

Oh, and for all intents and purposes, TU Blue OR Red would both slaughter this in speed. :(

Slower than mine 1?:p
 

Nestharus

o-o
Reaction score
84
Just to let you know, the new build of this is as fast as Timer32 for the main stream and as fast as KT2 for dif streams. Also, on a dinky laptop, as you saw in the tests, it can easily execute 1750 lines of code 64 times a second. It also happens to run less code than KT2 and the same amount of code as Timer32 in each of the cases. Oh well, you guys don't have to believe me I guess, but it's as simple as setting a variable to run multiple streams, so it all goes into trigger stacks in the background. The slow part is first running the trigger, but after that it's all in C++. The main stream doesn't run on a trigger stack and instead runs on a function stack using an internal struct (similar to Timer32).

The bit rate of the stream can be modified to anything. Increasing the bit rate will not merit a massive performance hit either as things are only called when they need to be called (only performance hit is if you actually put something on the 64 bit stream, making that thing run 64 times a second). At a minimum, the speed is the same as KT2. The functions to be put in can be in any style you want and don't have to return a boolean :\. The interface is almost the same (desyncing was removed).

My suggestion is to keep this graveyarded until I get the new version up. I'll be pming a moderator with the new build so that they can go oh cool ^_^.

Why would this be any better than KT2?
Different interface and easier to use in my opinion. It'll also run at the same speed as Timer32 if you use it in that style.
 

Azlier

Old World Ghost
Reaction score
461
This fancy system desyncs (or crashes. I don't really know which.) on Macs, all because you hate the KT2 interface.
 

Nestharus

o-o
Reaction score
84
There's nothing I can do about it mate because I have no access to a mac. I can't fix it : \.

Unless.... it could be this? o-o
JASS:
        local code c = function BigStream
        call TriggerAddCondition(bigStream, Condition(c))


and it is time to try it again I think ^_^
 

Azlier

Old World Ghost
Reaction score
461
Turning functions that don't return booleans into boolexprs is very bad for Macs.

Now, who approved this? :confused:
 

Jesus4Lyf

Good Idea™
Reaction score
397
Over engineered O(n) complexity attaching system.

Runs slower than T32.
Runs slower than TU Red.
Runs slower than KT2.

Runs slower than vTimer.
Runs slower than MicroTimers.
Runs slower than GetHandleId + Hash.
Runs slower than kingking's stuff probably.
Runs slower than...


Quit making timer systems, please. :(
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
JASS:
    globals
        //! runtextmacro BS_BIT_RATE()
        private constant integer BIT_SIZE = BIT_RATE*BIT_RATE
        private constant real BIT = 1./BIT_RATE
        //! runtextmacro BS_BIT_MAX()
        private real array bits
        private integer array bitIds
        private integer bitIdIndex = -1
        private boolean array streamExists
        private real array bitTable
        private integer array streamCodeCount
        private real gameSeconds = 0
        private real currentBit = 0
        private integer currentStream = 0
        private integer currentRunningCode = 0
        private trigger array streams
        private triggercondition array codeStreams
        private boolexpr array codes
        private integer codeStreamsIndex = 0
        private integer array codeStreamsQueu
        private integer codeStreamsQueuIndex = 0
        private integer array codeStreamId
        private real array codeStream
        private real array codeStreamProcess
        private boolean array streamHasRun
        private integer array smallStreamStack
        private integer array smallStreamStackR
        private integer array bigStreamStack
        private integer array bigStreamStackR
        private integer smallStreamStackIndex = 0
        private integer bigStreamStackIndex = 0
        private integer specialBigStreamStackIndex = 0
        private real array bitFired
        private integer array lastCode
        private integer array nextCode
        private integer array firstCode
        private integer array currentCode
        private integer array codeStack
        private integer array codeStackQueu
        private integer codeStackQueuIndex = 0
        private integer array codePointToStack
        private integer codeStackIndex = 0
        private integer array codeStackLoop
        private boolexpr setupCodeData
        private boolexpr specialSetupCodeData
        private boolexpr specialSetupCodeDataBig
        private integer array codeData
        private integer array toBeReleased
        private integer toBeReleasedIndex = 0
        private integer array codeAge
        private integer array codeLife
        private trigger cleanup = CreateTrigger()
        
        private trigger stream = CreateTrigger()
        private trigger bigStream = CreateTrigger()
        private event streamEvent = TriggerRegisterTimerEvent(stream, BIT, true)
        private boolexpr releaseCode
    endglobals


Lol? Mass of variables+textmacro... omg....
 

Nestharus

o-o
Reaction score
84
Ok, working on a third build that where 1 timer on this should be just about as fast as a regular timer... 2 timers on this should be almost as fast as 1 timer and faster than 2 timers... 10 timers should be faster than 2 timers and almost as fast as 1 timer.

I call it Lucy (no not really) but yea... I had a genius idea for the new build that has never been done. It will have 0 triggers and 1 timer for the ultimate in speed, it'll maintain its current API ^_^.
 

Jesus4Lyf

Good Idea™
Reaction score
397
I had a genius idea for the new build that has never been done. It will have 0 triggers and 1 timer for the ultimate in speed, it'll maintain its current API ^_^.
Working on a build atm ; o

i shall attempt to make it 2x faster for next build while maintaining features and interface :eek:.
Anyone else get deja vu?
 

Sevion

The DIY Ninja
Reaction score
413
Anyone get the sense of stereotype against Nes? I, for one, think a lot of his stuff is gold >_>
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top