Skip to content

LouisFriedmann/Dodgeball

Repository files navigation

Dodgeball

2D simulation of a 2-player dodgeball game in Python to be played by 2 players on a single computer. Player 1 is on the left side and Player 2 is on the right side. The goal is to get to 3 points. If player 1 throws the ball and hits player 2, player 1 gets a point. If player 2 catches it, player 2 gets a point. And vice versa. Then, the ball appears at a random point in the middle at a random time.

Player 1 controls: Moving- WASD, to hold the ball- hold Q down while overlapping the ball, to throw the ball- hold down Q and Z down while overlapping the ball until the arrow, which controls the direction of the ball, is where you want it. Then, let go of both keys and press X when the power meter, which controls how fast and far the ball goes, is where you want it. To catch a ball- hold X (not for too long or catching will be disabled for a short time)

Player 2 controls: Moving- arrow keys, to hold the ball- hold P down while overlapping the ball, to throw the ball- hold down P and L down while overlapping the ball until the arrow, which controls the direction of the ball, is where you want it. Then, let go of both keys and press m when the power meter, which controls how fast and far the ball goes, is where you want it. To catch a ball- hold R-shift (not for too long or catching will be disabled for a short time).

To run this: Have Python 3 or greater installed, place all of the files in this repository in the same directory on your own computer by downloading a zip file of all the files in this repository and extracting all files to the same directory, install the package "pygame", and run "dodgeball.py" with an IDE or through the command prompt.

About

Simulation of a 2-player dodgeball game in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages