This is a simple homebrew Breakout clone for SNES. It uses my simple Neko Library for SNES. Both are work in progress.
This clone was inspired by the excellent clone on learnopengl.com.
This clone calculates the color palettes from a set of base colors found in src/BaseColors.s
.
You will need make
and the cc65 toolchain to build this project:
$ git clone --recursive https://github.com/georgjz/snes-breakout.git
$ cd snes-breakout
$ make
The finished ROM should be in the build/release
subdirectory.
gfx/
: contains all the binary graphic data as well as the original aseprite and Tiled files I used to create the graphicslevels/
: contains all the level data loaded by theLoadLevel
subroutinenekolibrary/
: a submodule containing the code from my simple SNES library. Will be "hard-coded" into this repository once it's finishedsrc/
:gfx/
: all subroutines that handle graphics. Most importantly theLoadLevel
andGenerateColors
subroutinesinit/
: simple initialization subroutines to set up the SNESmemory/
: files related to the game's memory mapBreakout.s
is the main file, here is where all the magic happens.
I plan to create a more in-depth code documentation once I've implemented all of the basic features I wish to add. For now, please refer to the comments in the code for explanations.
Several features are still missing:
- Once a level is finished, the game will keep running. There is no code to advance to the next level yet.
- This game can only be played in Ironman Mode. There are no lives. If you lose, you return to the main screen.
- The brick-ball collision detection logic is a mess. This can lead to some odd/fault behavior now and then.
- The ball has constant speed, the angle between ball and paddle never changes. This will change in the future.
- The weird background is due to a missing feature: as of now I move the destroyed bricks off screen. But in the final version, I wish to hide the destroyed bricks behind a opaque screen (hence the file name in
gfx/
) by simply changing their sprite priority (this is already implementen inBreakout.s
, actually)
Some parts of the code are very messy. But I follow the old C programming rule here: First make it run, then make it run fast!