Question for the DragonSnot crew. Have you experimented with using flick() to handle the flow rather than rapidly updating the icon state? The dissadvantage is that you might have to fudge the timing, since you won't know exactly when the flick will finish from the user's point of view (and it may even be very slightly different to different people).
The advantage is that the flow would be driven on the client-side--avoiding a big stream of rapid icon state changes. I could be wrong, but I think this could noticably improve the responsiveness of the game.
I haven't thought about the specifics too carefully, so perhaps you have already discovered the flaw in this approach. Roughly speaking, I think you would start the flow flick(), set the icon_state to "full", and sleep until the flick should be finished. Unless I am overlooking something, that should produce the same effect with a lot less network data.
--Dan
|
I'm not on the DragonSnot crew, but I believe I know the answer to this one: Deadron needs to be able to control the flow timing because the game speeds up from level to level (and sometimes inside a level). The best way to do this I believe would be to have control over the delay property for icons-- Deadron in fact wanted to do it this way but alas I informed him that this was not accessible at the time, and suggested the current alternative. Here's that conversation.
Your suggestion, however, brings about a possibly simple feature request that would solve this problem without having to add new functions or types. What if flick() could take a delay argument (defaults to delay of icon) that could be used to control the timing of the movie? This would also be handy for flicking a pixmap for a finite time; it currently just pops in a black square I believe. If my math is correct it would reduce the network overhead by a factor of num_icon_states/2, which would probably improve things, especially at the super-speedy levels.
Or if adding new properties is acceptable (and I always foible over our stance on this!), than Deadron's original proposal of icon_delay would also do the trick I suppose. It, like icon_state, will probably move into the wayside of backwards-compatiblity routines if we ever have a specific 'icon' type, which will classify these properties more cleanly.
Of course in either of these cases Deadron will have to move around all of his icons just to test this, so he might get pissed at me! Anything for progress.