Science and Tech Event Blog

Arlene Kalem's blog about all the tech and science stuff she gets herself into. Browse the archive by month or scroll down to search by tag. 

Thesis Update #6

This week Karl and I began prototyping our game in Unity!

Watch a brief video of the prototype in action and then read a brief explanation of the prototype and the scripts we wrote.

 

The five spheres are buttons on Panel One, and the five capsules represent the buttons on Panel Two. Our goal was to store the user input in a list and compare it to the list of solutions. We have two scripts to do this. One script goes on every button and handles the click events, checks the tag of what was clicked (such as verifying that a button was pressed) and sends that to the GameManager script. The GameManager handles the state of the game and all the challenges.

The GameManager script:

-Adds the button that was pressed to a list

-Waits for the user to hit submit, and then:

-Gets the name of the panel the button is attached to

-Compares that panel name to a list of panels and stores that index

-Then compares that index to the index of a list of solutions

-Then checks that the sequence the user submitted matches the solution

Additionally, the user user is able to clear their last input and also load another challenge.

Our next major programming challenge will be getting the Arduino and Bluetooth set up.