System Timer Ticker

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
:eek:
when did you add this one?
didn't know you updated it to have period
anyway good to know and sorry about the out of line question
 

emjlr3

Change can be a good thing
Reaction score
395
what Doom suggested is exactly what i said above - and again - just above I answered Dooms question...wtf indeed
 

Jesus4Lyf

Good Idea™
Reaction score
397
Just happened to glance over at this thread to see how TT is going...

Why are people telling Cohadar to make Timer Ticker do exactly what Key Timers 2 does? There would be no point in having the two different systems...

And he's right. The modulo thing would be a pretty nasty interface to use. Specifying the period would be OK but have invisible restrictions to the user.

And that's pretty impressive about ABCT. :D
Well done.
 

Azlier

Old World Ghost
Reaction score
461
You don't think it's alright to have multiple systems accomplishing the same task? Look at all the timer attachment systems, the timed effect systems, the damage detection systems... *fans hand across the horizon*
 

Jesus4Lyf

Good Idea™
Reaction score
397
There should be a reason, for example, a significant advantage in the different implementation method. In this case, there would not be. The idea is to cut down on the number of redundant systems, isn't it?

This is really a redundant discussion anyway...
After thinking this thoroughly I concluded that small performance benefit in some special cases is not worth of bloathing the system interface.
TT stays the way it is.
Not to mention that that small performance benefit in special cases would cause a performance loss in every other situation.
 

Cohadar

master of fugue
Reaction score
209
Why are people telling Cohadar to make Timer Ticker do exactly what Key Timers 2 does?

I guess for the same reason you are not limiting the KT2 functionality to lower periods.

Some people always try to use hammer on a screw.
(or to screw down a nail...)
 

emjlr3

Change can be a good thing
Reaction score
395
I personally like TT, but for anything that isnt done on my .04 interval (unless I were to run a modulo at my end), I need new timers - I was trying to see if Cohadar could avoid that

a .05 interval would work well - .25, .05 and 1. are good intervals to use, (.05 really being uneeded though with something like .03 or .04) - more often then not if you want to use .66 - .65 will work just as well

call TTI_Start(struct, .5, function Blurg)

would run my guy every .5, in your .05 interval timer

call TTIStart(struct,.76, function Blurg)

shit I either botched my code or really want it to run every .76 - either way, TT figures this out, and rounds it down to .75 anyways, so it runs every .75

I like it

intervals from .1-1. would be ideal (at .05 intervals), anything about 1. isn't worth it
 

Jesus4Lyf

Good Idea™
Reaction score
397
I guess for the same reason you are not limiting the KT2 functionality to lower periods.

Some people always try to use hammer on a screw.
(or to screw down a nail...)
Well said. :)
I think with the lower periods thing I just see it a little differently... It's valid to say they should be restricted, and valid to say they shouldn't (as long as it's documented well). But let's not talk about that again here. XD

emjlr3, I'm very confused as to why you would want to remove TT's nice interface and make it less efficient instead of using KT2 if you really want multi-period, multi-instance, as it is designed to do exactly that from the ground up.

The plus of that suggestion with the modulo, btw, is that it would fire the first procurement at the wrong time. Just in case no one thought of that. It would be... like a real timer system! :p (LOL)
(Of course, the period may be incorrect, as mentioned. In fact, the likelihood of the period being wrong is based on the modifications made to the period in each individual map. Lol?)

Ahh... It's all starting to sound like nasty hack-jobs... XD
 

emjlr3

Change can be a good thing
Reaction score
395
maybe ill make my own (^^) for my own personal use :) - even if its not faster its ease of use I am concerned with - as Cohadar said, I've never seen a map suffer more from inefficiency then from shear suckyness
 

Jesus4Lyf

Good Idea™
Reaction score
397
Lol, I nearly suggested that as a joke, but was worried you may get the idea in your head and go do it. Turns out I didn't need to. :D

Hey, that's fine... But I still don't see why not use KT2, which will do exactly what you want it to do, but fast.

Or just use ABCT or something, if you don't care about speed anyway, if you must get the first period expiration firing correctly.

<_<

So many options... :confused:

I mean... TT even has ABCT in it now too...

But hey, if it's just for personal use, why not write your own. XD
 

Cohadar

master of fugue
Reaction score
209
But hey, if it's just for personal use, why not write your own. XD

Because there are more wc3 timer systems than wc3 good maps.

So my suggestion is: make a good map, and than if by some chance it suffers from non optimal timer system I will go to the Shiboku mountain to the great master Wu and ask him to train me for 10 more years after which time I will be able to make ultimate timer system that I will inserted into your map after which since I will have no more reason to live I will commit ritual suicide by meditating myself into the state of death.
 

Builder Bob

Live free or don't
Reaction score
249
I'm just using the simplest form of TT without all the extras you recently added, but with a slight modification.

In case you're interested.
JASS:
public function Start takes trigger whichTrigger, integer data returns nothing


JASS:
private function HF_Handler takes nothing returns nothing
    local integer i = HF_Counter
    loop
        exitwhen i&lt;=0
        set Data = HF_Dataz<i>
        if TriggerEvaluate(HF_Triggz<i>) then
            set HF_Triggz<i> = HF_Triggz[HF_Counter]
            set HF_Dataz<i> = HF_Dataz[HF_Counter]
            set HF_Counter = HF_Counter - 1
        endif
        set i = i - 1
    endloop
endfunction</i></i></i></i>


I've left out the obvious. It might not be as user friendly as you want, but it eliminates the need for swap and ClearConditions(). The user is required to create a trigger with no events, and add a condition to it. After that, the use is the same.
 

Cohadar

master of fugue
Reaction score
209
That is rather silly because the performance benefit is 0.5%
ClearConditions is almost as fast as I2H.

PS: you could hire Jesus4Lyf to do you a benchmark :D
 

Builder Bob

Live free or don't
Reaction score
249
That is rather silly because the performance benefit is 0.5%
ClearConditions is almost as fast as I2H.

PS: you could hire Jesus4Lyf to do you a benchmark :D

I don't really care about benchmarking it, but would do it myself if I did. It's less computation which isn't a bad idea when dealing with code being executed as often as this.

In any case, I just thought I'd mention it. Ultimately it's your system, and you do with it as you seem fit.
 

Cohadar

master of fugue
Reaction score
209
Most people don't realize that timer system overhead is almost non-existent when compared with stuff that they put in their timer spells.
 

Builder Bob

Live free or don't
Reaction score
249
Most people don't realize that timer system overhead is almost non-existent when compared with stuff that they put in their timer spells.

[del]Stupid people like me you mean?[/del]

Edit: Sorry, this was a lame comment by me.
 

Jesus4Lyf

Good Idea™
Reaction score
397
I fail to see how you optimized TT at all, there.

Honestly. Didn't you only speed up removing instances?

And only by a few nanoseconds?

:nuts:

>PS: you could hire Jesus4Lyf to do you a benchmark

Haha... Was wondering if I'd get a reputation for that. :D

(PS. Cohadar's suggestion - right on. XD)

Remember kids, TT can already fire over 30,000 times a second. I'm curious as to why people are suddenly making their own timer systems as well, or mutated versions. Like... I thought between TT and KT2 we had everything clearly covered.

By the way, if you really want to get rid of that swap, use linked lists like KT2. But I will call you a silly head.

YEW SILLY HEAD!
 

Builder Bob

Live free or don't
Reaction score
249
By the way, if you really want to get rid of that swap, use linked lists like KT2. But I will call you a silly head.

YEW SILLY HEAD!

I don't have a great desire to remove the swap. It's just a tiny bit of optimization where there is barely any code to begin with. Using linked list would add more overhead than TT has, so I don't see why you suggest that.

Cohadar is absolutely right that "overhead is almost non-existent when compared with stuff that they put in their timer spells.", so this optimization is clearly not noticeable with the usual usage of TT. You could even add stuff, or use linked lists if you so wanted, and it wouldn't be noticeable.

Even so, it's faster but less user friendly. TT puts ease of use over this unimportant optimization, which is very understandable. I was just putting it out there. Stop with the name calling.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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