Log In  

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

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.

P#148105 2024-05-08 04:17

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

P#148174 2024-05-09 13:45

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.

P#148206 2024-05-10 00:57

@343ediew, what do you have in mind?

P#148210 2024-05-10 03:30

@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.

P#148211 2024-05-10 03:33

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

P#148220 2024-05-10 12:05

@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.

P#148258 2024-05-11 02:42

sure! sounds great.

P#148355 2024-05-13 14:20

[Please log in to post a comment]