Remake of the breakout game (1978) Atari 2600 built with java using the @TotalCross framework as the final project of the MAMI (mathematics applied to multimedia).
And thanks to @fabio for helping me to understand how the framework works and especially for guiding me on the best object-oriented practices
- Name and registration: Vaneska Sousa, 476389;
- Course and Institution: System and digital midia na Federal University of Ceará;
- Subject: MAMI - Mathematics Applied to Multimedia, 2020.1;
git clone https://github.com/TotalCross/totalcross-embedded-samples/
or download the .zip by clicking the green "Code" button next to repo name and choosing "Download ZIP".- If you downloaded .zip file, uncompress it in a folder and open it.
- If you are using Linux, run
code <totalcross-embedded-samples>
or open VS Code and Click in "File > Open..." and select totalcross-embedded-samples in the file dialog that will be shown. - Look for its
RunBreakoutApplication.java
and right-click. - Choose the "Run" option in the popup.
- And play 😃
Below are the mechanics implemented in this remake:
- The game starts on a splash screen, and when clicked on the start button it changes to the game screen
- To start the game for the first time or restart after the ball falls, just double-click on the screen;
- The platform moves to the right and left according to user commands (with two console buttons);
- When the ends of the platform touch the ends of the screen there is a collision, preventing the platform from leaving the screen;
- The ball moves from the center of the screen downwards with vertical and horizontal oscillatory movements;
- The ball collides with the ends of the screen, changing its direction;
- The ball changes direction according to the location of the collision with the platform;
- The game ends if the ball falls, that is, it reaches the place where the platform should be;
- When the ball collides with the block it disappears from the screen;
- When breaking all the blocks on the screen, the ball changes speed and returns the same number of blocks;
- When you break all the blocks for the first time the speed of the ball increases and the blocks are placed back on the screen;
- When breaking all blocks for the second time the game continues even without blocks on the screen, being finished;
GameTC |- RunBreakoutApplication.java //starts the totalcross application with the desired screen size |- Breakout.java // Add all sprites in the screen and controls what the player see. |- ui // User interface |- InitialScreen.java |- sprites // All sprites are built here as well as the behavior of each one |- Brick.java |- Paddle.java |- Ball.java |- Stage.java // Brick sprites that are children of bricks, here is basically change the sprite image. |- BlueBrick.java |- GreenBrick.java |- OrageBrick.java |- YellowBrick.java |- DarkOrageBrick.java |- GreenBrick.java |- util // All constants, colors and images used in the construction of the game are placed here in order to facilitate the maintenance of the code. |- Constants.java |- Colors.java |- Images.java