[Game] Block Breaker

Thought I’d share my block breaker game. I spent way longer on it after finishing the lectures than I intended to. The only bug that remains as far as I can see is that the ball sometimes gets stuck in a bounce loop along the Y axis (possibly because of the paddle’s chamfers). Other than that, it features:

  • The player has lives
  • The ball resets to the paddle each time the player dies
  • The cursor is hidden during gameplay
  • The particle effects are a little nicer than in the course vids
  • The sounds are definitely nicer than in the course vids (and feature a sample of someone cracking the bones in the neck and fingers - think about that while you play!)

Enjoy. Here it is: Profplum’s Block Breaker

Would love to have feedback from you guys!

(and yes, I know the title screen is absolute rubbish - I was focusing on the more complex programming tasks I set myself).

2 Likes

profplum700–

I fixed my “boring” loop issues by checking the return X and Y after a bounce. If it was less than or greater than a certain number (IE–angle is very flat horizontally or vertically) I would increase it so the angle was not so flat. This seemed to have work pretty well to eliminate the boring loops. Not sure if it is the most elegant solutions but I feel my ball bounce stay pretty active.

Also, I am with you–I have spent a lot of time on the Brick Breaker after the lesson. It is a fun game with a relatively simple main loop to expand upon. :slight_smile:

1 Like

Hi @profplum700,

I really enjoyed playing your game! I think what worked the best for me was the fact that you made the cursor disappeared. It made me feel that I was fully controlling the paddle. I realized that if I had not such an impressions with the game from the videos was because my attention was partially attracted by the cursor. So thank you, I just finished the block breaker video and starting my own project, I’ll try to implement this as well!

I liked a lot the first two background images. It felt as if we entered the temple and ended up facing a dragon. Therefore I was a bit disappointed by the last image. However the difficulty progression is very good.

Overall, I think it is a really good approach to block breaker! Thank you and well done! :slight_smile:

@jason_williams: this seems to be a really good idea to handle the boring loops, thanks for the tip! :slight_smile:

IanCher–anytime hope it works out for you. Another tip I found through discovery or reading other folks inputs is to set the mass of the ball to a small number and remove gravity. The low mass prevents some situations where the ball might force itself between some bricks when you didn’t mean for it to. I think that later is subject to opinion on what you like but I didn’t like when the ball would go about halfway and lose momentum and fall back down.

1 Like

Hey @IanCher and @jason_williams,

Thanks both for your feedback. I’ve improved my game to include backgrounds for all scenes now and use a far better background on level 3 :wink:

I also discovered an issue where my particles weren’t showing up (even though they were clearly being created) - I discovered this was due to both too high a partial initial velocity and inappropriate path trajectories. All fixed now.

I will have a go at implementing the fix to the boring loop you suggested. Sounds like a case of checking if the ball’s velocity x = 0 while y != 0, then fix it!

As for hiding the cursor during gameplay, I achieved this by adding the following to LoadLevel() in LevelManager.cs:

if (name.Contains("Level")) { Cursor.visible = false; } else { Cursor.visible = true; } }

1 Like

Privacy & Terms