{"id":17817577,"url":"https://github.com/abhisingam/brickbreaker","last_synced_at":"2026-04-26T23:31:59.602Z","repository":{"id":108576819,"uuid":"354987876","full_name":"AbhiSingam/BrickBreaker","owner":"AbhiSingam","description":"A Terminal-Based game made in Python that emphasises upon the use of OOPs concepts. Python | NumPy | Game Development","archived":false,"fork":false,"pushed_at":"2021-04-05T22:22:21.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T09:13:40.019Z","etag":null,"topics":["game-development","numpy","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbhiSingam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-05T22:20:58.000Z","updated_at":"2021-04-05T22:23:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d157d0f-7003-4b47-b061-188c7bdbad51","html_url":"https://github.com/AbhiSingam/BrickBreaker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbhiSingam/BrickBreaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiSingam%2FBrickBreaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiSingam%2FBrickBreaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiSingam%2FBrickBreaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiSingam%2FBrickBreaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbhiSingam","download_url":"https://codeload.github.com/AbhiSingam/BrickBreaker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhiSingam%2FBrickBreaker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","numpy","python3"],"created_at":"2024-10-27T16:44:28.515Z","updated_at":"2026-04-26T23:31:59.588Z","avatar_url":"https://github.com/AbhiSingam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brick Breaker\n\nThis is a termial-based replica of the popular arcade game brickbreaker.  \nIt involves using a ball to break to break an arrangement of bricks with the use of a movable paddle to direct the ball and prevent it from falling off the screen (which results in the loss of a life, explaines later).\n\n---\n\n## Types of bricks\n\nThere are a total of 6 kinds of bricks:\n - **Weak bricks**:  \n Weak bricks can be broken with a single hit from the ball\n - **Regular bricks**:  \n Regular bricks can be broken with two hits from the ball\n - **Strong bricks**:  \n Strong bricks can be briken with three hits from the ball\n - **Unbreakable bricks**:  \n Unbreakable bricks cannot be broken\n - **Explosive bricks**:  \n Upon being hit, explosive bricks will be destroyed and will also destroy all other bricks around them, including unbreakable bricks. You can use a chain of explosive bricks to create a chain explosion and destroy large amounts of bricks.\n - **Rainbow Bricks**:\n These bricks have a random strength which is decided upon hitting it for the first time.\n\n---\n\n## Game Controls\n - 'a' : Moves paddle left\n - 'd' : Moves paddle right\n - 'w' : Launches ball from initial position\n - 'x' : Ends game\n - 'n' : Next level\n\n---\n\n## Score\nYou gain 10 points from damaging a weak, regular, or strong brick.  \nYou do not get points for hitting unbreakable bricks or exploding explosive bricks.\n\n---\n\n## Levels\nThere are 3 levels in the game, the final one being a boss level. In the the first two standard levels, the condition to beat the level is to break all the bricks. In the boss level, a UFO (represented by a yellow bar) will move with the paddle periodically dropping bombs. To beat the boss level, you must hit the boss with the ball and deplete it's health.\n\n---\n\n## Lives\nYou have 3 lives at the start of the game and you lose one every time you let the ball fall below the paddle or being hit by a bomb in the boss level. In case you lose all three lives, you lose the game.\n\n---\n\n## Game-Board generation\nThe board is randomly generated every time you run the game and is made to be symmetrical. It is also ensure that there is one chain of explosive bricks with at least 6 bricks in the chain.\n\n---\n\n## Running the game:\nTo run the game, run the following commands:\n```\npip3 install -r requirements.txt\n```\n```\npython3 main.py\n```\n---\n\n## Collisions:\n- **With walls and roof**:  \nWhen the ball collides with the walls of the board, its velocity is reflected along the wall it collides with. Note: The ball CANNOT collide with the bottom wall of the board.\n- **With bricks**:  \nWhen the ball collides with a brick, its velocity is reflected according to the side of the brick it collides with.\n- **With paddle**:  \nThe velocity of the ball is changed depending on where the ball hit the paddle. So if hits further to the right of the paddle, it'll have more velocity to the right and the same goes for the left.  \nTo ensure sufficiently good rendering of the ball, the ball's velocity along the x direction is capped at 3 (i.e. it cannot be less than -3 or more than 3)\n\n---\n\n## OOPS Concepts:\nWhen making this game, the following OOPS concepts were applied:\n- **Abstraction**:  \nAll the functionality in main.py is implemented via intuitive commands like ball.move() and board.render().\n- **Encapsulation**:  \nEach game element has it's own class and methods to make the operation and functioning of those game elements simpler.\n- **Inheritance**:  \nInheritance is applied in the making of explosive bricks and powerups. It allows for the creation of similar game elements to be done in a simpler manner.\n- **Polymorphism**:  \nPolymorphism is diplayed in the .hit() and .destroy() methonds of the exploding bricks and the .fall() method of powerups. This allows for the code in brick colloision to be done in a simpler manner as now the class method handles the differences in effect and such features do not need to be implemented separately.\n\n---\n\n## Powerups:\nPowerups are dropped at random when any brick is destroyed. The various kinds of powerups include:\n- **Laser Paddle**: The paddle shoots lasers from the sides. Each laser travels vertically and will damage any brick it comes in contact with. Lasers cannot break unbreakable bricks.\n- **Fireball**: The ball will cause the first brick it hits to explode, similar to exploding bricks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhisingam%2Fbrickbreaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhisingam%2Fbrickbreaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhisingam%2Fbrickbreaker/lists"}