Andrew Mushel

 

Ghost Rustlers

Summary

JavaScript Gameplay Programming

What I did

For this project, I decided to focus primarily on learning about path-finding and graph traversal algorithms. Since I had never done that before, I went through a few different resources to familiarise myself algorithms like breadth-first search, Dijkstra's, and A*, adapting them to use map format similar to what the game itself used (a one dimensional array of integers).

Once I had that working, I immediately encountered a problem integrating it with the game: Ghost Rustlers is a side-scrolling game, so character path-finding is limited by gravity as well as tile value. This was another novel problem (from my perspective) for me to solve.

After some research, which, I eventually realized that this was not an algorithm problem; it was a data structure problem. Understanding that, I wrote a simple function to generate path-finding graphs from the level data, given a relatively simple set of rules defining legal nodes and connections.

Since I was also working on character movement and simple enemy behavior at the same time, I was able to add these rules as I added new movement functionality (e.g. hopping up one tile ledges, jumping over 1 tile gaps, and climbing ladders).

Credits

Path-finding and nav graph generation from map data, player/enemy movement, AI follow/attack behavior, nav debug support, health bars/name tags/stylish hats, input refactor, movement cursor logic, aiming reticle improvements, Mouse/keyboard camera pan control/auto-pan to active character movement, new platform collisions, tumbleweed bug fix, cacti tweak, assorted bug fixes