From BerryBots Wiki
Jump to: navigation, search
YouTube has a video of BerryBots replays in action: click here to watch

As of BerryBots v1.3.0, users can save replays of matches. Replays include game graphics, video player controls, output consoles, and full results. Replays are HTML files, drawn with HTML5 Canvas and Javascript using KineticJS.

All of the sample stages have replays on their wiki pages.

Saving replays

There are several ways to save replays in BerryBots.

  • GUI: The results dialog contains "View Replay" and "Save Replay" buttons.
  • Raspberry Pi: Pass -savereplay to
  • Game Runner API: After calling MatchRunner.nextResult(), a call to MatchRunner.saveReplay() will save the replay for that result.
  • Sample Game Runners: Check the "Save replays" checkbox.

Note that you can also run matches and save replays from the command line on Mac / Linux / Windows, as you can on the Raspberry Pi, if you compile yourself with the CLI build targets. For example, see the instructions for Linux.

Viewing replays

Since replays are HTML files, you can view them in a browser. The only thing to pay attention to is that you also need the Javascript files (e.g., kinetic-v4.7.2.min.js and bbreplay-v1.3.0.js) in the same directory. You can go to Browse > Replays in BerryBots to open the replays directory.

How replays are useful

Besides just being fun to record and watch, replays have some practical uses.

  • They make it easy to show off your ships and stages on the web.
  • For tournaments, you can run matches at full speed, save all the replays, and watch them afterwards or post them alongside the results.
  • For local testing, you can save replays of anomalous results to help diagnose what's wrong with your ships or stages.
Personal tools