Revisiting the AI in Halo: Flooded

 
 

For my Artifical Intelligence class, we were given the freedom to do an extra credit project where we would implement some of the concepts we learned in class to our own demo. This was an excellent opportunity to go back to my favorite project, Halo: Flooded.

The Problem

Halo: Flooded required some fairly complex pathing, and I wasn’t exposed to it at the time. If you have played the original version, you will notice enemies would have a hard time pathing to certain areas, and if you make it far enough into the game, it will usually lag due to the inefficent pathing algorithm I wrote. You can actually see the problem in the screenshot below.

I was getting 33fps with over 200 enemies pathing (not realistic gameplay conditions). On top of that enemies weren’t even pathing to the basement specifically.

How I fixed it

I rewrote my pathing algorithm to use an A* algorithm. I already had a waypoint system in place so those became the "PathNodes". After finishing my A* implementation, the enemies are able to path to the basement, and my FPS increased by over 300%! The results can be seen in the next image.

Afterwards, I did testing to see if the AI was more playable now. I noticed that my enemies were still having some issues pathing, and it was due to some doors in my game needing to be opened. I changed the waypoint system to support edges that are added when those doors are opened. Check out the following image to see the problem exactly, I will explain the parts of the image next.


Click for a larger image

If you take a look at the above image, you will notice the blue path where enemies enter. From there they used to try to take the red path to get to the basement, but failed and ended up getting bunched up where I marked the "1". After fixing this, enemies take the longer green path, because they do not know about the path through the door until the player opens it.

Overall, I am glad I was given the opportunity to reflect back on this project, and apply some new knowledge to it.

Check out the original Halo: Flooded post for more info and downloads.

Super Mario World in 3D

 
 

I just had to post this project. Not because its amazingly impressive or anything like that (it is programmer’s first 3d scene after all… haha), but for the feeling of nostalgia it will give those who have played Super Mario World. Or it could just be my love for the SNES/N64 era. Anyways, hope you enjoy parts of the first island in Super Mario World.

This project was my first 3D OpenGL scene, used to demonstrate my understanding of OpenGL.

I implemented a variety of techniques in this scene, including:

  • Vertex Buffer Objects
  • Shaders
  • Particle Effects
  • Cube Mapping

I modeled the geometry pieces in maya, and exported each as a .OBJ file which I was able to parse using basic file i/o in C++. Hope you like it!

Food Fight: The Breakfast Wars

 
 
Food Fight: The Breakfast Wars was a 2 month project created halfway through Full Sail’s Game Development degree program.  I worked with 3 other teammates, all programmers, to design and create a game using C++ and DirectX.  I was also worked with C#, creating tools to aid in the development process.

Food Fight plays like an RTS with many unique elements.  Each player is given a stove and a set amount of ingredients to cook with.  The player must cook breakfast food items found in a recipe book.  The player does this by adding ingredients to a pan, and performing gestures.  When the food is done cooking, the player takes it off the pan, and it comes to life for the player to command around the map.  The player must balance collecting resources, cooking, and attacking to eventually overtake the enemy’s stove. You can even play versus a friend over LAN!

Programming Responsibilites:

  • Created Tile/Map Editor using C#
  • Exported Maps in binary format
  • Created Network Manager and all network communications through UDP
  • Programmed 3 special abilities for each unit, each one being unique
  • Created the cooking simulation which used gestures and realistic cooking conditions

Leadership:

  • Wrote user stories at the beginning of each 2 week sprint
  • Created and managed an SVN server to ensure everyone had access to what they needed

Sprint Progression

Sprint 1

Sprint 2

Sprint 3


Final Product… and it’s in Spanish too!

The World Editor

My favorite part of the development process was working on the world editor.  The editor I created was capable of:
  • Laying out tiles
  • Defining collision properties
  • Creating a waypoint system for unit pathfinding
  • Placing game objects anywhere in world space
  • Giving properties to game objects at design time
Here is a screenshot of what my editor looked like:

Click for larger image
Check out the design document for the editor at the bottom of this post.

Challenges

Networking was by far the most difficult feature to implement.  I hadn’t taken any networking course prior to this project, but I did quite a bit of independent research before deciding to add that as a feature to our project.  Even the course instructors were reluctant to let me attempt networking an RTS in one of my 2 week sprints.  I started by doing a “Spike Solution” to prove the network manager I started writing.  After developing that, I planned out all the packets I would need and diagrammed how the clients would communicate peer-to-peer.  In the end, it just worked, and I am happy to give players the functionality of a 1v1 match. Plus this was one of the few networked games in SGP history. Awesome! Ohh, and the “Wheel of Misfortune”.  This was a way for our instructors to throw us curveballs in the middle of the project.  Right before the last sprint, the wheel determined we had to localize our game for Spanish users. Luckily with some minor modifications of code, and the help of Google Translate, we were able to get this feature implemented very quickly.

Downloads and Additional Material

Map Editor Design Document
More Downloads coming soon!