Arkanoid

So many pixels

The title screen

Arkanoid is a popular variation of the classic arcade game Breakout. In this game, the player is in control of a paddle and has to bounce a ball into bricks to break them. The main goal of the game is to break all the bricks of a level, making the player advance to the next one. If the player fails to bounce back the ball, the ball is lost in the pit and the player loses a life. To make the game more interesting, you can shoot the ball with an angle that depends on the position where the ball landed on the paddle. This is what makes the player somehow control the ball.

This game was first developed as an arcade game by Taito in 1986. In this post, I will analyze the popular NES port. This particular version includes 3 new levels exclusive for the NES.

Don't forget to blow it

The beautiful NES cartridge

Memory watching

Because it is a computer, the NES can store certain values in its RAM. These values are named bytes and go from 0 to 255. Now, using a modern emulator, we can see in real-time the value of these variable. For example, the value at the address 0x0038 is equal to the horizontal position of the ball.

This could look like the Matrix computer

The value for the horizontal position is equal to 8B in this example

 

With the Fceux emulator, we can create a script with the Lua language to create an output of the status of the player. Now, in this script, I programmed it to give the location of the paddle, the position of the three possible balls and the level at each time frame. Also, the script takes a screenshot at the beginning of each level which will be used in the graphs.

Tool-assisted speedruns

Since I’m not a particularly good player of Arkanoid, I decided to analyze the results of a Tool-assisted speedrun for the game. Tool-assisted speedruns (TAS) are games played to set a high score, but using computer tools to help the player. One popular example would be to play the game and setting the emulated speed very low to play it in slow motion.

One TAS playthrough for this game by Baxter is particularly interesting to watch because the player tricked the game to always give him the three balls power-up. What is even more incredible is that he never loses any of these 3 balls.

Now we may be interested to look at the player’s decision for any particular hints on how to play the game.

Results

Using the Lua script on this speedrun creates an interesting data frame to analyze. Now, in this R script, I took the results, to plot some graphs over the screenshot previously taken. The first thing considered was the trajectories of the balls. As seen in the next graph, they were plotted for every level of the game.

Each color represent a ball, with the trajectory of the original ball being red. Also, the brighter the color, the more recent the trajectory. One important note to consider is that the golden bricks are indestructible; this explains some of the bizarre path taken by the balls.

Try to follow one from the beginning to end

Trajectories of the balls

Since the trajectories can be confusing in some of the levels, the next graph plot the density of the 3 balls’ positions. The more opaque it is, the more popular this particular region was.

That's not chewing gum

Popularity density


Conclusions

Because levels are very different, each one needs a particular strategy. But, one common trick for this game is to destroy a column of brick in a way to make the balls bounce on the top of the bricks. As we can see on the graphs, some of the levels were cleared on the sides first to use this important trick.

Leave a comment