1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[System, W.I.P.] Interspellar

Discussion in 'Graveyard' started by Krogoth, Aug 7, 2013.

  1. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Interspellar
    Produced by Christopher Nolan
    v0.01
    =)

    Example of usage:
    1. Indexer
    Code (vJASS):
    //-=-=-=-=-=-=-=-=-=-=-=-=-
    //-=-=-=-] Indexer [-=-=-=-
    //-=-=-=-= v1.100 -=-=-=-=-

    /*************************************************************************
    * Functions
    *     function CreateIndexer takes integer n returns integer
    *          - Creates an indexer meant for n instances and returns its id
    *     function IndexCount takes integer CODE returns integer
    *          - Returns count of indexes used by indexer
    *           (In very deed this returns the largest index used currently)
    *     function Indexed takes integer CODE, integer index returns boolean
    *          - Is this index of an indexer currently occupied
    *     function Index takes integer CODE returns integer
    *          - Occupies free index of an indexer and returns it
    *     function Deindex takes integer CODE, integer index returns boolean
    *          - Frees an index of an indexer
    *
    * Array data
    *     bool: ... [Indexer N created]        ------------>    [0 indexed]   [1 indexed]   ... [Indexer N+1 created]     ...
    *     int:  ... [Indexer N index count] [Freeindex address] [Freeindex 0] [Freeindex 1] ... [Indexer N+1 index count] ...
    *************************************************************************/


    library Indexer
        globals
            private integer count = 0
            private boolean array b
            private integer array i
        endglobals
       
        function CreateIndexer takes integer n returns integer
            local integer temp = count
            set b[count] = true
            set i[count] = 0
            set i[count + 1] = 1
            set count = count + n + 2
            return temp
        endfunction
       
        function IndexCount takes integer CODE returns integer
            return i[CODE]
        endfunction

        function Indexed takes integer CODE, integer index returns boolean
            return b[CODE + 1 + index]
        endfunction
       
        function Index takes integer CODE returns integer
            local integer j = CODE + 1
            local integer index
            if i[j] == 1 then
                set index = i[CODE]
                set i[CODE] = i[CODE] + 1
            else
                set index = i[i[j]]
                set i[j] = i[j] - 1
            endif
            set b[j + index] = true
            return index
        endfunction
       
        function Deindex takes integer CODE, integer index returns boolean
            local integer j = CODE + 1 + index
            if b[j] then
                set b[j] = false
                if i[CODE] == index + 1 then
                    set i[CODE] = index
                else
                    set CODE = CODE + 1
                    set i[CODE] = i[CODE] + 1
                    set i[i[CODE]] = index
                endif
                return true
            endif
            return false
        endfunction
    endlibrary


    2. Supermarker
    Code (vJASS):
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    //-=-=-=-] Supermarker [-=-=-=-
    //-=-=-=-=-= v0.900 -=-=-=-=-=-

    /*******************************************************
    * function InitSupermarker takes nothing returns nothing
    *     (Starts supermarker wonderwork)
    *******************************************************/


    library Supermarker requires Support
    //-=-=-=- Settings -=-=-=-
    globals
        private constant real RECYCLE_TIME = 20
    //-=-=-=-==-=-=-=-=-=-=-=-
        private trigger EnterTrigger = CreateTrigger()
        private trigger DeathTrigger = CreateTrigger()
        private integer IndexCount = 0
        private integer FreeindexCount = 0
        private integer array Freeindex
        private group Bathroom = CreateGroup()
    endglobals

        private function Mark takes nothing returns boolean
            set Support.workUnit = GetFilterUnit()
            if FreeindexCount == 0 then
                set IndexCount = IndexCount + 1
                call SetUnitUserData(Support.workUnit, IndexCount)
            else
                set FreeindexCount = FreeindexCount - 1
                call SetUnitUserData(Support.workUnit, Freeindex[FreeindexCount])
            endif
            return false
        endfunction

        private function Wash takes nothing returns boolean
            call GroupAddUnit(Bathroom, GetTriggerUnit())
            return false
        endfunction
       
        private function Grab takes nothing returns nothing
            loop
                set Support.workUnit = FirstOfGroup(Bathroom)
                exitwhen Support.workUnit == null
                set Support.workInteger = GetUnitUserData(Support.workUnit)
                if Support.workInteger > 0 then
                    call SetUnitUserData(Support.workUnit, -Support.workInteger)
                else
                    call GroupRemoveUnit(Bathroom, Support.workUnit)
                    set Support.workInteger = -Support.workInteger
                    if Support.workInteger == IndexCount then
                        set IndexCount = IndexCount - 1
                    endif
                    set Freeindex[FreeindexCount] = Support.workInteger
                    set FreeindexCount = FreeindexCount + 1
                endif
            endloop
        endfunction

        function InitSupermarker takes nothing returns nothing
            local region R = CreateRegion()
            set Support.workRect = GetWorldBounds()
            call RegionAddRect(R, Support.workRect)
            call GroupEnumUnitsInRect(Support.workGroup, Support.workRect, Condition(function Mark))
            call TriggerRegisterEnterRegion(EnterTrigger, R, Condition(function Mark))
            call RemoveRegion(R)
            set R = null
            //! runtextmacro TriggerRegisterAnyUnitEvent("DeathTrigger")
            call TriggerAddCondition(DeathTrigger, Condition(function Wash))
            call TimerStart(CreateTimer(), RECYCLE_TIME, true, function Grab)
        endfunction
    endlibrary


    3. Buffy (Buff field)
    Code (vJASS):
    //-=-=-=-==-=-=--=-=-=-=-
    //-=-=-=-] Buffy [-=-=-=-
    //-=-=-=- v0.900 =-=-=-=-

    /*******************************************************
    * function InitBuffy takes integer n returns nothing
    *    - Inits buff field for n buffs
    *     (Call it when game starts)
    * function UnitHasBuff takes unit u, integer CODE returns boolean
    *    - Returns true if unit has specified custom buff
    * function UnitAddBuff takes unit u, integer CODE returns nothing
    *    - Adds custom buff to unit
    * function UnitOverlapBuff takes unit u, integer CODE returns boolean
    *    - Adds custom buff to unit and returns true if overlap happened
    * function UnitRemoveBuff takes unit u, integer CODE returns nothing
    *    - Removes custom buff from unit
    *******************************************************/


    library Buffy
    globals
        private integer BUFFS
        private boolean array B
    endglobals
        function InitBuffy takes integer n returns nothing
            set BUFFS = n
        endfunction
       
        function UnitHasBuff takes unit u, integer CODE returns boolean
            return B[GetUnitUserData(u) * BUFFS + CODE]
        endfunction

        function UnitAddBuff takes unit u, integer CODE returns nothing
            set B[GetUnitUserData(u) * BUFFS + CODE] = true
        endfunction

        function UnitOverlapBuff takes unit u, integer CODE returns boolean
            if B[GetUnitUserData(u) * BUFFS + CODE] then
                return true
            else
                set B[GetUnitUserData(u) * BUFFS + CODE] = true
                return false
            endif
        endfunction

        function UnitRemoveBuff takes unit u, integer CODE returns nothing
            set B[GetUnitUserData(u) * BUFFS + CODE] = false
        endfunction
    endlibrary


    4. Quantum Timer
    Code (vJASS):
    //-=-=-=-=-=-=--=-=-=-=-=-=-=-=-
    //-=-=-=-] QuantumTimer [-=-=-=-
    //-=-=-=-=-=- v0.920 -=-=-=-=-=-

    /*******************************************************
    * Fields
    *     readonly integer ExpiredTimer.data
    *        - Returns data stored for the timer expired
    * Functions
    *     function SetWorldTimeSensitivity takes integer conglomerate returns integer
    *        - Sets time sensitivity to quantum conglomerate (positive) / subquantum conglomerate (negative)
    *     function GetWorldTimeSensitivity takes nothing returns integer
    *        - Returns quantum conglomerate (positive) / subquantum conglomerate (negative)
    *        ! Quantum conglomerate scales time rate by value / time by (1 / value)
    *        ! Subquantum conglomerate scales time rate by (-1 / value) / time by -value
    *     function StartTimer takes integer quantums, boolean periodic, boolexpr func, integer data returns integer
    *        - Starts timer with specified configuration
    *     function RemoveTimer takes integer timercode returns nothing
    *        - Removes specified timer
    *     function StopTimer takes integer timercode returns nothing
    *        - Stops specified timer
    *     function RestartTimer takes integer timercode returns nothing
    *        - Restarts specified timer
    *     function SetTimerData takes integer timercode, integer data returns nothing
    *        - Set data for specified timer
    *     function SetTimerTick takes integer timercode, integer quantums returns nothing
    *        - Set tick quantum time for specified timer
    *******************************************************/


    library QuantumTimer initializer Init requires Indexer
    //-=-=-=- Settings -=-=-=-
    globals
        constant real TIME_QUANTUM = .03
        private constant integer MAX_TIMERS = 30
        private constant integer QUANTUMS_AVAILABLE = 2147483647
        private constant boolean SAFE = false
    //-=-=-=-==-=-=-=-=-=-=-=-
        private integer Conglomerate
        private integer Count
        private boolean Pause
        private timer QuantumTimer
        private integer Indexer
        private integer array Quantums
        private boolean array Periodic
        private trigger array Trigger
        private integer array Data
        private integer array TriggerQuantum
        private integer WorkInteger
        private integer WorkInteger2
    endglobals

        //! textmacro onExpireBegin takes increment, sign
            set Count = Count + $increment$
            static if SAFE then
                if Count > QUANTUMS_AVAILABLE then
                    set Count = Count - QUANTUMS_AVAILABLE
                endif
            endif
            set WorkInteger = 0
            loop
                exitwhen WorkInteger == IndexCount(Indexer)
                if Trigger[WorkInteger] != null and TriggerQuantum[WorkInteger] $sign$ Count then
                    set data = Data[WorkInteger]
        //! endtextmacro

        //! textmacro onExpireEnd
                    if Periodic[WorkInteger] then
                        set TriggerQuantum[WorkInteger] = Count + Quantums[WorkInteger]
                        static if SAFE then
                            if TriggerQuantum[WorkInteger] > QUANTUMS_AVAILABLE then
                                set TriggerQuantum[WorkInteger] = TriggerQuantum[WorkInteger] - QUANTUMS_AVAILABLE
                            endif
                        endif
                    else
                        call Deindex(Indexer, WorkInteger)
                        call TriggerClearConditions(Trigger[WorkInteger])
                    endif
                endif
                set WorkInteger = WorkInteger + 1
            endloop
            if IndexCount(Indexer) == 0 then
                set Pause = true
                call PauseTimer(QuantumTimer)
            endif
        //! endtextmacro

        struct ExpiredTimer extends array
            readonly static integer data
            static method onQuantumConglomerateExpire takes nothing returns nothing
                //! runtextmacro onExpireBegin("Conglomerate", "<=")
                    if Quantums[WorkInteger] > Conglomerate then
                        call TriggerEvaluate(Trigger[WorkInteger])
                    else
                        set WorkInteger2 = Conglomerate / Quantums[WorkInteger]
                        if GetRandomInt(0, Quantums[WorkInteger] - 1) < Conglomerate - WorkInteger2 * Quantums[WorkInteger] then
                            set WorkInteger2 = WorkInteger2 + 1
                        endif
                        loop
                            call TriggerEvaluate(Trigger[WorkInteger])
                            exitwhen WorkInteger2 == 1
                            set WorkInteger2 = WorkInteger2 - 1
                        endloop
                    endif
                //! runtextmacro onExpireEnd()
            endmethod
            static method onSubquantumConglomerateExpire takes nothing returns nothing
                //! runtextmacro onExpireBegin("1", "==")
                    call TriggerEvaluate(Trigger[WorkInteger])
                //! runtextmacro onExpireEnd()
            endmethod
        endstruct
       
        //! textmacro Run
            if Pause and Conglomerate != 0 then
                set Pause = false
                if Conglomerate > 0 then
                    call TimerStart(QuantumTimer, TIME_QUANTUM, true, function ExpiredTimer.onQuantumConglomerateExpire)
                else
                    call TimerStart(QuantumTimer, -Conglomerate * TIME_QUANTUM, true, function ExpiredTimer.onSubquantumConglomerateExpire)
                endif
            endif
        //! endtextmacro
       
        function SetWorldTimeSensitivity takes integer conglomerate returns nothing
            if     conglomerate > 0 then
                call TimerStart(QuantumTimer, TIME_QUANTUM, true, function ExpiredTimer.onQuantumConglomerateExpire)
            elseif conglomerate < 0 then
                call TimerStart(QuantumTimer, -conglomerate * TIME_QUANTUM, true, function ExpiredTimer.onSubquantumConglomerateExpire)
            else
                if Pause == false then
                    set Pause = true
                    call PauseTimer(QuantumTimer)
                endif
            endif
            set Conglomerate = conglomerate
        endfunction

        function GetWorldTimeSensitivity takes nothing returns integer
            return Conglomerate
        endfunction

        //! textmacro Safe takes i
            static if SAFE then
                if $i$ > QUANTUMS_AVAILABLE then
                    set $i$ = $i$ - QUANTUMS_AVAILABLE
                endif
            endif
        //! endtextmacro

        function StartTimer takes integer quantums, boolean periodic, boolexpr func, integer data returns integer
            set WorkInteger = Index(Indexer)
            set Quantums[WorkInteger] = quantums
            set TriggerQuantum[WorkInteger] = Count + quantums
            //! runtextmacro Safe("TriggerQuantum[WorkInteger]")
            set Periodic[WorkInteger] = periodic
            set Data[WorkInteger] = data
            if Trigger[WorkInteger] == null then
                set Trigger[WorkInteger] = CreateTrigger()
            endif
            call TriggerAddCondition(Trigger[WorkInteger], func)
            //! runtextmacro Run()
            return WorkInteger
        endfunction

        function RemoveTimer takes integer timercode returns nothing
            call Deindex(Indexer, timercode)
            call TriggerClearConditions(Trigger[timercode])
        endfunction

        function StopTimer takes integer timercode returns nothing
            set TriggerQuantum[timercode] = -1
        endfunction

        function RestartTimer takes integer timercode returns nothing
            set TriggerQuantum[timercode] = Count + Quantums[timercode]
            //! runtextmacro Safe("TriggerQuantum[timercode]")
            //! runtextmacro Run()
        endfunction

        function SetTimerData takes integer timercode, integer data returns nothing
            set Data[timercode] = data
        endfunction
       
        function SetTimerTick takes integer timercode, integer quantums returns nothing
            set Quantums[timercode] = quantums
        endfunction
       
        private function Init takes nothing returns nothing
            set Conglomerate = 1
            set Count = 1
            set Pause = true
            set Indexer = CreateIndexer(MAX_TIMERS)
            set QuantumTimer = CreateTimer()
        endfunction
    endlibrary


    5. Cucumber (Custom buff) [Deep W.I.P., Low functionality]
    Code (vJASS):
    //-=-=-=-==-=-=-=-=-=-=-=-=-
    //-=-=-=-] Cucumber [-=-=-=-
    //-=-=-=-=- v0.500 -=-=-=-=-

    /*******************************************************
    * Timed effect interface
    *     readonly unit TimedEffect.target
    *     readonly unit TimedEffect.caster
    *     readonly unit TimedEffect.level
    *     readonly unit TimedEffect.tick
    * Functions
    *     function UnitApplyBuff takes unit target, unit caster, integer buffcode, integer level returns nothing
    *        - Applies custom buff to the target unit
    *******************************************************/


    library Cucumber requires Buffy, Indexer, QuantumTimer
    globals
        private integer Buffs = 0
        private integer array QuantumPower
        private integer array Ticks
        private integer array Indexer
        private real array TimedEffectTime
        private trigger array TimedEffectTrigger

        private unit array Target
        private unit array Caster
        private integer array Buffcode
        private integer array Level
        private integer array TimedEffectTick
        private integer array TimedEffectTimer

        private integer WorkInteger
    endglobals

        struct TimedEffect extends array
            readonly static unit target
            readonly static unit caster
            readonly static integer level
            readonly static integer tick
            static method onExpire takes nothing returns boolean
                set target = Target[ExpiredTimer.data]
                set caster = Caster[ExpiredTimer.data]
                set level = Level[ExpiredTimer.data]
                set TimedEffectTick[ExpiredTimer.data] = TimedEffectTick[ExpiredTimer.data] - 1
                if TimedEffectTick[ExpiredTimer.data] == 0 then
                    call Deindex(Indexer[Buffcode[ExpiredTimer.data]], ExpiredTimer.data)
                    set Target[ExpiredTimer.data] = null
                    set Caster[ExpiredTimer.data] = null
                    call RemoveTimer(TimedEffectTimer[ExpiredTimer.data])
                endif
                set tick = TimedEffectTick[ExpiredTimer.data]
                call TriggerEvaluate(TimedEffectTrigger[ExpiredTimer.data])
                return false
            endmethod
        endstruct
       
        function UnitApplyBuff takes unit target, unit caster, integer buffcode, integer level returns nothing
            local integer i = Index(Indexer[buffcode])
            set Target[i] = target
            set Caster[i] = caster
            set Level[i] = level
            set Buffcode[i] = buffcode
            if TimedEffectTrigger[buffcode] != null then
                set TimedEffectTick[i] = Ticks[buffcode]
                set TimedEffectTimer[i] = StartTimer(QuantumPower[buffcode], Ticks[buffcode] > 1, Condition(function TimedEffect.onExpire), i)
            endif
        endfunction

        module BeginBuffConfig
            endmethod
            readonly static integer thisbuff
        endmodule
        module EndBuffConfig
            static if thistype.onTimedEffect.exists then
                private static method fireTimedEffect takes nothing returns boolean
                    call thistype.onTimedEffect()
                    return false
                endmethod
            endif
            static method InitBuffConfig takes real DURATION, integer TICKS, integer INSTANCES returns nothing
                set QuantumPower[Buffs] = R2I(DURATION / TIME_QUANTUM)
                set Ticks[Buffs] = TICKS
                set Indexer[Buffs] = CreateIndexer(INSTANCES)
                static if thistype.onTimedEffect.exists then
                    set TimedEffectTrigger[Buffs] = CreateTrigger()
                    call TriggerAddCondition(TimedEffectTrigger[Buffs], Condition(function thistype.fireTimedEffect))
                endif
                set thistype.thisbuff = Buffs
                set Buffs = Buffs + 1
        endmodule
    endlibrary


    6. GameOn
    Code (vJASS):
    //-=-=-=-=-=-=-=-=-=-=-=-=
    //-=-=-=-] GameOn [=-=-=-=
    //-=-=-=-= v0.900 -=-=-=-=

    //-=-=-=- Configuration -=-=-=-
    //! runtextmacro Uses("Supermarker, Buffy")
    //! textmacro GameOn
        call InitSupermarker()
        call InitBuffy(32)
    //! endtextmacro
    //! textmacro MapInit
        call SetFloatGameState(GAME_STATE_TIME_OF_DAY, 6)
        call FogMaskEnable(false)
    //! endtextmacro
    //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    //! textmacro Uses takes u
    library GameOn initializer MapInit requires Support, $u$
    //! endtextmacro
        private function GameOn takes nothing returns nothing
            call DestroyTimer(GetExpiredTimer())
            //! runtextmacro GameOn()
        endfunction
        private function MapInit takes nothing returns nothing
            //! runtextmacro MapInit()
            call TimerStart(CreateTimer(), 0, false, function GameOn)
        endfunction
    endlibrary
     
    Last edited: Aug 8, 2013
  2. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    What the heck is this
     
  3. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Did you see example, and still not get what the heck is this?

    P.S. Don't wanna see such useless feedback anymore

    Edit:
    Though I will explain further
    This provides:
    1. Custom buff
    2. Timed effects
    3. Unit marker
    4. Timers easy to manipulate
    And from the system name you could easily guess that this is designed for spell making
     
  4. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    So you are saying that you are trying to submit 6 separate resources as a pack.

    That's against the rules, make 6 separate submissions.


    I can tell you right now though that Quantum Timer isn't going to get approved, lol

    Use an existing timer system, making your own is like asking for an insta rejection, unless you discover something truly revolutionary.
     
  5. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Ok :[
    I know, this Quantum Timer looks ... ridiculous ... but, what's exactly wrong with it you mean? This is not supposed to any lag until 10000 timers. :S
    I mean:
    - Bad interface
    - Low efficiency
    - Low functionality
    ?
     
  6. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Quantum Timers can't compete with existing timer systems, nor do I think it can even compete with native timers >.>. Lower performance = useless ;p.

    edit
    I know that ur really trying hard to make some cool stuff, but you should really learn the resources at THW so that you use all of the appropriate tools, then stuff can start to get approved =). A lot of stuff has been coded, and a lot of that stuff is very high quality made by people with years and years of programming experience =), evolved over 3 generations of wc3. A lot of the stuff can't even be improved anymore ;\.

    It's best to try using the tools that exist. It'll enable you to do more, improve the quality of your stuff, and reduce how much work you're doing =).

    I think that a Buff system is right up with what you want to do, so I really recommend that you focus on that. I also recommend object orientated API as objects really lend themselves to APIs like that. You use procedural for things like Ln(5), just regular functions, but you use OOP when you are manipulating an object, like instead of SetObjectProperty(object, value), you do set object.property = value, which is much more intuitive.

    The OOP stuff does not add any overhead to what you are doing, it just improves organization and makes it look nicer =).
     
  7. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Thanks!
    I will reorganize it later
    Btw, I updated QuantumTimer. This is still bad coded (I do not like it myself too, hard to do revolution with triggers), but has a function to scale time for all timer at once, so, if all buffs are custom, you can make some cool spell. =]
    (Code needs some tricks probably)
     
  8. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Quantum Timers is not ganna get approved unless you can beat out the performance of Timer Tools.

    edit
    and gl with that, considering that it's actually faster than native timers

     
  9. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,861
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Quantum Timer == insta-rejected resource
    Get it?

    Nes' post already explained what are the flaws of that system.
     
  10. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,029
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    More usage of SetUnitUserData, why are you not working with existing indexing systems?
     
  11. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    They are too much complex and I don't need ~50% of their functions
    I have a rest now, but I will update my resources asap along with the tutorial
     
  12. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    They aren't that complex. Take UnitIndexer for instance. Implementing it is done simply by CnPing the script into a newly created jass script file and creating an ability based on Defend in the object editor with some arbitrary raw code that should be configured in the script. Usage is simply
    GetUnitUserData
    or better yet, for the sake of hiding implementation details,
    GetUnitId
    (or was it GetUnitIndex? x-x)
     
  13. muzzel

    muzzel

    Joined:
    Jun 27, 2008
    Messages:
    1,303
    Resources:
    2
    JASS:
    1
    Wurst:
    1
    Resources:
    2
    Actually the question shouldt not be why QuantumTimer is going to get rejected but why you are trying to write your own timer system. What do you expect from it, or why cant you use one of the usual systems?
    If you want to write a timer system to get experience with jass coding i definitely agree its a good idea. But dont try to submit it as a resouce, just post it somewhere else in the trigger forum and nicely ask for comments.

    Dont take it the wrong way, just trying to explain why everyone is flaming you..
     
  14. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    I'm not flaming, I'm pointing out facts kindly ;_;
     
  15. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Just tested, this loses 2 fps against native timers @200 instances, and sucks as hell @7500. (No merging, 0.3125 - 1 timeouts)
    Dat multiple trigger evaluations suck

    Edit:
    I guess, I know how to beat native timers by 10 fps :O
    (28 -> 38 @7500)

    Edit:
    Not 10 though, but still ..
     
  16. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    To do your test most effectively

    Create 50 different methods, and then create 7500 timers across them with various timeouts. After that, compare it to natives under the same conditions and see how yours does.

    Also, it's not natives you have to beat, it's Timer Tools

    So, I guess first beat native timers with empty functions, then try to beat Timer Tools ;). However, I don't think that you'll be able to beat native timers with empty functions if you try to hurt your resource as much as possible, play against all of its strengths. You'll probably only beat them when you play with all of your resources strengths. 50 methods and various timeouts put Timer Tools at the worst case scenario, so the 63-64 fps that beat natives was the worst possible case that you could get with Timer Tools.
     
  17. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,662
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    There are better alternatives to most if not all of these systems.
     
    Last edited: Mar 15, 2014
  18. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,662
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Graveyarding. Author hasn't been active and the requirements have been GY'd as well.