Skip to content

Releases: omar0ali/breakout-game-cli

Breakout-Game

17 Aug 18:00

Choose a tag to compare

Breakout CLI Game

A simple terminal-based implementation of the classic Breakout game written in Go, using the tcell library for handling terminal graphics and input.

game-screenshot

Features

  • Paddle movement using arrow keys

    • Added animation when the paddle is moved, to give it a little bit of smoothness while moving.
  • Ball animation and basic collision with walls and paddle

    • Ensure all objects on screen are smooth even when frame rate fluctuates.
    • Added additional brick collision, when the ball hits the sides of the brick, the ball changes
      direction.
  • Smooth rendering in the terminal

    • FPS is visible, the game fixed at 30 frames per second.
  • Add bricks for the player to break by the ball.

    • Level / Height of bricks can be modified through the configuration file.
  • FPS can be configured through the configuration file.

  • Add debug information

    • To enable debug mode - can be enabled by adding debug=true under core in the
      configuration file.
  • Added mouse support, to enable mouse=true

  • Added multi ball game, hitting the space bar will shoot them, limited to 10 balls a game.

  • Status Bar to show player details.

  • Added 'You Win!' message at the end, when destroying all the bricks.

  • Showing a message before starting the game 'Click the left mouse button to get started!' as
    a tutorial.

Configuration

The game uses toml file for the user to configure the game, paddle, and ball speed can be changed as well as
the paddle width to fit the player need.

Important

Create a file named config.toml in the root directory of the application and add the following content:

[core]
duration_ticker = 33 # Target frame/update interval in milliseconds (actual FPS may vary)
debug = false
mouse = true
[player]
speed = 60
jump_by = 8
paddle_wdith = 10
balls = 10 # number of balls a player can have start of the game
[ball]
speed = 17
[bricks]
level = 3

File is saved as config.toml