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.
[07:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
Please log in to shout.


Members Online: jun3hong, DiearAnother, Hinkel