flii | Freesome - Pete Hobson

flii

External interface still too slow

I've been aware that using External Interface in flash 8 was rather slow, although I never had the need to test it myself. Unfortunately the general speed improvements in AS3/AVM2 . Don't seem to of helped external interface. I don't have any old speed stats to compare to, but in my recent tests AS3 external interface seems to begin to choke at around 3Kb/s . Once this limit gets hit, events start to queue up and fire at some (much) later time.

Fortunately Binary Socket rocks. With very little pain, i've manged to implement a Socket Server/Client solution, which quite happily flies along consuming 13Kb/s of Wiimote Data. This Has had no noticeable effect on frame-rate of the test movie, on my machine it belts along at a nice 55Fps.

The great thing here is I can cut the 13KB/s figure drastically by implementing smoothing of wii data at either the C or Haxe level of Flii. The current wiimote drivers only support one wiimote, but i'm imaging that with smoothing implemented like this, it would certainly be possible to support a full roster of four of them.

Syndicate content