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.

What is the point of

What is the point of that?

To calibrate sensor data you have to send sensor, sensor0, sensorG - makes 3bytes. An IEEE single-precision floating point value is 32bit (4bytes). So there is only a 1byte difference.

But you can take the calculation (sensor - sensor0) / (sensorG - sensor0) out of Flash.

Or do you mean by smoothing actual value smoothing and not calibration?

Value smoothing. My

Value smoothing.

My Reasoning is that there is a little too much wiimote data for flash to really make use of, and without smoothing you get a lot of those unintentional tiny jumps.

Regarding the calibration - i just send sensor0 and sensorG in an initial packet after wiimote detection - are you saying these values change and need to be resent? I thought they are per- wiimote-constants??

You are right on the values.

You are right on the values. But there is an actual difference between the frames Flash can render(say 255 as a standart maximum) and the ticks you can have.

I tried it out with a drum application and if you smooth the values you will loose too much data. And Flash can handle it well. I think currently we have 500 packets per second and no problems on the Flash side.