Monday, January 21, 2013

Simple Simon

When last we met, I was just coming to peace with my rotary controller routines.  A perfect solution probably would require either more hardware, more CPU time dedicated to sampling, or both.  But, some experimentation with a clever software debounce algorithm and a pragmatic approach to handling illegal state transitions yielded empirical results that seemed acceptable for some sort of game.  But what?

Get The Feel

A rotary (a.k.a. "spinner") control is a little unusual.  It is constrained to a single degree of freedom, and the twisting mechanic is best suited to movement around a central point.  Not just any game will lend itself to this dynamic, and there isn't much point in using a rotary control for a game that would be better suited to a more common control scheme.

I had intended to make some sort of tube shooter game for the CoCo3.  I would still like to do that, but I don't think I can accomplish that during this month's Retrochallenge event.  Consequently, I need something simpler to implement!

Simple Simon

I started thinking about simple games and round shapes.  Before long, the answer became obvious -- Simon, an 80's classic.  The game logic and basic mechanics (e.g. playing sounds) should be simple enough to implement in the allotted time.  The rotary control might not seem like an obvious choice, but I think it will map well to Simon's four centrally arranged buttons.


Mock-Up

To get started, I knocked-up some code to draw four colored boxes on the screen.  I refactored my controller code to buffer the movement indications a bit, so that turning the spinner resulted in controllable selections.  I am using a white outline to indicate the currently selected color.  Pressing the button changes the outline to match the color of the selected box, making a larger colored box.  The larger colored boxes will also be used when the patterns are being played for memorization.

I think that covers the basic mechanics, other than playing the tones.  That should be relatively simple -- YMMV, of course!  I guess we'll find-out about that soon enough.  Until then, stay tuned... :-)

No comments:

Post a Comment