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.
ID:116293
Jul 23 2011, 7:31 pm
|
|||||||
Not Feasible
| |||||||
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. |
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.