EC327 Summer 2023 Project
This repository is a demo of a raycast game engine. Similar to the game engine used in the original Wolfenstein 3D game by id Software back in 1992. Raycasting is a method to produce a pseudo three dimensional game world. This is achieved through rendering a 2D game world map into a first persion 3D view by casting rays from the player into the 2D map and drawing a 3D-esque first person world view based on the distance of the rays. Our implementation fully utilizes OOP practices as seen by the formulation of player, map, and renderer engine classes. We also utilize CMake to allow this repo to be easily compiled and debugged across platforms. This implementation of the raycasting algorithm also allows for a map editor in which the map is a gridworld. However, with this current implementation collision detection is not yet possible.
Authors:
- Roy Xing
- Junny Myung
- Alexa Wiencek
SFML is required. For Unix systems you can install it with your preferred package managers. For example, for Ubuntu:
sudo apt install libsfml-dev
For Windows systems you need to install SFML through their website: https://www.sfml-dev.org/download.php. As this project utilizes CMake, which is a cross-platform build system generator, it should be possible to build this project regardless of OS (platform agnostic).
First, you need to clone this repository to your local machine.
git clone https://github.com/RX-00/raycast
Next, we need to go inside the main directory and build the project.
cd raycast
mkdir build && cd build
cmake ..
cmake --build .
If you want to remove the build and rebuild a new version of the program use the following command and then go through the building process again.
cmake --build . --target clean
Within the build directory there should be an executable file that you can now run with the following command:
./raycast
Alternatively, you could use the bash script in the main (root) directory to clean, build, and run the program:
./bash_build.sh
The companion repository for the CMake: Building SFML and Game Projects on Linux article.