3DSage's Raycaster in LOVE2D 11.4 + SOURCE
A downloadable game
3DSage over on YouTube created a 3 Part tutorial on how to make a Raycaster
engine in the style of Wolfenstein3D:
Although his code is for C and OpenGL I rolled up my learning sleeves and dove in to convert what he made into something that works in LOVE2D.
This is a rough prototype built on top of my own "base" engine code so not everything in the file is needed.
If you just want the Raycaster code that's all under the "game.lua" file. If you want to use the screen scaler and other bits you're welcome to, but they have nothing to do with the core concept of the Raycaster. (Though I think the scaler modifications I made were pretty nifty)
Overall I hope this helps some people out there get started and if you want more excellent content on how to make 3D stuff then http://www.youtube.com/@3Dsage is your guy!
Install instructions
Download the raw source.
Check it for viruses.
Run it in Love2D 11.4
Add/edit/etc as you need
Development log
- Small update - Better RendersJul 30, 2023
- Small Update - Texture GapsMay 22, 2023
- Added Textures and a map!May 20, 2023
- Updated RendererMay 05, 2023
Comments
Log in with itch.io to leave a comment.
I was trying to do this myself and was having a hell of a time converting the c to lua. Thank you so much for uploading this example!
You're very welcome! There is some code that only recently became available in LUA to match C code (like a goto statement that mimics C's "continue" command) so it was tough to figure out, but super fun.
I have also converted his first two DOOM tutorials to LUA, but since there's no third I've not bothered to upload it. So keep an eye out for that, too!