An open API service indexing awesome lists of open source software.

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

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!