Skip to content

Commit

Permalink
updated the readme file and added a preview gif
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrykovsky committed Jan 17, 2024
1 parent 34c4675 commit 1a28455
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# python-raycaster
A simple raycaster written in Python using Pygame.

## Usage
## Preview
![Preview](preview/preview.gif)

## Installation
Clone the repository.
```bash
git clone https://www.github.com/pietrykovsky/python-raycaster.git
```

Create a virtual environment and install the dependencies.
```bash
python -m venv venv
Expand All @@ -20,7 +28,41 @@ Install the dependencies.
pip install -r requirements.txt
```

## Usage
Run the program from the project root.
```bash
python -m raycaster
```

## Controls
- `W` - Move forward
- `S` - Move backward
- `A` - Move left
- `D` - Move right
- `ARROW LEFT` - Turn left
- `ARROW RIGHT` - Turn right
- `SPACE` - Shoot
- `ESC` - Quit

## Settings
The settings can be found in `raycaster/core/settings.py`.

To change the resolution, modify the following variables:
```python
# GAME RELATED
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
```

Change the volume:
```python
# 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:
```python
RAY_COUNT = 200
```
Binary file added preview/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1a28455

Please sign in to comment.