Index: Block Breaker

A breakout-inspired endless game where you stop the ball from escaping the ring.

personal

arcade

pong

Overview

Index is a fast paced arcade casual game, built to engage the player and test their reaction speed. It was inspired by breakout, and was my first foray into game development.

Available on playstore
Index-Banner

My Role

In development terms, I was the Solo developer behind the game, responsible for creating the Art, Code, Sound and everything about the game.

Challenges

While Index is a relatively simple game, it didn't come without a bit of its own challenges, one of them was:

• The ball going through colliders at high speeds

This problem mostly occurred on lower end devices, and was caused by Unity not detecting the collision within the physics frame. Also my setup here was very faulty, I was using a rigidbody with interpolation. This is generally not a great setup when you need absolute control over the motion of an object, and when the object doesn't follow natural physical laws like gravity. So of course, when I revisited the project a year later, with more experience, I was surprised by my initial configuration.
Frame Showing Ball Going Through Collider
I solved this by removing the rigidbody, updating the ball's motion manually, and for collision detection; each frame, I perform a raycast a short distance in the direction the ball is travelling (the short distance is based on the ball speed, and average deltaTime). If an obstacle was detected, then the ball could be reflected off. On a different note, for someone using a rigidbody setup, where colliders are being ignored, I believe setting the collision detection mode to continuous, and enabling extrapolation should fix their issue.
Using Raycast For Collision Detection