A simple raycaster written in Python using Pygame.
Clone the repository.
git clone https://www.github.com/pietrykovsky/python-raycaster.git
Create a virtual environment and install the dependencies.
python -m venv venv
Activate the virtual environment.
# unix based:
source venv/bin/activate
# windows:
venv\Scripts\activate
Install the dependencies.
pip install -r requirements.txt
Run the program from the project root.
python -m raycaster
W
- Move forwardS
- Move backwardA
- Move leftD
- Move rightARROW LEFT
- Turn leftARROW RIGHT
- Turn rightSPACE
- ShootESC
- Quit
The settings can be found in raycaster/core/settings.py
.
To change the resolution, modify the following variables:
# GAME RELATED
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
Change the volume:
# SOUND RELATED
MASTER_VOLUME = 1.0
MUSIC_VOLUME = 0.25
EFFECTS_VOLUME = 0.5
If you suffer low FPS, try to change the RAY_COUNT
variable and decrease the ray count:
RAY_COUNT = 200