Giter Club home page Giter Club logo

arkanoid-game's Introduction

Welcome to Arkanoid Game

Overview

This project is a Java implementation of the classic Arkanoid game, developed using Swing for the graphical interface. The objective of the game is to control a paddle to prevent the ball from falling while breaking all the bricks on the screen.

Features

  • Ball and Paddle Interaction: Move the paddle left and right to deflect the ball and break bricks.
  • Brick Layout: Multiple rows of bricks are positioned at the top of the screen, each with unique colors.
  • Game Controls:
    • Use the arrow keys or A/D keys to move the paddle.
    • Press R or click the mouse to restart the game after a game over.
  • Score Tracking: Score is displayed on the top-left of the screen as you progress through the game.
  • Dynamic Gameplay: The game continues until either all bricks are destroyed or the ball falls past the paddle.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/arkanoid-game.git
    cd arkanoid-game
  2. Compile the Java files: Make sure you have JDK installed, and then compile the source files using:

    javac ArkanoidGame.java Ball.java Paddle.java
  3. Run the Game: Execute the game using:

    java ArkanoidGame

How to Play

  • Move the Paddle: Use the left () and right () arrow keys, or A and D keys to move the paddle.
  • Restart: After the game ends, press the R key or click the mouse to restart.
  • The game ends when the ball falls below the paddle or when all bricks are destroyed.

Game Mechanics

  • Ball: The ball starts at the center of the screen and moves in random directions. It bounces off walls, bricks, and the paddle.
  • Paddle: Positioned at the bottom, the paddle is used to keep the ball in play.
  • Bricks: The game contains rows of bricks that disappear when hit by the ball.

Project Structure

arkanoid-game/
│
├── ArkanoidGame.java  # Main game logic and UI handling
├── Ball.java          # Handles ball movement and collisions
├── Paddle.java        # Manages paddle movement
├── Brick.java         # Defines brick properties
└── README.md          # Project description and setup guide

Contributions

Feel free to submit issues or pull requests to enhance the game's features or fix bugs.

arkanoid-game's People

Contributors

kensukeken avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.