A* / OGRE 3D Demonstration

 

Project: A* / OGRE 3D Demonstration

Development Time: 2 Weeks

Current Status: COMPLETED

Tools Used: Microsoft Visual Studio 2008

Language: C++

SDK: OGRE SDK 1.6.4

Project Downloads: VS 2008 Project (Must be built in Release configuration), Binaries

Code Snippets: OgreAStarExample.cpp, DefaultFrameListener.cpp, PathFinder.cpp



Project Description:

This project was born from the necessity to learn more about pathfinding and AI in general. I wanted to see what sort of algorithms where used to produce an “autonomous” game entity.

My research led me to the A* algorithm. I found many explanations and examples as I researched, but nothing really showcased the algorithm in 3D environment. I found an version of A* written by Justin Heyes-Jones (http://www.heyes-jones.com/astar.html) that had a very well done algortihm implementation, but gave very limited view of the algorithm in action.

As such, I took the code Justin had written and modified the code which utilized the algorithm. My implementation was a bit more object-oriented and modular, whereas Justin’s code was a bit more “proof of concept”. I then created a scene in OGRE and used Justin’s actual A* algorithm combined with my surrounding implementation in order to have an entity navigate my maze.

As it stands now, this robot entity will traverse the maze towards a waypoint. Upon reaching his waypoint, the robot will select another random location in the maze, set it as a waypoint, and repeat the process. I believe this project showcases my knowledge of linear algebra, 3D programming, as well as my ability to adapt code in order to use it in different ways.

Videos: