So I've been toying around with physics and WASD engines, and I've been starting to make a freespace map. I use a simple WASD system that sets a boolean variable to true when pressed down, and changes it to false when pressed up. Every .02 seconds, a trigger checks for the variables and moves the player's spaceship accordingly, as well as adjusting height based on the camera pitch. I published the basic engine privately to Battle.net to show some of my friends what it was like. I honestly expected disaster. A couple of them had severely bad internet connections, and lagged on basic maps, even melee games at times.
I've tried this WASD engine before for RPG and shooter map engines, and it went as predicted- Ungodly lag, even with the periodic trigger set to check at .4s intervals, instead of .02s. The camera for the Freespace engine was set to a farclip of 20000, and on other maps, I have reduced it to around 100.
Low and behold my surprise when it ran perfectly smooth, with no lag whatsoever. I tried the engine again in an RPG map and it lagged just as normal. I've concluded from this that the lag generated in most WASD systems is actually not the WASD system, but rendering the terrain. I have all of the terrain cells hidden in my map, and that is what is stopping the lag from ocurring.
I don't know if this will help any of you or not, but I thought I should share this.
No lag but how's the delay? Better yet has anyone tested it in beta?
The latency was around WoW average for a good computer. 10-30 maybe, nothing significant. I actually don't mind putting the map up. It has some unfinished parts, but I don't feel like working on it anymore. Too much headache for me, and the amount that I want to do is overwhelming. I don't mind if one of you takes control over it, as long as credit is given.
I would be interested in seeing this map to see what you define as 'lagless.'
I published a map to test your theory and duplicated the WASD system described but noticed no difference between lag when toggling between showing and hiding terrain.
Rendering the terrain was indeed always the biggest problem for lag in third person systems, that has nothing to do with WASD. Even a complete flat and unused terrain creates ungodly lag when the view is set too far. As for the Battle.Net delay, I dont get why people make such a drama of it: Its barely noticable and you adjust to it in like 5 minutes and can play a shooter like you normaly would.
Actually, yes, you can, however I set it up a bit unorganzied, and haven't fixed it yet. The Z axis movement speed is identical to the X and Y speeds, but that will be fixed later. (assuming I continue work on this)
Did you hide the terrain in the editor view or did you maunally hide all terrain cells?
I have published it as Unlocked to Battle.net under the name "Dragon's Freeflight Engine" (No " "). You can view it in GE as well as play on B.net with up to 3 players total (including yourself). There are trigger errors with an unfinished collision system, but other than that, it's alright. Hold down the left mouse button for camera control (and freeflight mode).
-Excuse my bad "space" background. I haven't really gotten around to it yet.
Talk to bounty, You should compare your system to his, That would probably be your best bet on even further reducing lag. He made a near 100% lag free WASD, for Photon Discs.
No matter how you make your WASD system or whatever is showed on your map, here is how things goes within SC2: You press key -> event is sent to server (small delay here) -> server validates information and tells unit to walk to point in server-script -> data recieved by client from server of what should happen on the screen.
These steps takes some time as your data has to go a few thousand kilometers and the server has to process things. To my knowledge it is impossible to make anything that works in fashion with Counter-Strike or Diablo 3, where client and server updates at the same time, where the server just validates the information, and sees that they are possible, and if things does not look so, the client update to what the server tells it. That is LAG and why you are sometimes put almost back in time in Counter-strike or Diablo 3, but not in SC2.
Information is sent and received at intervals, these might go up and down depending on the amount of information (many advanced terrain objects, many units with patching or lots of triggers running) and the bottleneck of either client or server.
I doubt any WASD system will ever be lagless for SC2 as Blizzard would have to change how SC2 works
And my main point is that it still depends on the player with the worst client to host performance as well as the overall data being sent and received, etc. terrain, triggers and unit patching. Yeah, you could do a space-map with no terrain, but try adding 100 units with a periodic trigger doing "issue move order to" and see if it's still as lagfree as before?
If you have 8 players with great computers which are located relatively close to the battle-net host server, I find it hard to believe the terrain really does a difference, and if it does, it's a bug from Blizzard.
There is a max-server-loop which I believe to be around 16 times per second, your terrain-free map might have easier to reach that limit, but that doesn't mean other maps cannot do so with the right players.
Lol, you can even test a map locally in single-player, but with a crappy enough of a computer there might still be lag/delay using WASD systems.
Logically it should be more complicated than just the terrain, and rather all the things taking up performance, but if you do further testing and you're still right on, then we should post it as a bug since there might be a fix to it then :) As I said, it's not logical
I've noticed a very interesting map on the Arcade beta which seems to use WASD movement without lag, even though it's on BNet in the US and I live in Europe... The map is named "Mass Destruction 2", it's a PvP map where you control a tank. I don't how he (they?) did it but still, there is a very impressive amount of work on this map (UI, models, gameplay, physics, etc) and it seems to have accomplished the closest thing to a lagless WASD movement system I have ever seen. I'd like to hear from him (them), any advice/tutorial on how to achieve this would be of great help for a lot of us here...
So I've been toying around with physics and WASD engines, and I've been starting to make a freespace map. I use a simple WASD system that sets a boolean variable to true when pressed down, and changes it to false when pressed up. Every .02 seconds, a trigger checks for the variables and moves the player's spaceship accordingly, as well as adjusting height based on the camera pitch. I published the basic engine privately to Battle.net to show some of my friends what it was like. I honestly expected disaster. A couple of them had severely bad internet connections, and lagged on basic maps, even melee games at times.
I've tried this WASD engine before for RPG and shooter map engines, and it went as predicted- Ungodly lag, even with the periodic trigger set to check at .4s intervals, instead of .02s. The camera for the Freespace engine was set to a farclip of 20000, and on other maps, I have reduced it to around 100.
Low and behold my surprise when it ran perfectly smooth, with no lag whatsoever. I tried the engine again in an RPG map and it lagged just as normal. I've concluded from this that the lag generated in most WASD systems is actually not the WASD system, but rendering the terrain. I have all of the terrain cells hidden in my map, and that is what is stopping the lag from ocurring.
I don't know if this will help any of you or not, but I thought I should share this.
@Dragoneles: Go
Dude, that's awesome. SPACE WSAD WARS!!!!! Players control a reaper and fly around in space shooting each other.
No lag but how's the delay? Better yet has anyone tested it in beta?
The latency was around WoW average for a good computer. 10-30 maybe, nothing significant. I actually don't mind putting the map up. It has some unfinished parts, but I don't feel like working on it anymore. Too much headache for me, and the amount that I want to do is overwhelming. I don't mind if one of you takes control over it, as long as credit is given.
@Dragoneles: Go
I would be interested in seeing this map to see what you define as 'lagless.'
I published a map to test your theory and duplicated the WASD system described but noticed no difference between lag when toggling between showing and hiding terrain.
I would like to see this map.
Yes, but can you move up and down? That is the question.
Rendering the terrain was indeed always the biggest problem for lag in third person systems, that has nothing to do with WASD. Even a complete flat and unused terrain creates ungodly lag when the view is set too far. As for the Battle.Net delay, I dont get why people make such a drama of it: Its barely noticable and you adjust to it in like 5 minutes and can play a shooter like you normaly would.
@Doubleclick123: Go
Actually, yes, you can, however I set it up a bit unorganzied, and haven't fixed it yet. The Z axis movement speed is identical to the X and Y speeds, but that will be fixed later. (assuming I continue work on this)
@rpc190: Go
Did you hide the terrain in the editor view or did you maunally hide all terrain cells?
I have published it as Unlocked to Battle.net under the name "Dragon's Freeflight Engine" (No " "). You can view it in GE as well as play on B.net with up to 3 players total (including yourself). There are trigger errors with an unfinished collision system, but other than that, it's alright. Hold down the left mouse button for camera control (and freeflight mode).
-Excuse my bad "space" background. I haven't really gotten around to it yet.
Talk to bounty, You should compare your system to his, That would probably be your best bet on even further reducing lag. He made a near 100% lag free WASD, for Photon Discs.
@Taintedwisp: Go
I have played Photon Discs, very nice map. I'll see if I can get a hold of Bounty.
No matter how you make your WASD system or whatever is showed on your map, here is how things goes within SC2: You press key -> event is sent to server (small delay here) -> server validates information and tells unit to walk to point in server-script -> data recieved by client from server of what should happen on the screen.
These steps takes some time as your data has to go a few thousand kilometers and the server has to process things. To my knowledge it is impossible to make anything that works in fashion with Counter-Strike or Diablo 3, where client and server updates at the same time, where the server just validates the information, and sees that they are possible, and if things does not look so, the client update to what the server tells it. That is LAG and why you are sometimes put almost back in time in Counter-strike or Diablo 3, but not in SC2.
Information is sent and received at intervals, these might go up and down depending on the amount of information (many advanced terrain objects, many units with patching or lots of triggers running) and the bottleneck of either client or server.
I doubt any WASD system will ever be lagless for SC2 as Blizzard would have to change how SC2 works
@JakeCake26: Go
My main point in this thread is to depict that the majority of the lag is cut down severely without having to render terrain.
And my main point is that it still depends on the player with the worst client to host performance as well as the overall data being sent and received, etc. terrain, triggers and unit patching. Yeah, you could do a space-map with no terrain, but try adding 100 units with a periodic trigger doing "issue move order to" and see if it's still as lagfree as before?
If you have 8 players with great computers which are located relatively close to the battle-net host server, I find it hard to believe the terrain really does a difference, and if it does, it's a bug from Blizzard.
There is a max-server-loop which I believe to be around 16 times per second, your terrain-free map might have easier to reach that limit, but that doesn't mean other maps cannot do so with the right players.
Lol, you can even test a map locally in single-player, but with a crappy enough of a computer there might still be lag/delay using WASD systems.
Logically it should be more complicated than just the terrain, and rather all the things taking up performance, but if you do further testing and you're still right on, then we should post it as a bug since there might be a fix to it then :) As I said, it's not logical
I've noticed a very interesting map on the Arcade beta which seems to use WASD movement without lag, even though it's on BNet in the US and I live in Europe... The map is named "Mass Destruction 2", it's a PvP map where you control a tank. I don't how he (they?) did it but still, there is a very impressive amount of work on this map (UI, models, gameplay, physics, etc) and it seems to have accomplished the closest thing to a lagless WASD movement system I have ever seen. I'd like to hear from him (them), any advice/tutorial on how to achieve this would be of great help for a lot of us here...