Staredit Network > Forums > SC2 Assistance > Topic: WASD Control without lag?
WASD Control without lag?
Aug 2 2010, 9:52 pm
By: Devourer  

Aug 6 2010, 10:29 pm shmeeps Post #21



That's pretty much what i said. The key press functions must be horrifically coded to cause that much lag. Either that or my triggers are. I'd assume the former though. You would think with how versatile those kind of triggers could be, a little more effort would be put into making them function normally.



None.

Aug 11 2010, 11:43 pm payne Post #22

:payne:

http://www.sc2mapster.com/assets/wasd-lagless-movement/

I haven't read much of the thread, but here's a link people might want to check. ;o



None.

Aug 12 2010, 7:24 pm shmeeps Post #23



Quote from payne
http://www.sc2mapster.com/assets/wasd-lagless-movement/

I haven't read much of the thread, but here's a link people might want to check. ;o
Interesting, haven't had a chance to check out the map, but if that really is "lagless" it would see to imply that either the camera pitch/yaw functions (doubtable) or the trigonometric functions of sine/cosine/tangent (very plausible) are causing most of the lag. If that's the case I assume someone could write a more efficient custom script for these, or even something as simple as a table look up for values.

I highly doubt it is the camera/pitch/yaw functions though, most camera classes rely on these (or quaternions, or a similar imaginary vector) to prevent gimbal lock. A function to get these values should be nothing more or less than looking for the private field data within the camera class.



None.

Aug 14 2010, 3:30 am shmeeps Post #24



I've converted a C++ quicksine/quickcosine formula into my map with WASD controls. I was hoping, if it has been calculated right, and assuming SC2 uses the standard C++/C# math library, these should run anywhere from 8-15 times quicker, and the performance benefit should be noticeable.

Turns out, it is noticeable. Lag spikes seem to be down quite a bit, resulting in an about .5 second response time that is steady (IE: Doesn't seem to lag any more or less). I still need to test it with more people playing to see if multiple users create more lag.

I'm going to look into optimizing this more, see what I can come up with.



None.

Aug 14 2010, 12:39 pm Syphon Post #25



Quote from Centreri
Really? Hrrm. That's fairly retarded. When it's faster to take a roundabout path like making dummy abilities just to detect button presses..

Lols.

That's the cost, I guess.



None.

Sep 2 2010, 10:48 am payne Post #26

:payne:

Updates: http://forums.sc2mapster.com/resources/tutorials/10104-tutorial-lagless-wasd-system-using-data-editor/#p1
:O



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: Roy, Zincoshine, DarkenedFantasies