Game Dev Engine #11. Maze Generation.

Опубликовано: 16 Февраль 2026
на канале: Jason Doucette
952
15

2023-10-07. I've been busy implementing a components system that includes a player & weapons ownership model along with physics, but it's not ready to showcase yet. My brother mentioned creating a maze generation program, which I had on my todo next list for simple showcase projects.

What you see is a basic back-tracing maze generation method. I first learned of this algorithm from C. Regena from the TI-99/4A Home Computer TI BASIC programming books. I developed this in TI BASIC, TI Extended BASIC, GW-BASIC, Turbo Pascal, and now, finally, in C# using the MonoGame framework which is based on XNA.

The implementation uses a C# co-routine using yield to return midway through generation, and an iterator to keep track of where it was. This is rather simple, but surprisingly adds a lot of complexity to the basic maze generation algorithm. If you look at my GW-BASIC videos, you'll get a sense of just how compact such an algorithm can be, when you don't have to twiddle around with GPUs and update/draw game programming patterns. Making this easy to do is one of the goals I have with my engine, the Xona System 8 -- but in general, having a canvas outside of the natural update/draw cycle is kind of hard to do without messy entanglement, while the BASIC languages makes it trivial.

More to come. I have ideas on how to turn this into a game that may actually be fun.

Playlists:
--------------
Xona System 8:    • Game Dev Engine #1. A New Beginning.  
Voxel:    • Voxel Engine #8 - Correct Peripheral Disto...  
Ray Cast:    • 3D Ray Casting Engine: #4 (Global Game Jam...  
Graph-All:    • #1 Graph-All Equation Renderer - Multiple ...  
Scroll Shmup:    • The First Pixel: Devlog #9 - Enemies, Anim...  
Road:    • Pseudo 3D Road #8 - infinite vegetation, t...  
Arena Shmup:    • Arena Shmup Demo #3 - Object Pool Optimiza...  
Wave Function:    • A.I. Texture Generation, High Res (Wave Fu...  
3D Polygon:    • 3D Polygon Engine #9 - Multiple Materials,...  
GW-BASIC:    • GW-BASIC - Escape From Monster Caverns - C...  

Websites:
---------------
GitHub: https://github.com/JDoucette
Blog: http://thefirstpixel.com
Studio: http://xona.com