Breakout Game Remastered
Youfeng Chen (yc3999)
Angzi Xu (ax2157)
Wang Chen (wc2794)
Zheyuan Song (zs2527)
Overview
• Rebuild the classic Breakout game.
• Destroy all bricks with the ball to win the game.
• If the player failed to catch the ball for a total of three time in
one stage, player will lose the game.
←original
ours→
Top-level Architecture
HW Design - Graphics
Tiles and sprites
• Tiles: pre-made graphical materials - assign to certain
locations on the screen in case of need.
• Sprites: place things in layers - ensure proper overlay.
HW Design - Graphics
Tile example:
• Letter G, which utilizes two
colors: “11” and “00”.
• 00 means the first color (#000000)
and 11 means the forth (#FF0000).
• Each tile can use up to 4 colors.
HW Design - Graphics
Sprite:
Upper elements will display on top of lower elements in case of
conflict
HW Design - Graphics
Block Diagram:
HW Design - Sound
Block Diagram:
HW Design - Sound
• Audio_ppl_0 configuration:
HW Design - Sound
• Audio IP Core:
HW Design - Sound
• Audio and Video Config.
HW Design - Sound
• Final Qsys connections
SW Design - Input
Buttons’ Function of the controller
Data received for
each key press:
SW
Design:
Game
Logic
SW Design - Game Logic
Initialization Movement logic
ball_h = 208; & ball_v = 425; data.x_pad = 208; The moving vector of the ball is a
Assign brick’s data: compose of its horizontal and
vertical velocity
SW Design - Hit Logic
Wall:
top wall y coordinate: 53
right wall x coordinate: 411
left wall x coordinate: 5
1. Hits the right wall:
• Horizontal movement: reversed
• Vertical movement: unchanged
2. Hits the top wall:
• Horizontal movement: unchanged
• Vertical movement: reversed
3. Hits the left wall:
• Horizontal movement: reversed
• Vertical movement: unchanged
SW Design - Hit Logic
Paddle “hitbox”:
Rectangle zone on the paddle.
L = length of the paddle
H = radius of the ball
Brick “hitbox”:
Four rectangle zones at each side of a
brick
Yellow areas as shown on the right
SW Design – Other information
I. Score
A four-digit "score" at the top. Break one brick = +10 points
Capable of handling the highest number of bricks possible
(6 rows * 13 bricks per row * 2 stages * 10 pts per brick = 1560 points maximum)
II. HP indicator
When the ordinate of the ball is greater than or equal to 475,
execute "game_hp -= 1;".
When game_hp = 0, the game ends.
III. Game stage number
Stage 1 is relatively easy: fewer bricks and a slow ball.
Stage 2 is more difficult: more bricks with a faster ball.
SW Design - Win & Loss Logic
• Clear all balls in both stages → CONGRATS!
• Fail to catch the ball for three time in one stage → GG!
• Think the game is too hard? We made a “cheating mode” button for you with love ❤
Thank you!