IGNORED

# Breakout Disassembly?

## Recommended Posts

I was wondering if someone has already done a commented disassembly of Breakout. There are still some mysteries to me, for example how the paddle reflects the ball. I found this in the manual:

"The paddle is divided into five sections. Note that the ball

bounces off each section at progressively smaller angles after
the third, seventh, and eleventh hit. After the twelfth hit,
the angle returns to its original size."

This makes it sound like it's tracking the number of times the ball has hit one of the paddle sections, and depending on how many hits that section has taken, it'll reflect at a different angle... Anyway, if nobody's disassembled and commented Breakout I may be up to the task!

##### Share on other sites

I haven't full analyzed the code yet, but the manual is not correct here. The algorithm is a bit more complicated.

The angle and speed of the ball changes with every 4th hit, up to 12 hits. So far the manual is correct. But It does not wrap around. However, if you hit one of the top 3 rows, it is set to a fixed angle and maximum speed. Also I haven't found those five sections yet. Instead there are only two (left and right), which influence the angle, but not the speed.

##### Share on other sites

• 3 weeks later...

Good info!

I was watching a friend play this game this last weekend, and trying to figure out the ball bounce mechanic. I might just video cap it to be sure, but what might make sense is that when the ball hits a brick, it cannot register another collision until it hits blank space. This would explain it going through bricks on its way back down but also being able to oscillate between sets of bricks if they are separated by space. It would also mean they wouldn't have to do logic to reposition the ball at the edge of the brick after a hit. I keep thinking what the simplest possible physics model is for Breakout; what'd require the very least amount of logic.

##### Share on other sites

• 3 weeks later...

but what might make sense is that when the ball hits a brick, it cannot register another collision until it hits blank space. This would explain it going through bricks on its way back down but also being able to oscillate between sets of bricks if they are separated by space.

That's Super Breakout (which needs this capability for it's "progressive" variation). In the original game, no additional bricks can be hit until the ball collides with a paddle or the top border (when ram \$EB is negative, no brick collisions are used). This and direction changes following a hit are ignored for "breakthrough" variations.

Simply doing away with the negative check in Breakout creates a problems elsewhere. You can't rely on empty space without adding additional code to the collision routine, or the ball will behave very strangely (like erasing entire horizontal rows).

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.