Skip to content

An implementation of the raycasting algorithm using Python and Pygame (+ Portal)

Notifications You must be signed in to change notification settings

Fer14/pyortal

 
 

Repository files navigation

PyOrtal - Ray Casting with Python and Portal

vid3d.mp4

How to run

  1. Clone the repository:
git clone [email protected]:Fer14/pyortal.git
cd pyortal
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the game:
python app.py --mode 3

Replace 3 with 2 for 2D mode.

vid2d.mp4

How to Play

  • Movement: Use the arrow keys to move around.
  • Jumping: Press the space bar to jump.
  • Shooting Portals:
    • Press A to shoot a blue portal.
    • Press D to shoot an orange portal.
  • Menu: Press Q to open the in-game menu.

Game Modes

  • --mode 3: Play in 3D mode.
  • --mode 2: Play in 2D mode.

Menu Settings

  • Field of View (FOV): Adjust the FOV for a customized perspective.
  • Portal Images: Toggle whether portal images are displayed.

Acknowledgments

Original inspiration from https://github.com/Magoninho/raycasting-python.

Built with Pygame for game development and Typer for CLI options.

About

An implementation of the raycasting algorithm using Python and Pygame (+ Portal)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%