Sunday, July 31, 2016

Ozobot capture the flag

I just bought my kids (and myself) an pair of ozobots. I wanted to figure out how to use Ozobot Blocky so I decided to write a simple capture the flag game. The game is very simple, each oxobot gets assigned a team color and the bot tries to find the other teams goal. As you can see from the video, the board is just a basic black box with two goals (e.g. red and blue). If the ozobot finds a black line, it turns. So you can have each player draw there own obstacles on there half of the board. The catch is that the bot won't start until it is placed on its own goal. This means the bot needs a way out and hence there must be a way in.

To play:

  • Install the program via OzoBot BLockly on both bots. 
  • Draw the board.
  • Run the program (double-press the button) -- light should turn white 
  • Place the ozobot on a red or blue square -- the light will match that color 
  • The ozobot will them try to find the other teams color. Once it does, it will do a little dance.




Source:
https://raw.githubusercontent.com/kaloisi/ozobo/master/capture-the-flag.ozocode 

Video:
 

No comments:

Post a Comment