Skip to content

cullivank/basketballgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

basketballgame

Final Project

Introduction

So this is my final project. It is a simple enough basketball game where you shoot the ball into the hoop. There were some challenges in making this game, but overall I didn't find it too challenging. The biggest thing was figuring out what I wanted to do that wasn't something that I kinda knew already or went over in class. For the most part, this program was a lot of basic shapes and loops. There were some more complicated thinking that went into making the hoop and the actual shooting of the ball, but I figured that out relatively easily. I COULD NOT figure out the p5.js libraries and how they work... makes no sense to me. I watched at least ten videos on it, tried using different libraries (p5.sound, p5.play, etc.) but just couldn't figure it out. I then tried to make the ball 3D, but when I did that (using sphere()), for some reason it zoomed in on the ball and only focused on that. So I scrapped that idea. I ultimately went with using the millis() function as my kinda outside-of-class portion of it. I know we went over it in the book but I had never actually used it. This was a fun, and at times frustrating project, but I feel like that is how most of the semester has gone.

Instructions

Basically all you have to do is start the program, click anywhere to have the shot meter line thing appear and then drag your mouse to the desired x / y coordinate to adjust the arc and strength of the shot, and release. The ball will either go in the net or not, and if it does it will randomize the next location of the shot. If it doesn't, it will return to the same spot that it was just in until you make that shot. The background "sky" will turn from teal to violet to black after 10,000 and 20,000 milliseconds, respectively.

Credits

I worked alone on this project but I would like to credit Mark and also my girlfriend Hannah (aka Hammy) for helping me troubleshoot and vent about this project.

About

Final Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published