Skip to content

geoffm39/breakout-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

634946e · Mar 17, 2024
Mar 14, 2024
Mar 12, 2024
Mar 2, 2024
Mar 14, 2024
Mar 13, 2024
Mar 13, 2024
Mar 16, 2024
Mar 13, 2024
Mar 4, 2024
Feb 29, 2024
Jan 30, 2024
Mar 14, 2024
Mar 13, 2024
Mar 17, 2024
Mar 13, 2024

Repository files navigation

Breakout Game

Setup

In the console run pip install -r requirements.txt

One of my portfolio projects from 100 Days of Code: The Complete Python Pro Bootcamp

gameplay1

Project Approach

I started by outlining the flow of the game.  This included the starting and finishing GUI of the game, as well as the gameplay itself.  This covered the game's core mechanics, features and GUI.

As I researched into the features I wanted the game to have I realised the limitations of the turtle library, such as mouse control, game images, and most importantly game performance.  This led me to using turtle along with the tkinter and pillow libraries.

By using these libraries to show the game objects in place of the turtle objects, I was able to increase the game performance greatly, allowing me to incorporate all the game features I was hoping for, as well as more capabilities with game images as well as user mouse control.

Once I understood the game features and mechanics I was able to plan out my classes for an OOP design. 


What was hard, what was easy?

With a good amount of practice using these libraries now, the syntax was the easy part of this project.  The challenge was bringing it all together over the different libraries, while maintaining clean and organised code. 

Designing the ball's bounce physics was also a more challenging part of this project as I wanted the ball to have a full 360 degree range of motion that varied with the paddle contact location.  This involved many calculations as well as some trigonometry revision.


Biggest learning from today?

This project gave me a better understanding of an OOP design and keeping the code clean in the process.  This also led me to also learning more about creating classes to hold data, as well as working with enumerations.

Having to consider game performance each step was also a great learning experience.  As I added more features I had to assess what kind of control statements, methods, data structures, a algorithms I had to use to keep the game running smoothly while keeping all the features I hoped to include.


What would I do differently?

Although I'm happy with what I was able to achieve using the turtle  library,  I think using a library such as pygame  may have been a better approach considering the game features I wanted to implement.

gameplay3 gameplay2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages