Inspiration

Inspired to replicate the immersive experiences of VR gaming into augmented reality. As well as taking stylistic themes from early retro arcade games. I pretty much wanted to make a modern Space Invaders.

What it does

The game tracks the players hand and with a tap of the screen fires laser bullets at oncoming robot kittens. If the kittens get within range they will start attacking and decrease your health. The kittens spawn from out of the ground.

How we built it

The meshes were all built in Blender as well as the animation. Most of the time spent building this lens was writing the code - basic game logic and implementing various lens features.

Challenges we ran into

One of the main challenges was tracking the hand. Because the game requires the hand to be pointed away from the camera at such an awkward position, hand recognition was very glitchy. The initial plan was to fire the bullet in the direction that the index finger was pointed in. This proved difficult due to there being 3 different parts of the finger with varying directions, and because the unreliable hand recognition often inaccurately tracked the index finger. I ended up using the wrist rotation as the basis of the bullet direction as it was tracked more accurately, this meant calculating the orthogonal to the wrist in the direction of the fingers. So I spent days trying to figure out what quaternions were and somehow ended up with an accurate shooting mechanism. The lack of accuracy in recognising the hand position also meant I couldn't add a gun mesh or gun texture to the player's hand as was originally planned because it would continuously flash in and out of the game. I had to learn how to animate in Blender which was painful but eventually got there, making 2 animations for the kitten - walking and attacking. The world mesh also took me a while to fully understand.

Accomplishments that we're proud of

The gun direction calculations were very painful and took a lot of trial and error but I was really glad when it worked. I was quite proud of the overall aesthetic of the game, the font I used was very blocky and 8-bit like. I feel like I nailed the retro feel exactly how I pictured it when I started planning.

What we learned

Quaternions. How to animate in Blender. I always wanted to learn the world mesh, hand tracking and physics systems in Lens Studio but didn't really have any ideas to implement until I had to create this lens and incorporated all three. I wrote all the movement code of bullets and kittens myself and didn't discover until a day before deadline that there was a velocity option in the physics body component that does this already but I didn't have enough time to implement it. I will remember to use that in my next lens.

What's next for Evil Robot Kittens

A better shooting mechanism, my initial plan was to use microphone input and listen for the player make shooting noises like "pew pew" or "bang" to trigger the gun. This turned out to be very hard to implement in the timeframe given as I would have to train a ML model of sorts. More variety in the game, different weapons and kittens. Like a boss kitten or something.

Built With

Share this project:

Updates