https://github.com/mizrael/monoraycaster
simple Raycaster implementation in C# with Monogame
https://github.com/mizrael/monoraycaster
dotnet gamedev monogame raycasting
Last synced: 2 months ago
JSON representation
simple Raycaster implementation in C# with Monogame
- Host: GitHub
- URL: https://github.com/mizrael/monoraycaster
- Owner: mizrael
- License: mit
- Created: 2025-07-11T07:26:37.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-31T20:45:59.000Z (3 months ago)
- Last Synced: 2025-08-17T07:43:19.887Z (2 months ago)
- Topics: dotnet, gamedev, monogame, raycasting
- Language: C#
- Homepage:
- Size: 477 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MonoRaycaster
Simple raycaster implementation in C# using Monogame. The code is based on the well-known [article by Lode Vandevenne](https://lodev.org/cgtutor/raycasting.html).
The base implementation with no textures uses a `Color` framebuffer, rotated by 90 degrees. This allows setting the pixel data by row instead of column, avoiding expensive index calculation and inner loop.
`Span` is used to speed up data access.
The textured implementation still renders the map rotated by 90 degrees, and applies some caching strategies to minimize I/O operations.

It is also possible to render a minimap showing the view cone:
