# Rick O'Shay - my version of Block Breaker

Hello! Here’s my version - Rick O’Shay (See what I did there, Rick?) Had a lot of fun and learned a lot about C# and Unity. Added some new features like 5 lives and level intros and a peek at my levels. Let me know what you think…

3 Likes

Wow this is incredible! I love the pun with the title and the art is very welcoming. I played a little bit of the first level and truly enjoyed it. Can I share this to the GameDev.tv Showcase page?

Yes. Thanks! I thought it wouldn’t qualify, since it’s based on the tutorial.
I just uploaded a new version, which fixed the velocity tweak and makes it less boring and actually easier to play. Not sure if it’s the best way to code it, but it worked for me! Big thanks to Rick for making this course fun as well as educational. I can’t wait for the next game lectures!

``````    private void OnCollisionEnter2D(Collision2D collision)
{
float threshold = 3f;
float randomMax = 4f;

// Debug.Log("before: " + myRigidbody2D.velocity);
float x = myRigidbody2D.velocity.x;
float y = myRigidbody2D.velocity.y;

if (Mathf.Abs(x) < threshold)
{
x += Random.Range(-randomMax, randomMax);   // calculate new x
}

if (Mathf.Abs(y) < threshold)
{
y += Random.Range(-randomMax, randomMax);   // calculate new y
}

myRigidbody2D.velocity = new Vector2(x,y);
// Debug.Log("after: " + myRigidbody2D.velocity);
``````

love the look of this fabulous design