And right after I updated to 0.7.6 the next release came out
At SDK level 0.7.7 hand tracking seems rock solid now, which was the biggest issue in the past. New utility methods in this release also offers finding the left-most and right-most hand, which might replace us detecting that manually partially or fully. New stuff also includes being able to set the min sensitivity for gestures to trigger (say configuring circle gestures to run at least one whole circle before being sent out)
I got an
initial use case for the
Jitter lib worked out and I'm fairly happy with it, especially considering how badly I suck at Java
In short Jitter uses an internal Leap listener that runs at the "Leap FPS" somewhere in the 100-120 range. It then (for now) triggers method callbacks for specific gestures to an external JitterListener interface. That's kinda boring but might expand to where it alone provides some utility.
What makes it really interesting (IMHO) is the layer on top of that. I made a BufferedJitterSystem that implements JitterListener, but as the name indicates it buffers the input in local variables. In the meantime our main loop runs at "Game FPS" around 60 and for each iteration goes and fetches what's in the buffer (optionally being picky about characteristics). That way we don't miss anything like the current implementation does (it only retrieves one Leap frame per game frame so it misses around 50%)
It works to where the code on the Terasology side (after the Jitter stuff gets split out into its own jar) is minimal, like so:
Code:
for (CircleGesture circleGesture : jitterBuffer.nextCircleBatch(2))
That little "2" asks for only CircleGestures that have run the full two circles to be retrieved, anything less mature than that is ignored. After the second circle is completed a valid gesture is retrieved and processed. Now just need to do that for
everything ...
Trouble right now is that after working once (or when running in debug) something flips out and causes execution to go funny. An if statement that is clearly false somehow lets execution not only inside but straight into an inner if completely skipping a log statement in between ... might be a debug quirk due to the Leap still being active and having native code fun going on.
Too late tonight to polish, but even though I'm sure there are tons of architectural faux pas in the setup I'm strangely happy with how it is turning out