Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Procedural Pacman  (Read 2087 times)

0 Members and 1 Guest are viewing this topic.

unlight

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Procedural Pacman
« on: March 01, 2019, 12:56:50 pm »
Hi guys,

I have recently started developing my first proper game using SFML, it is going to be a Pacman clone that uses procedural generation to produce randomised maps. At this stage I have just finished working on the map generation algorithm which consists of three stages:

The Obstacle Map - uses recursive backtracker to produce a grid of number-clusters.
The Collision Map - treats number clusters as obstacles, adds traversable paths between them.
The Game Map - Assigns type to path cells (i.e. dot/intersection/player/etc).

I created a generic tile set image that contained all of the possible obstacle shape segments and wrote a nearest-neighbour algorithm to dynamically build a tile map to match the collision map data. The results of the algorithm can be seen in the attached image.

I am now moving into the game logic itself, which I will post updates on. Part of my motivation for this project is to gain experience with some programming patterns that i will need to know for another project in the future, so I expect this game to be very over-engineered by the end.
« Last Edit: March 05, 2019, 10:56:10 pm by unlight »