[Full Game] Color Breaker (Block Breaker Remake)

2d

#1

After completing the Unity 2D course, I decided to make a full game based on the Block Breaker Project.

Main features:

  • Infinite game loop with unique random levels
  • “Color Breaker” mechanics as the core of gameplay
  • Smart Boost and Magnet mechanics for advanced ball control
  • New style with dynamic color palettes
  • Lives system
  • Statistics menu and much more …

#2

In addition, for those who struggle with boring ball loops. Here is my solution

Ball.cs

[SerializeField]
[Range(0.1f, 0.99f)] float maxDelta = 0.95f;
[SerializeField]
[Range(0.1f, 0.99f)] float correctionValue = 0.2f;

...

private void OnCollisionEnter2D(Collision2D collision)
    {
        AdjustDirection();
        AdjustSpeed();
	...
    }

...

private void AdjustSpeed()
    {
        if (Mathf.Abs(currentSpeed - (targetSpeed + additionalSpeed)) > Mathf.Epsilon)
        {
            Vector3 normal = rigidBody.velocity.normalized;
            rigidBody.velocity = new Vector2((targetSpeed + additionalSpeed) * normal.x, (targetSpeed + additionalSpeed) * normal.y);
        }
    }

    private void AdjustDirection()
    {
        Vector3 normal = rigidBody.velocity.normalized;
        if (Mathf.Abs(Mathf.Abs(rigidBody.velocity.normalized.x) - Mathf.Abs(rigidBody.velocity.normalized.y)) >= maxDelta)
        {
            if (Mathf.Abs(normal.x) > Mathf.Abs(normal.y))
            {
                normal.x = Mathf.Sign(normal.x) * (Mathf.Abs(normal.x) - correctionValue);
                normal.y = Mathf.Sign(normal.y) * (Mathf.Abs(normal.y) + correctionValue);
            }
            else
            {
                normal.y = Mathf.Sign(normal.y) * (Mathf.Abs(normal.y) - correctionValue);
                normal.x = Mathf.Sign(normal.x) * (Mathf.Abs(normal.x) + correctionValue);
            }
            rigidBody.velocity = new Vector2((targetSpeed + additionalSpeed) * normal.x, (targetSpeed + additionalSpeed) * normal.y);
        }
    }

#3

A really nice version of Block Breaker. You really put some features that makes the game fun to play. I wish I have much more free time to give some new features to my version of Block Breaker.

Here are my statistics


#4

Hey DalwyX,

Congrats on finishing the course! (:

I really like “glowiness” (is that a word, lol) of the colors, and the polish you put into the game.
I’m assuming there is no end to the number of waves.