Log In  


Cart #puniyasaba-0 | 2024-05-08 | Embed ▽ | License: CC4-BY-NC-SA
10

Generates a random maze, then places the player in the middle of it and ensures that you're not staring straight at a blank wall. Find your way to one of the corners and it will reset with a new maze and plonk you back in the middle. Not really intended as a game, just a learning exercise for me and the hope that the code will be of use to someone with more creativity than myself:)

Controls

Arrow keys to move forward/backward and turn.
Z/X will sidestep left and right
Hitting 'P' at any time will generate a new Maze and place the player in the middle of it.

Background

This is an extension of my previous raycaster. I had to adapt the raycaster logic a bit to handle the maze walls rather than a grid based map.
This runs consistently at 60fps on my pc with 2:1 horizontal scale (i.e. 240 rays). You can change the 'scale' global variable to 3 if you have a slower machine.
The maze generation logic is a 'recursive backtracker'. Based on Dan Shiffman's excellent JavaScript tutorial on youtube here.

10


this is great, can we collab, if not, that's fine


Picostein is slowly becoming more of a real thing. I mean I get there already is one on PICO-8 but this is coming close to looking like the original.


@343ediew, what do you have in mind?


@WDDETER, it's definitely possible. I bet someone is already working on it:)
The difficult thing will probably be texturing the walls efficiently. Picotron is faster than pico-8, but then your environments and graphics are generally bigger and higher resolution, so it can sometimes feel slower than pico-8.


well, I can do the music but I need to know how to work the music built-in tracker


@343ediew, OK. I don't really have plans to turn this into a game. I'm just playing around with Picotron at the moment to get used to it. So mostly just doing tech demo type stuff to learn the language, limitations and how to optimise things.
Maybe we could work on something together at a later stage when we're both more familiar with it and Picotron is a little more stable.


sure! sounds great.



[Please log in to post a comment]