ID:116293
 
Not Feasible
Applies to:Dream Seeker
Status: Not Feasible

Implementing this feature is not possible now or in the foreseeable future
It seems strange to me that the speed of winget() and winset() are dependent on world.tick_lag. When tick_lag is at it's normal value of 1, winget()/winset() are incredibly slow when you're calling them *many* times in a short amount of time. I have to set world.tick_lag to a very small value (like 0.01) to make the calls quick.

My request is that winget()/winset()/winexists() operate independent of the value of world.tick_lag if this is possible. I believe it would increase the responsiveness of games that involve heavy interface manipulation.
Based on how I think the BYOND server works, I don't think this would be possible (not easily possible, I mean). The smallest unit of time is the tick. A call to winget() makes a request to the client and this'll cause a delay. If the delay is non-zero, the smallest the delay can be is one tick. Even if it only takes 20 milliseconds to do this, the rest of the processing won't take place until 100 ms later (assuming 10 frames per second). In most games it won't do you a lot of harm to increase the framerate - if players can move one tile every other tick at 10 fps, drop tick_lag to 0.5 (20 fps) and let players move one tile every 4 ticks. It'll make winget more responsive and won't really affect the game.

Edit: Missed the opportunity to plug my own library! You can use my Interface library which caches interface control properties. When you try to read a property, if the value is cached it won't call winget(), it'll return right away. If you're using winget() calls to get things like the window's position this won't help you (because the property is likely to change client-side), but if you're using winget() to get properties that you've set with winset (or properties that wouldn't have changed since the last time you called winget) then this will help you.
winset() isn't limited, but winget() is because it functions exactly like input(). When you call winget(), the proc has to be suspended until a response is received. When the response comes in, the suspended proc is put back in the queue to be checked on the next tick.

It's highly desirable to limit your winget() calls, which you can do by making use of the * functionality as documented in the skin reference.