Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: One simple way to avoid wait blocks
One simple way to avoid wait blocks
May 28 2011, 12:37 pm
By: Wormer  

May 28 2011, 12:37 pm Wormer Post #1



I've just thought of this very simple concept to failsafe yourself from getting into wait blocks. Whenever there is a trigger which uses a wait we do the following (uMutex is any unused unit):

Trigger
Players
  • Whatever
  • Conditions
  • Current player has suffered exactly 0 deaths of uMutex.
  • The rest of conditions...
  • Actions
  • Set deaths for current player: set to 1 of uMutex.
  • The rest of actions with waits...
  • Set deaths for current player: set to 0 of uMutex.




  • Some.

    May 28 2011, 6:02 pm Roy Post #2

    An artist's depiction of an Extended Unit Death

    It seems more appropriate to use a switch, because you're just flipping a bit. It's a nice concept, but impractical for complex maps. Sure, this would clearly show if you have wait blocks, but most people want to run triggers simultaneously, including those which would normally use waits. Therefore, death counters are still the most appropriate way of avoiding wait blocks.

    TL;DR: It doesn't stop wait blocks, it stops the whole trigger, which causes the same problem. Death counters ftw.




    May 28 2011, 6:35 pm Wormer Post #3



    Since waits are player-specific, a player-specific death counter looks more appropriate than a global switch. Yeah simultaneously, well... What I had in mind when I was posting this was the following. Waits are useful due to their specific to have a memory of their trigger. Sometimes I'm using waits just to skip a trigger cycle and then return to execution of the trigger. Of course everything may be done with death counters, but waits alike current player help to keep triggers number reasonable. Then, if I have some amount of such triggers there is a possibility they will run altogether, but due to the waits specific this will cause exponential growth of wait time. Since I only wanted to skip one cycle I found practical to use a mutex to manually separate their execution.

    Another thing I found waits extremely useful is displaying information to the player in complex maps. Let's say there is a number of events which may repeatedly happen during the game. When several events happen at a time it might be useful to delay incoming messages for the player (anyways he can't read them all at once). So I split the actual handling of the event and the player notification in different triggers. And then I got a wait in the "notification" triggers: wait(0) before notification and wait(time) afterwards. That way, waits subsystem automatically queues incoming messages and displays them one after another (maybe in the other order though).



    Some.

    May 28 2011, 6:51 pm The Starport Post #4



    Methinks an ASM mod just to allow parallel waits would almost be worth it.



    None.

    May 29 2011, 5:22 am Heinermann Post #5

    memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

    That's easy. You don't even have to manage any data, just use the padding space ("unknown/unused" in the chk specs) for each trigger performing the wait.




    May 29 2011, 5:49 am Wormer Post #6



    Plus with the ability to run triggers every frame and disjunction in conditions. Settled then! Who makes it? :P



    Some.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [04:56 am]
    Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
    [04:26 am]
    Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
    [04:25 am]
    Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
    [06:15 pm]
    Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
    [03:47 pm]
    NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
    [03:43 pm]
    NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
    [2026-6-19. : 9:57 am]
    Oh_Man -- makes me wonder if SEN knows anything about the topic
    [2026-6-19. : 9:57 am]
    Oh_Man -- artosis dropped pretty interesting vid: https://youtu.be/EqZHB8Blra4
    [2026-6-18. : 5:01 pm]
    Ultraviolet -- :wob:
    [2026-6-17. : 6:15 am]
    RexyRex -- :wob:
    Please log in to shout.


    Members Online: Moose