This is a raycaster template to help you make your own 3d game in PICO-8. I might make a manual on how to use it at some point, but for now you can skim through it to see how stuff works.

Some notes before you start:

1. You can switch to using 8x8 textures for walls, just uncomment the section under 8x8 in the raycaster tab, and comment the stuff under 16x16

2. The fog sprite (for when a ray reaches the max draw distance) is set to 16 be default. To change, adjust the "FOG_SPR" variable in the raycaster tab.

3. To get the world space values from map space, multiply by 8 and add 4. It should look something like: world x = (map x * 8) + 4.

4. To draw a sprite, add it to the sprites table.

5. There are still some bugs with drawing a ray in the wrong direction, but it's rare enough that I'm not too worried about it.

StatusReleased
CategoryTool
PlatformsHTML5
Rating
Rated 4.5 out of 5 stars
(2 total ratings)
AuthordoughnutTheDev
Made withPICO-8
Tags3D, First-Person, PICO-8, Pixel Art

Download

Download
raycaster.p8.png 10 kB

Install instructions

To open the project in PICO-8:

     -Download raycaster.p8.png

     -Open PICO-8 and enter the command "folder"

     -Move raycaster.p8.png into the folder that just opened

     -Back in PICO-8, enter the command "load raycaster"

Leave a comment

Log in with itch.io to leave a comment.