• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

What exactly causes Desynchs in game?

Status
Not open for further replies.
Level 9
Joined
Mar 10, 2005
Messages
326
I've updated my map recently and I've getting more server splits than normal when hosting on battle.net (not bot hosting). I have no idea what's exactly causing it. Also, is it just the map that causes desynchs or can it also be my internet? Every game I play with full house, it seems like I desynch and most other people are still in.

Here is my map for reference. I do realize that the triggers aren't the most efficent and I need to replace a lot of them with integer arrays =//

http://www.hiveworkshop.com/forums/maps-564/rise-civilizations-v-1-44b-90397/
 
Here are some immediate things I've noticed:

  • Player Slots P2
    • Events
      • Map initialization
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Player 2 (Blue) slot status) Equal to Is unused
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Kill (Picked unit))
      • Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
bj_destroy group only works for one unit group per loop, if I understand the function correctly. I personally use "set unit group" then call destroy group.

Some of your triggers are missing destroygroup functions.

  • WallRemover
    • Actions
      • Wait 0.50 seconds
      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • Unit - Remove (Triggering unit) from the game
      • Wait 1.00 seconds
      • Special Effect - Destroy (Last created special effect)
This special effect will not be destroyed properly if there is another special effect created during that 1 second wait period. Save the special effect as a variable or hashtable handle and reference it after the 1 second wait time to destroy it specifically.

One more important thing to tell you is that conflicting trigger-events are very bad and cause jumpy gameplay and frequent disconnects. You have multiple map initialization events, which is very bad in itself.

What I did with conflicting events is to put one HUGE event trigger that runs all the relevant triggers, checking conditions. Here's an example from my map:

  • Unit Dies
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Trigger - Run RESURRECTION STONE <gen> (checking conditions)
      • Trigger - Run Kill Effect <gen> (checking conditions)
      • Trigger - Run Lvl 6 Andlance Scare <gen> (checking conditions)
      • Trigger - Run Remove Monster Effects <gen> (checking conditions)
      • Trigger - Run Clear Spawn Groups <gen> (checking conditions)
      • Trigger - Run Lvl 4 to 5 Door <gen> (checking conditions)
      • Trigger - Run Lvl 4 AS <gen> (checking conditions)
      • Trigger - Run Lvl 5 Barriers <gen> (checking conditions)
      • Trigger - Run Lvl 5 Boss Death <gen> (checking conditions)
      • Trigger - Run End Cinematic <gen> (checking conditions)
      • Trigger - Run Lvl 3 Create Ticket <gen> (checking conditions)
      • Trigger - Run Lvl 2 AS <gen> (checking conditions)
      • Trigger - Run Lvl 2 MS <gen> (checking conditions)
      • Trigger - Run opcin utility 1 <gen> (checking conditions)
      • Trigger - Run Share Building Bounties <gen> (checking conditions)
      • Trigger - Run Lvl 1 Boss Death <gen> (checking conditions)
      • Trigger - Run Lvl 3 Boss Death <gen> (checking conditions)
      • Trigger - Run Random Drops <gen> (checking conditions)
 
Level 9
Joined
Mar 10, 2005
Messages
326
Bribe, a couple of simple questions:
If I remove the wait 1 seconds and make it directly "Create special effect" and then immediately "Destroy Last Created Special Effect", it would not leave any lingering special effects right? That trigger is nothing fancy and I only used it to give models without death animations one.


Also, 0.00 cooldown spells are not good right?

Thanks again!
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
No, that means when the special effect over it will be destroyed immeditely, leaving no leaks or causing any lag/desync.

So if you do
  • Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
  • Special Effect - Destroy (Last created special effect)
Will mean, that the effect is destroyed after it finish its animation. If you put a wait of 1.00 sec, that means even if the effect is over, tha trigger have to wait 1 second before it destroys the effect.

I don't see a problem in usage of 0.00 cooldown spells, as long as they are made to be fully MUI and lagless even with 10+ running instances.
 
Status
Not open for further replies.
Top