Monday, October 31, 2011

E1 Spinwheel Prototype #2

The newest spinwheel design is working surprisingly well.  All the fancy math with angles and tangents wasn't completely necessary; the wheel is working adequately with just radii for Inside, Outside and Lock.  I did need to tweak the state machine with some intermediate states to avoid getting stuck in certain transitions.  The key breakthrough was a diagram I call Quadrant-Chaos, with a lookup table representing Clockwise or Counter-clockwise rotation.  A few threshold checks make it function adequately for the prototype.

Occasionally the spinwheel will fail to lock, or skip a state.  This implies the angles and tangents approach might still be the final solution in the implemented Construction project.  However, the spinwheel is certainly at a solid prototype level of functionality, so the technical risk is mitigated.

It's really fun to play with the spinwheel, and see it updating images and text fields on the screen.  Also, I'm really quite pleased with Javascript as an untyped, interpreted RAD language.  It's quite excellent for prototyping.

No comments:

Post a Comment