Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

FunMaze

Sample video game with Delphi

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

FunMaze

https://github.com//gbegreg/FunMaze https://github.com//gbegreg/FunMaze

This project is related to the article published in issue 272 of the magazine Programmez! (french). It's a short game in which the player must reach the maze exit before the computer. The player will use the arrow keys to move their piece. Each time the human player wins, the CPU-controlled piece will move a little faster. From a coding perspective, we'll see how to:

  • generate a random maze (in 2D or 3D) but always with at least one possible solution;
  • implement the A* pathfinding algorithm that will allow the CPU to find the path to the exit.

The human player's piece (purple) will be repositioned at the bottom right of the maze each time, and the CPU's piece (green) will be repositioned at the bottom left. The maze and the exit position will be random.

FunMaze

(click the image to see the Youtube video)