The PlayerShip is now a separate class, inheriting from Ship. It takes a new argument spaceship_input which specifies which keyboard-keys run what action for the ship.
Input handling is now no longer done explicitly in the main-loop, but deferred to Universe.
Universe now takes multiple player-ships.
Depending on how many player-ship the universe has, it now implements splitscreen. The screen is divided into vertical bands for that. For a high number of players, this looks exactly as awful as you'd expect.
The current code has two players, one controlled with WASD/SPACE, the other one with arrow-keys/ENTER. Just remove one of the players from the player_ships array in main.py to go back to singleplayer :)
PlayerShip
is now a separate class, inheriting fromShip
. It takes a new argumentspaceship_input
which specifies which keyboard-keys run what action for the ship.Universe
.Universe
now takes multiple player-ships.Depending on how many player-ship the universe has, it now implements splitscreen. The screen is divided into vertical bands for that. For a high number of players, this looks exactly as awful as you'd expect.
The current code has two players, one controlled with WASD/SPACE, the other one with arrow-keys/ENTER. Just remove one of the players from the
player_ships
array inmain.py
to go back to singleplayer :)