Since the launch of Code Lab’s Constructor Mode, we’ve seen so many incredible user projects, from original games to hilarious project remixes to even a tea-making utility. To say that we’ve been awestruck by what all of you in the community have created would be nothing short of a gross understatement.
The wide conceptual range and high quality of your projects made choosing the first user project to be featured in the official app thrilling, but also surprisingly difficult. But in the end a decision had to be made, and forum member JDFight’s Guess the Number emerged triumphant due to its clean code, succinct concept, and wonderful use of Cozmo’s character.
As the inaugural Code Lab featured user, we wanted to formally introduce JDFight to all of you.
Anki: Could you tell us a little about yourself?
JDFight: Of course! I taught myself programming, starting with BASIC and Borland Pascal. Growing up, my best friend and I used to hang out and make little video games in MS-DOS. He went on to create a successful video game company called Artix Entertainment and I work there now as a game developer working mostly in C#. One of our older games, “Jimmy the Eye,” is based on an old game I wrote in Pascal when I was in the 11th grade.
In college I actually studied music and not computer science. I love to play guitar and have created some original music for our games, though most of my time these days is spent programming. There is some crossover with my love of technology and music as I’m a GNU / Linux enthusiast and use software from the excellent KXStudio repositories for my music production.
How did you first find out about Cozmo?
I first heard about Cozmo last year and remember reading an article about his advanced personality and open source Python SDK. The SDK was the big draw to me. I thought it was awesome that a small consumer entertainment robot would allow users the ability to interface with its hardware and software, and create custom programs.
What do you like most about using Cozmo / Code Lab?
Code lab is a lot of fun because you have access to a lot of functionality. Also, the drag-and-drop interface is convenient because typing all of the underlying code by hand would be incredibly tedious on a mobile device.
Another thing I like about Code Lab is being able to code while interacting with Cozmo in real time. This makes it easy to quickly test a wide variety of behaviors. I especially enjoy using Cozmo’s expressive animations as they really add to the overall experience of any project.
Can you take us through the process of how you created Guess the Number?
I wanted to make a simple game that utilized both Cozmo and his cubes, and remembered a game example from the book “Land of Lisp” that uses a binary search algorithm to guess a player’s number. I thought it would be fun to implement the same algorithm in Code Lab.
The game is quite simple, and lends itself to Cozmo’s unique range of features. For instance, with three programmable cubes available, it made sense to use them for the game’s required inputs: lower, higher, and correct.
While making the game, I noticed I had a hard time distinguishing between numbers that sounded the similar when Cozmo said them, like 17 and 70. So I had Cozmo display the number on his face to more clearly communicate to players what he’s saying.
A critical part of making the game was testing. Luckily, I’m a parent and had my children play the game so that I would know if it was intuitive and fun! They really enjoyed trying to “trick” Cozmo by choosing hard-to-guess numbers.
Do you have any other Code Lab projects you’re currently working on?
I am not currently working on any Code Lab projects but I have been learning the Python SDK. In fact, I recently started a kind of “code-cracking” puzzle game with the SDK and hope to share it with everyone one it’s done.
Any Code Lab tips for other aspiring project creators?
First and foremost, have fun! The whole idea is that Cozmo is a robot who enjoys playing with you. If you’re having any difficulties while making a game, the official Code Lab community forum is a great place to go for inspiration and help.
Guess the Number will be available in Code Lab on April 7, 2018. Make sure to update your Cozmo app to version 2.4, launching March 28 (specific times will vary), to play it.
Submit your summer-themed Code Lab project Code Lab Contest for a chance to win $1,500 and be featured in the official Cozmo app.
New to Code Lab? Our Getting Started with Code Lab post will get you up and running in no time.
Head over to the official Code Lab forum to discuss your project with others, get help, and check out the project showcase.