https://github.com/shreyas9699/2d_ray_casting
A simple 2D Ray casting using SFML
https://github.com/shreyas9699/2d_ray_casting
cpp gamedev raycasting raycasting-engine raytracing sfml
Last synced: 7 months ago
JSON representation
A simple 2D Ray casting using SFML
- Host: GitHub
- URL: https://github.com/shreyas9699/2d_ray_casting
- Owner: Shreyas9699
- Created: 2024-06-22T09:07:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-22T09:20:53.000Z (over 1 year ago)
- Last Synced: 2024-06-22T18:51:31.551Z (over 1 year ago)
- Topics: cpp, gamedev, raycasting, raycasting-engine, raytracing, sfml
- Language: C++
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2D Ray Casting
This repository contains a 2D Ray Casting implementation, which is a technique used in computer graphics to simulate the way rays of light interact with objects in a 2D environment. It is often used in game development and simulations to create realistic lighting and shadow effects.
## Prerequisites
### General
**SFML**: You need to have the SFML library installed on your system. You can download it from [SFML's official website](https://www.sfml-dev.org/download.php).
Follow the configuration instructions provided on the [SFML-VC-Config page](https://www.sfml-dev.org/tutorials/2.6/start-vc.php)
This will guide you through the process of installing and configuring SFML for use with Visual Studio C++.### Opening the Project
1. **Clone the repository**:
```sh
git clone https://github.com/Shreyas9699/2D_Ray_Casting.git
cd BeginCPP
```2. **Open the project in Visual Studio**:
- Navigate to the `BeginCPP` directory.
- Double-click on `BeginCPP.sln` to open the project in Visual Studio.### Running the Application
- Build the project in Visual Studio.
- Once built successfully, you can run the application by pressing `F5` or clicking on the "Start Debugging" button in Visual Studio.
- A window will open displaying objects. Move the mouse pointer to simulate the light source.
- Rays will emit from the mouse pointer, and intersections with objects will be visualized.## Contributing
Feel free to submit issues and pull requests. Contributions are welcome!