Breathing Games Dev Diary

Weekly game development updates.

Week 5: Pivots & Prototyping

2020-02-28 CHLA Team

This week the process of prototyping our new mini games is in full swing. After speaking with Professor Marientina & Dr. Vangelis our mini games have pivoted a bit to the following:

name description inhale exhale
Treasure Hunter You’re the wind slow down accelerate
Fruit Fall Knock fruit down from the trees collect a pebble blow pebble at fruit
Save the Village Be the enemy or the savior collect air/water spray fire/water

Building the scene

We found amazing low poly environments and items in the unity asset store to help us rapid prototype the new game scenes. Our team primarily works on building and testing the initial game scenes with keyboard input for now.

Next week…

Once the scenes are at a decent state we will look into integrating our most important feature, the Digital Spirometer, via the Unity Open Sound Control script. Stay tuned!

– The CHLA Team

Week 4: Dev Environment Setup & Management Change

2020-02-21 CHLA Team

This week we lost our Production Manager. That being said, we have elected a new PM and are still full steam ahead!

For this posting, we are stepping back a bit to review the development environment setup for the breathing games. Without further ado…

Arduino Setup

  • Connect the M5StickC to your computer via the micro USB cable
  • Install and run the Arduino IDE from https://www.arduino.cc/en/main/software
  • In the Arduino IDE install the appropriate board manager and libraries ESP32 (Board Manager)
  • Go to File -> Preferences -> Settings
  • Copy this link for the ESP32 Board Manager URL to Additional Boards Manager URLs input field and click OK: https://dl.espressif.com/dl/package_esp32_index.json
  • Go to Tools -> Board: -> Boards Manager…
  • Search for ESP32 and install it M5StickC (Library)
  • Go to Sketch -> Include Library -> Manage Libraries and search for M5StickC and install it OSC by Adrian Freed, Yotam Mann et.al (Library)
  • Now Search for OSC and install it.
  • Go to Tools -> Board: and select M5Stick-C
  • Go to Tools -> Upload Speed and select 115200
  • Go to Tools -> Port and find and select the USB port your M5StickC is connected to, e.g. COM3.

WiFi network

If you want to develop at home, we found that you can use a local 2G wifi network. Otherwise use the usb wifi router provided by the professor. Just power on the wireless router via a micro USB cable and connect to the network. At the writing of this post these are the network deets:

  • Network name: SpirometerNet
  • Pass: CHLA2020
  • Router admin site:
  • Address: 192.168.0.1
  • User: admin
  • Pass: admin

Take note of your network IP address (e.g., 192.168.0.101)

Digital Spirometer

  • Download the digital spirometer files
  • In the Arduino IDE open the M5_Spirometer_2020.ino file
  • On ~line 44, const char * udpAddress = “192.168.0.111”; change this to your IP address
  • Verify/Compile the code (click the round checkmark icon)
  • Now Upload the compiled code to the M5StickC (click the round arrow icon)
  • No errors? Then the digital spirometer is all set. Congrats!

Digital Spirometer OSC tool

  • Now run the Digital spirometer OSC tool.exe
  • Update the IP address to your IP and the port to 8000
  • If all is setup probably blowing into your attached mouth piece on the Digital Spirometer should produce a signal in the OSC tool.
  • Jump for joy! Pump your fist in victory! The sensor is working correctly!

Unity + Oculus

Just follow this great medium article:

» How to get started with Oculus Quest and Unity on macOS.

– The CHLA Team

Week 3: Field trip to CHLA

2020-02-14 CHLA Team

To become more familiar with the specific breathing protocol that is used by the children, this week the team took a little field trip to the Children’s Hospital Los Angeles. We met with 6 doctors. It turned out that the doctors thought our VR game was going to be designed around the diagnostics protocol which each patient has to first perform at the clinic before beginning their daily protocol. This was different from Dr. Vangelis’ expectation of our team designing the VR experience to focus on the daily protocol, so he took the time to clarify and make sure the CHLA doctors were all onboard with our team designing for the daily protocol instead.

Unfortunately, due to this miscommunication, we did not receive any documentation on the actual protocol as we were expecting. The doctors had promised to send a follow up with the protocol and also allow us to set up a time to come and be trained on how to perform the protocol. To this date we are still waiting for the follow up.

One a positive note we did manage to properly set up and receive data from the digital spirometer. Prototypes for each mini game have started to be built, and next we will try to get the project teams Save the Village game working with the digital spirometer.

– The CHLA Team

Week 2: Game Idea & Team Tools

2020-02-07 CHLA Team

It begins!

On a sad note, this past week one team member had to leave the course due to a class schedule change. On a happier note, our team space was set up in the USC Creative Media and Behavioural Health lab. On top of this received two Oculus Go and 3 custom made spirometers, designed by Dr. Vangelis.

On the production side we setup our team’s Trello board for task management, WhatsApp group from team chat, GitHub repo for source control and shared Google Drive for everything else. Several teammates took time to play and experience VR games for the first time so that everyone has a general understanding of the gaming space we will be developing in.

And last, but not least, we finalize our idea being a game of mini games. This would provide more variety for the children to choose from. We select the following three mini games:

name description inhale hold exhale
Save the Village Put out fires! collect water hold the water shoot water
Racing Yeah, a racing game! braking coasting accelerating
Pebbles Straw + pebbles = fun! collect pebbles hold pebbles place pebbles

– The CHLA Team

Week 1: The Breathing Game Blog

2020-02-01 CHLA Team

Hi there!

This is the start of our team blog. This space is for you to be part of our team’s journey on the game development process during the Spring 2020 Augmented, Virtual & Mixed Reality course at USC (CSCI 538). Our team has an amazing opportunity to work on building games to make the breathing therapy process more interactive and fun for kids at the Children’s Hospital Los Angeles.

Our eight person team contains a mix of experience in various fields of engineering. During our first team meeting we did a typical icebreaker ceremony. We analyzed the game development space for our team. We are tasked to use the Oculus Quest, and a customer spirometer which provides the game with breathing data for inhaling and exhaling. With this detail, we took time to ideate games that would possibly work well in VR space with the idea of a child needing to be stationary while performing breathing exercise with a spirometer.

Fortunately, a prior team had worked on this project so we have the option to not start completely from scratch. The game idea list included basketball, racing, archery, something related to balloons, blowing and picking up pebbles with a straw, and a Save the Villager game which you put out fires in a village being attacked by cute dragons. A main challenge is designing the games in a why that focuses on encouraging the child to breath in and out and hold for a specified number of seconds in order to properly satisfy the breathing therapy. In the next 3 months we look forward to sharing with you our path to designing novel solutions to this design problem.

Cheers! – The CHLA Team

Newer posts