Log In  

Cart [#38056#] | Code | 2017-03-05 | License: CC4-BY-NC-SA | Embed
2

This is my first program for the Pico-8.
It is also my first piece of LUA code.

So far it is not really a game as there is no goal, no score, no nothing.
If you want to play, you can set your goal to reach the 4 corners of the maze (you start from the center).
Once you succeed, relaunch the game for another maze.

It is mostly a programming experiment in maze/labyrinth generation based on the book:
"Mazes for Programmers / Code Your Own Twisty Little Passages by Jamis Buck."

I did not reuse the code or data structure from the book as it is all in Ruby.
Only the algorithme description were reused, but still an interesting entry level programming book.

The game program does the following:

  • Create an full of wall 32*32 maze
  • Randomly carve a perfect maze without bias with the Aldous Broder algorithm (that is without bias but slow)
  • Display the full maze on screen using my sprite based display function
  • Wait for the C or X key
  • Display a map based maze with a player in the center
  • Let you travel the maze with the arrow key, scrolling as necessary the map keeping you in the center when possible

The code is more or less documented and the size of the maze can be modified in the code.

The maze carving algorithm can be switched to the binary tree algorithm.

I would love to have feedback on this to know in witch direction I should go for further evolution of this WIP

David Glaude

PS: This code was initially completely written on a Pocket C.H.I.P. (sometime with the help of a BT keyboard).

CHANGE LOG:
v01 = Initial release without cart image.
v0.1.1 = Updated with a cart image, no known code change.

P#38043 2017-03-04 16:26 ( Edited 2017-03-05 18:43)

:: jihem

Hi,
I worked on a similar subject : https://www.lexaloffle.com/bbs/?tid=28936
Kind regards,
jihem

P#38059 2017-03-05 13:43 ( Edited 2017-03-05 18:43)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-11-13 13:35 | 0.022s | 4194k | Q:22