In this project, I implemented a variant on the 15-tile game, using a set of 9 image patches rather a set of sequential numbers. To start playing the game, the tiles get shuffled, and the objective is to then place them in the correct order. I implemented this in Unity first, then updated some of the interaction elements such that it was playable in AR on a mobile device, and finally updated it to be playable on a VR device. The final deliverable is the same game playable in three different, immersive environments!
Built a game board from scratch using Unity - this was my first ever project in Unity, and I had a lot of fun! After setting up the project with one of the preset scenes,I created a game board and 8 game tiles that lay on top of it. I configured the game board such that the user first places it on the table in front of them, and then has the ability to move this board onto different horizontal planes. To build the game, I first wrote a simple script to split the image into a set of 9 patches (3x3 grid). Each patch was mapped as a texture onto one of 8 available GameObject tiles, which are all attached to a script with game logic and defined interaction mechanisms. I also implemented tile shuffling, a score counter, and interactive pop-ups,
Video demo:
This AR implementation built on my previous Unity program, with an extra interaction mechanism added to scan real-world objects! To convert my app from Unity to the AR space, I made use of AR Session Origin, AR Session, and AR Input Event Systems in order to get the proper input feedback from users, as well as being able to scan and interact with the real-world 3D space.
Video demo:
To convert my implementation from Unity desktop to VR, it mainly involved switching to using the Unity XR Interaction Toolkit to properly accept and process new inputs - they now come froma game controller, rather than a screen touch! The primary interaction mechanisms I used were (1) ray casting from my controllers to interact with objects that are far away and (2) button inputs, where users press a button on controllers to directly trigger a functionality (tile selection, etc). Specifically for the game board, my canvas and tiles remained as game object cubes, but then I created an invisible canvas of 8 buttons overlayed on top of this. When one of these canvas buttons are clicked, it triggers a set of logic to move around the tiles underneath it. It was a bit of a hack to get the interactions running as expected, but it seems to work well! ]
Video demo: