Trying to come up with a Control system for 4 players online that is the least lagy. This is still very early code, but what it does is it interacts with the timers to shut them off/on depending if the player is activly trying to move/aim in a direction.
This way if a player is not moving, but is shooting, only the shooting portion of the code will track Cam Angle of player, while shuting off the movement timer.
I realise my triggers are messed up per player base, just doing testing now
I'm not sure it's the timer running that causes the lag, isn't it that you are sending so many MOVE commands so often? So not having a timer wouldn't help, because you shouldn't be sending a move command if they aren't pressing WASD anyway?
I Figure if the timer is runing its still an extra thing that doesent need to be runing if its not being used reguardless.. it all adds up specially if you plan on any multi player support.
I guess watching debug mode and seeing timers and stuff going off a ton urks me.@KratsAU: Go
It's neither the one, nor the other one.
The delay is caused by the event. The KeyPress event can cause high delay, depending on how good the connection between the players and the host is. This is because Starcraft 2 doesn't have http://en.wikipedia.org/wiki/Client-side_prediction.
Basically there is not much we can do about it, as it's not our code that is creating delay.
Actually, one more thing:
All the code is executing on all players' computers, this way you don't need to send the results of calculations or functions from one client to all the others. So timers and everything associated with them are also executing all all players' computers. Thus timers basically don't impact network delay at all.
In this case I'd suggest three changes:
1) Set the time on the timer from 0.06 to something like 0.3 or 0.5.
2) Add a copy of the Issue Order action to the W_Start trigger.
3) Add a Issue Stop Order action to the W_End trigger.
That way you don't have the order spammage, but still instant movement/stopping from your unit.
Alright yea, ill give that a shot. I'm still noobish to this whole galaxy editor, its mostly for me figuring out what each function etc does and what it links to. I'm pretty much just toying with idea's at this point.@s3rius: Go
Hmm I wonder, are all keypresses sent over the network? So if Player 1 presses W, does this get sent to all other clients so they can check it via an event?
I did expect more from WASD from the blizzcon conferences, I thought they might have something special built in with client-side prediction, that would have been pretty awesome.
Will be interesting to see what patches they come up with.
That's because your not spamming attack every 0.03 seconds.
Attack is just an ability that a unit is given, and the associated keybind is A, so you should be able to change it, just like you can setup custom keybinds for any ability.
Yea it sucks.. kinda discourages me honestly.. every game people will make, will more than likely be the same old recycled stuff. Were goingg tp be stuck making the same style games, reguardless of how good the games could be they are all going to "feel" the same. To me a big part of a game is how it plays, and if I feel like im playing the game the same way everytime.. well, lets just say the galaxy editor is starting to feel real limited.
Sad thing is, Blizzard showed off alot of the FPS/TPS view style games at blizzcons and comic cons like it was going to be the next big posibility for the editor. While single player games are great, Starcraft and Battle.net are showcases of an online community.. lol, SO I doubt their intention was yea, you can make TPS/FPS styles games for offline.. and if they did showcase that.. well, thats just counter productive.@KratsAU: Go
Trying to come up with a Control system for 4 players online that is the least lagy. This is still very early code, but what it does is it interacts with the timers to shut them off/on depending if the player is activly trying to move/aim in a direction.
This way if a player is not moving, but is shooting, only the shooting portion of the code will track Cam Angle of player, while shuting off the movement timer.
I realise my triggers are messed up per player base, just doing testing now
I'm not sure it's the timer running that causes the lag, isn't it that you are sending so many MOVE commands so often? So not having a timer wouldn't help, because you shouldn't be sending a move command if they aren't pressing WASD anyway?
I Figure if the timer is runing its still an extra thing that doesent need to be runing if its not being used reguardless.. it all adds up specially if you plan on any multi player support.
I guess watching debug mode and seeing timers and stuff going off a ton urks me.@KratsAU: Go
It's neither the one, nor the other one.
The delay is caused by the event. The KeyPress event can cause high delay, depending on how good the connection between the players and the host is. This is because Starcraft 2 doesn't have http://en.wikipedia.org/wiki/Client-side_prediction.
Basically there is not much we can do about it, as it's not our code that is creating delay.
Actually, one more thing:
All the code is executing on all players' computers, this way you don't need to send the results of calculations or functions from one client to all the others. So timers and everything associated with them are also executing all all players' computers. Thus timers basically don't impact network delay at all.
Yea, I knew that... My goal is just to try and aleviate any player cpu issues and hopefully network issues if very minor.
Hopefully Blizzard does add client side prediciton..@s3rius: Go
@Sumsin: Go
In this case I'd suggest three changes:
1) Set the time on the timer from 0.06 to something like 0.3 or 0.5.
2) Add a copy of the Issue Order action to the W_Start trigger.
3) Add a Issue Stop Order action to the W_End trigger.
That way you don't have the order spammage, but still instant movement/stopping from your unit.
Alright yea, ill give that a shot. I'm still noobish to this whole galaxy editor, its mostly for me figuring out what each function etc does and what it links to. I'm pretty much just toying with idea's at this point.@s3rius: Go
Hmm I wonder, are all keypresses sent over the network? So if Player 1 presses W, does this get sent to all other clients so they can check it via an event?
I did expect more from WASD from the blizzcon conferences, I thought they might have something special built in with client-side prediction, that would have been pretty awesome.
Will be interesting to see what patches they come up with.
I wonder if you can access the games keybinds thats already set and change them to be something els...
Like A default is issue attack... could we just set a to just issue something els?
Reason why I ask, when im playing the normal game online there is 0 lag with the keys blizzard uses
That's because your not spamming attack every 0.03 seconds.
Attack is just an ability that a unit is given, and the associated keybind is A, so you should be able to change it, just like you can setup custom keybinds for any ability.
Yea it sucks.. kinda discourages me honestly.. every game people will make, will more than likely be the same old recycled stuff. Were goingg tp be stuck making the same style games, reguardless of how good the games could be they are all going to "feel" the same. To me a big part of a game is how it plays, and if I feel like im playing the game the same way everytime.. well, lets just say the galaxy editor is starting to feel real limited.
Sad thing is, Blizzard showed off alot of the FPS/TPS view style games at blizzcons and comic cons like it was going to be the next big posibility for the editor. While single player games are great, Starcraft and Battle.net are showcases of an online community.. lol, SO I doubt their intention was yea, you can make TPS/FPS styles games for offline.. and if they did showcase that.. well, thats just counter productive.@KratsAU: Go