Archive for July, 2011

Data Driven Programming & Dijkstra Pathfinding

July 24th, 2011 No comments

Coming up in about three weeks, I am to program a recreation of Pac-man. This is a fairly big step up from a simple arcade game like Breakout. I have previously worked with pathfinding in a 3D space using the Unity engine, although I must admit that Unity did a lot of the work for me. Here, I am using SFML and Dijkstra’s pathfinding algorithm to find the shortest route in a level.

Additionally, I am using data driven programming for my level design, which is automatically processed at the program’s run-time to generate path nodes as well as different level blocks depending on neighboring wall blocks.

In the above example, I am rendering a 22×23 block level imported from a text file. What I have done over the past two days is create an automatic map importation system, as well as designing the path finding calculation class myself.

As you can see, there isn’t much interesting to show yet, although what I’ve done so far will significantly shorten my development time due to project automation. As I have no other assessment for other classes due for a while I should have plenty of time to make a start on Pacman. I am not yet sure how the four ghosts will cope with the pathfinding, as well as how I can make them seek individual paths, but that is yet to come.

Categories: Me, Programming Tags: