Inspiration

We were inspired by classic maze games and beginner-friendly programming tools like block-based coding platforms. We wanted to combine logical thinking with gameplay in a way that feels simple, interactive, and educational. Instead of directly controlling the character, we thought it would be more interesting if the player had to “program” their way through the maze.

What it does

LogicMaze is a block-based maze puzzle game where players reach the goal by building a sequence of commands.

Instead of moving the character manually, players use commands like:

Move Forward Turn Left Turn Right

Once the program is built, the player clicks “Run” and watches the character execute the instructions step by step. Players must plan carefully, especially since they have a limited number of blocks available.

The goal is to reach the finish tile without hitting walls.

How we built it

We built LogicMaze using:

HTML for structure CSS for styling and layout Vanilla JavaScript for game logic

The maze is represented as a 2D array where:

0 = empty space 1 = wall 2 = goal

We tracked the player’s position (x, y) and direction (up, down, left, right). Commands are stored in an array and executed sequentially using an asynchronous function with a delay, allowing smooth step-by-step movement visualization.

The interface is divided into two sections:

Maze grid Command builder panel

Everything runs directly in the browser without external libraries.

Challenges we ran into

One major challenge was synchronizing command execution with visual updates. We needed to ensure that each command executed one at a time with a visible delay.

Handling direction changes correctly (left/right rotation logic) was another tricky part, as we had to update movement behavior dynamically.

We also had to carefully manage state resets when the player hits a wall or completes the level.

Accomplishments that we're proud of

We’re proud that:

The game runs fully in the browser without external libraries. The command execution system works smoothly and visibly step-by-step. The limited block system adds a strategic element. The UI is clean and intuitive for beginners.

Most importantly, we created a working logic-based game with a clear and unique mechanic.

What's next for LogicMaze

In the future, we would like to:

Add multiple levels with increasing difficulty Introduce new command blocks like “Repeat” and “If Path Ahead” Add animations and sound effects Implement a level editor Expand it into a small educational coding platform

We believe LogicMaze could grow into a beginner-friendly tool that helps students learn logical thinking and programming fundamentals through gameplay.

Built With

Share this project:

Updates