Jump to content

Photo

Breakout Disassembly?

breakout assembly

3 replies to this topic

#1 louisg OFFLINE  

louisg

    Chopper Commander

  • 108 posts

Posted Mon Oct 19, 2015 6:00 PM

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!

 



#2 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 23,973 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Tue Oct 20, 2015 3:46 AM

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.



#3 louisg OFFLINE  

louisg

    Chopper Commander

  • Topic Starter
  • 108 posts

Posted Wed Nov 4, 2015 12:27 PM

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.



#4 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,885 posts
  • Location:The land of Gorch

Posted Sat Nov 21, 2015 7:12 PM

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).







Also tagged with one or more of these keywords: breakout, assembly

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users