WIP : Simple 3D/2D retro Volley-ball game written from scratch with Pygame and Python3.
Check Projects page on Github to see progress !
human player (left) V.S. bot (right)
Game inspiration: Super Soccer SNES
- Debug display with simple shapes, not sprites yet
- Play against a human player or a bot !
- Basic actions:
- move
- jump
- smash
- serve
- throw ball
- dive
- pause game
- move camera (debug purpose)
- Rules (1V1):
- ball does not touch ground in player area
- ball does not cross space under net
- player can touch a maximum of 3 times the ball consecutively
Notes:
- Ball trajectory is controllable in these actions :
- throw
- smash (depth only)
- serve
- To change team composition, you must change code in
src/Engine/game_engine.py
increate
method:
teams composition | code to change |
---|---|
human (keyboard) vs human (joystick) | self.new_game([PlayerId.PLAYER_ID_1, PlayerId.PLAYER_ID_2]) |
human vs bot | self.new_game([PlayerId.PLAYER_ID_1, AIId.AI_ID_1]) |
bot vs bot | self.new_game([AIId.AI_ID_1, AIId.AI_ID_2]) or self.new_game() |
Keyboard and Gamepad are supported. For gamepad, button binds could be different depending on your device button layout. You still must hardcode for joystick use.
Action | Key (keyboard) | Button (gamepad) |
---|---|---|
Move or Aim during ball throwing | ZQSD | POV, D-PAD |
Jump | I | 2 |
Throw ball or Smash | J | 1 |
Dive to catch up ball (after smash...) | L | 3 |
Move camera | Arrow Keys | Right joystick |
Re-throw ball | Space bar | 4 |
Quit game | Esc. | 9 |
Pause game | P | 10 |
You can manually change button binds in src/Settings/input_presets.py
(pygame code key).
- python3
- pygame 1.9.5
- pytest to run tests (optional)
cd src/
python3 main.py
py.test .
The code is under the MIT license terms.