[help] The game is so laggy

Shlomi1515

New Member
Reaction score
2
I used the W A S D keys to move HERO Control for each player (4 players total)

and it so slow untill it's order the unit to change his direction...

I have only 1 trigger that works every 1 sec.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
link your wasd system and i'll review it for any errors. there isn't a great way to make wasd movement work without lag but there are some better ways than others.
 

Shlomi1515

New Member
Reaction score
2
Code:
Move Left
    Events
        UI - Player Any Player presses A key Down with shift Exclude, control Exclude, alt Exclude
    Local Variables
    Conditions
        Game Paused == 0
    Actions
        Variable - Set Angle[(Triggering player)] = 4
        Unit - Order NewHero[(Triggering player)] to ( Move targeting (Point(0.0, (Y of (Position of NewHero[(Triggering player)]))))) (Replace Existing Orders)
        Bank - Store point (Point(0.0, (Y of (Position of NewHero[(Triggering player)])))) as "4" of section "Moves" in bank Bank[(Triggering player)]
        Dialog - Set W color to White for Player[(Triggering player)]
        Dialog - Set A color to Blue for Player[(Triggering player)]
        Dialog - Set D color to White for Player[(Triggering player)]
        Dialog - Set S color to White for Player[(Triggering player)]

Code:
Move Down
    Events
        UI - Player Any Player presses S key Down with shift Exclude, control Exclude, alt Exclude
    Local Variables
    Conditions
        Game Paused == 0
    Actions
        Variable - Set Angle[(Triggering player)] = 2
        Unit - Order NewHero[(Triggering player)] to ( Move targeting (Point((X of (Position of NewHero[(Triggering player)])), 0.0))) (Replace Existing Orders)
        Bank - Store point (Point((X of (Position of NewHero[(Triggering player)])), 0.0)) as "2" of section "Moves" in bank Bank[(Triggering player)]
        Dialog - Set W color to White for Player[(Triggering player)]
        Dialog - Set A color to White for Player[(Triggering player)]
        Dialog - Set D color to White for Player[(Triggering player)]
        Dialog - Set S color to Blue for Player[(Triggering player)]

Code:
Move Up
    Events
        UI - Player Any Player presses W key Down with shift Exclude, control Exclude, alt Exclude
    Local Variables
    Conditions
        Game Paused == 0
    Actions
        Variable - Set Angle[(Triggering player)] = 8
        Unit - Order NewHero[(Triggering player)] to ( Move targeting (Point((X of (Position of NewHero[(Triggering player)])), 32.0))) (Replace Existing Orders)
        Bank - Store point (Point((X of (Position of NewHero[(Triggering player)])), 32.0)) as "8" of section "Moves" in bank Bank[(Triggering player)]
        Dialog - Set W color to Blue for Player[(Triggering player)]
        Dialog - Set A color to White for Player[(Triggering player)]
        Dialog - Set D color to White for Player[(Triggering player)]
        Dialog - Set S color to White for Player[(Triggering player)]

Code:
Move Down
    Events
        UI - Player Any Player presses S key Down with shift Exclude, control Exclude, alt Exclude
    Local Variables
    Conditions
        Game Paused == 0
    Actions
        Variable - Set Angle[(Triggering player)] = 2
        Unit - Order NewHero[(Triggering player)] to ( Move targeting (Point((X of (Position of NewHero[(Triggering player)])), 0.0))) (Replace Existing Orders)
        Bank - Store point (Point((X of (Position of NewHero[(Triggering player)])), 0.0)) as "2" of section "Moves" in bank Bank[(Triggering player)]
        Dialog - Set W color to White for Player[(Triggering player)]
        Dialog - Set A color to White for Player[(Triggering player)]
        Dialog - Set D color to White for Player[(Triggering player)]
        Dialog - Set S color to Blue for Player[(Triggering player)]

the angle ingter and the bank that store the points it's for skill
the dialog item color is when he use the item he will change color...

and why there could not be a way to ake it work without laggs is blizzard dont know how to make it work without lags? wtf...
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Is there lag when you use your wasd system offline by yourself?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
The problem with doing something like refreshing the placement and camera every second or less over battle.net is that there is an obvious lag because you are sending the info over distance in order for battle.net to agree and in turn send that information to the other players in the game. From what I hear (but have not tested) WASD systems are just not working right for any maps (but have not personally tested).
 

Shlomi1515

New Member
Reaction score
2
it's not only WASD it every trigger that order my unit... the event can be anyting and still will be lag

such as player 1 type the chat....
or player 1 click on dialog item..

i checked it and it very lagy why is so hard to give order by trigger to a unit every few secs without having lags in sc2...

you think that my trigger that making the carmera follow the unit is slowing the game?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Honestly I don't know what you're doing with your angle and all that. I don't think it's doing anything crazy but just make sure you're not sending too many orders a second to the unit and that you are not letting more than one of your triggers try and order the same unit in the same second unless it's intended. I can find you and link you my wasd system if you want. in single player it works like a charm for me. I'm sure there would be lag if I used it online though. It is set up for multiplayer.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
If that's still an issue I'm here to bring doom to all of you:

Battle.net lags. You can't do anything about it.
Systems that work perfectly well offline may lag when trying them online.

The reason for that is that certain things (Key presses, Camera movement, button presses, etc) require the game to transfer data from one computer to the server and then to all the other computers. That requires some time.

So I can assure you that, if it doesn't lag offline, it's not your code that's faulty but only battle.net.

Over at sc2mapster we've had dozens of discussions, different systems with smaller or larger changes, etc pp. But in the end every system lags just as much as the previous one.

PS:
Some have said they had less/no lag using certain systems, but in the end it all turned out to be a fluke. The amount of lag depends on how many players there are, how good their connections are and how well the server is doing it's job.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top