Skip to content
Kris Petrič edited this page Sep 18, 2024 · 5 revisions

Introduction

A fun project I came up with to get started with embedded programming on STM32 platform!

KrisRaycaster is a game built for STM32 microcontrollers that have a screen available. I've used STM32H750B-DK discovery kit myself (128 KB flash, 1MB ram, 480x272 LCD-TFT, ARM Cortex CPU). If your board isn't powerful enough to run the game, you can still test it in the TouchGFX simulator on Windows or via SDL2 on any supported x86 platform (Windows, macOS, Linux).

Inspiration for the game are early 3D shooters, such as ID Software's Wolfenstein 3D. These were the days before graphics cards - everything was software rendered, blitting pixel by pixel without any (graphics) pipeline.

True 3D rendering without a GPU is quite slow, but ray casting is a very fast algorithm that could be easily used back then. It is considered 2.5D (pseudo-3D), since it simulates 3D visuals using a 2D map by casting a ray for every vertical slice of the screen until they hit a solid object.

This project is educational in nature, and though it can be further optimized, my primary goal was to learn the ray casting technique and familiarize myself with the STM32 development ecosystem. It's rewarding to create visually appealing results on a platform with limited resources compared to modern handheld consoles.

I hope to inspire you to tinker and explore further on your own!

Clone this wiki locally