r/ArduinoProjects • • Sep 15 '22

Update on my breakout game

183 Upvotes

20 comments sorted by

12

u/[deleted] Sep 15 '22 edited Sep 15 '22

Thanks for all the feedback so far - I've made a few updates to the project since yesterday...

Paddle/player now has 5 "zones" instead of 2

Added WIN/LOSE screens

Added score

Added lives

There are a few bugs to iron out, in particular relating to how I'm drawing the ball, but I'll get to those next.

The code is all a bit of a mess at the moment - hoping to tidy it up into something more shareable over the weekend.

6

u/xxqsgg Sep 15 '22

Great. Don't forget to put it out on GitHub :)

1

u/Small_miracles Sep 15 '22

This was the first game I made to learn JavaScript. The game logic looks pretty good! What chipset are you using?

3

u/[deleted] Sep 16 '22

Project uses an UNO R3.

5

u/NoU_14 Sep 15 '22

Awesome!

If you don't mind, how do you update your screen that fast? If I update it it goes slow enough to where I can see the pixels getting updated.

I run an esp8266 and fill the entire screen black to clear it

4

u/h2osteam Sep 16 '22

I guess the trick here is not to fill black the entire screen. But only draw rectangle of black on the changing area, say the moving ball has the previous position draw a black one before the new location is drawn.

5

u/[deleted] Sep 16 '22

Exactly. Don't fill the entire screen, just draw what you need to the screen when you need it.

1

u/MaxFalcor Sep 16 '22

Just out of curiosity why do you put resistors on the TFT? Is this a good practice or something that depends on the module. For me I've mostly been wiring my MCU to the TFT without any resistors.

4

u/[deleted] Sep 16 '22

I'm going to say to limit the backlight?...The honest answer is that I just copied someone else's wiring diagram. Hopefully someone has a better answer to add here.

1

u/[deleted] Sep 16 '22

Really nice! Did you implement a constant speed in y? Is this on purpose?

2

u/[deleted] Sep 16 '22

Yeah, y is constant - suppose I could mix this up for more varied gameplay. Thanks for the feedback.

2

u/half_man_half_cat Sep 16 '22

Gives me iPod vibes!

1

u/dadbodfat Sep 16 '22

Thought this was called Arkanoid

1

u/deez_nuts_77 Sep 16 '22

awesome! do you have a write up of the project?

0

u/[deleted] Sep 16 '22

Excellent

1

u/[deleted] Sep 16 '22

Thanks!

1

u/exclaim_bot Sep 16 '22

Thanks!

You're welcome!

2

u/[deleted] Sep 15 '22

[removed] — view removed comment

3

u/[deleted] Sep 16 '22

Thanks!