Development · Games

We Have Movement!

So for the past few days I’ve been working on a path finding algorithm to allow my characters to move around the ship. You simply select the character(s) you want and click somewhere on the ship to move them to that location. Sounds simple enough? Well not so much.

Firstly, determining the shortest path to your goal. Many algorithms can do this, and luckily my game is based off of a gird that doesn’t contain cycles so a simple DFS was sufficient enough to find my paths for me. These are returned back to my movement event which then uses the path to calculate the direction vectors for my character to move along to.

That is when things get tricky. Making sure the character stays in bounds and follows your path precisely. Took a few hours to perfect the code, and eventually it started to work! Yaaay!

So next plans:

  • make better pictures to work with – so moving through the ship is a bit more intuitive since right now my grid doesn’t quite fit onto the ship
  • add room functionalities – different parts of the ship have to perform different tasks, and now is the time to get that set up
  • add weapons – cannons for long range shooting
  • AI – get the enemy ship to shoot back!

future plans:

  • Get the enemy to board your ship  and have some melee combat
  • ports! Cant forget that I need to replenish supplies and land somewhere

So there you have it. The progress is going well and there is always lots of things to do! Also, unfortunately since my update isn’t very visual, no pictures :(

BUT since I plan on redoing some of the graphics as my next step, next update shall be a bit more visual!

Mickey Signature

Leave a Reply