In addition to the software already described, the TwoPlayerGame Library also contains two other useful files.

The accessible input feature we described earlier that allows you to stimulate joystick and button presses using the serial monitor is available in TwoPlayerGame/AccessibleArcada.h. To invoke it we have included the following code in all of our sample games.

Download: file
//Set this to true for an alternate assistive technology input using serial monitor
//imput in addition to the joystick and buttons.
#define ACCESSIBLE_INPUT false

#if(ACCESSIBLE_INPUT)
  #include <AccessibleArcada.h>   //alternate input system for assistive technology
  AccessibleArcada Device;
#else
  Adafruit_Arcada Device;
#endif

Another useful module is TwoPlayerGame_wave.h which contains the setup and playback code for the sound effects in the Battleship game. This could be used in other games that require sound effects. The Adafruit_Arcada_Library has wave playback methods called:

Download: file
wavStatus WavPlayComplete(char *filename);
wavStatus WavPlayComplete(File f);

These methods make it easy to use an internal player to playback wave files however our experience was that the sound quality was not as good as using a custom player. It could be interference from the radio handling software or some problem with the built-in player not handling our particular variety of wave files properly. We didn't bother to track it down. We like the sound quality we get with our custom player so we left it in. It can be used to playback sound files in other games.

This guide was first published on Jul 07, 2020. It was last updated on Jul 07, 2020.

This page (Other Support Software) was last updated on Jul 20, 2020.

Text editor powered by tinymce.