Sunday, January 27, 2013

Game On!

The end of the Retrochallenge event draws ever nigh.  Fortunately, it looks like I will not be empty handed when the competition closes!

Feature Complete

I have now implemented all of the basic features of Simon.  I can generate random tone sequences, play them for the user, monitor the user's control inputs, and evaluate those inputs against the generated sequence.  I have added a timeout when monitoring the inputs.  A slow or inactive user loses the game, as does one that fails to match the tone sequence.  Losing the game results in a restart, while matching a maximum length sequence (31 tones) earns the player a congratulatory tone and a "you win" screen.  FWIW, I also think that the game is fun to play -- just like the original Simon. :-)

New Location

I am using the same development environment that I used when developing Fahrfall.  That environment is very flexible and allows me to load code or data anywhere in the CoCo's memory, without regard for compatibility with the CoCo's built-in BASIC environment.  Also, I have been arbitrarily loading code into an address above 16K -- higher than what many CoCo machines have.

I relocated the binary to location $0e00.  This location is relatively low in a CoCo's memory, but it is high enough to avoid interfering with the CoCo's disk accesses.  This should allow the game binary to load on either tape-based or disk-based CoCo systems.  It definitely works for loading from tape (i.e. MP3 playback on my phone).  I expect that it will work when loading from disk (or DriveWire) as well, but I haven't verified that just yet.

Unfortunately, the combination of that address and the length of the game binary is too high for CoCo machines with only 4K RAM.  If that turns-out to be a limitation, then a "cassette only" version can easily be generated... ;-)

More Options

A few more options remain for development.  An obvious one is to implement a keyboard interface so that people without the rotary controller (including emulator users) can play too.  Support for the Dragon should be a no-op as-is, but the addition of keyboard support will require extra code to support both CoCo and Dragon keyboards.  Also the current "you win" screen is a lame reward for someone that completes a 31 tone sequence -- perhaps something better could be done?

Further options could be modifications to the game itself.  The original Simon had a couple of multi-player options available, as well as options for playback of the previous and longest completed sequences since starting the game.  The AVRSimon project included other game options, including versions with no sound or no lights and a version where the tone matching was done in reverse order.  Any or all of these might be possibilities for future development.

For now, I think that I will focus on mopping-up things for the Retrochallenge event.  This will likely include the release of a git tree and some sort of wrap-up post in the next few days.  For that, of course, you will have to stay tuned...

No comments:

Post a Comment