Development Blog

Turn-Based Strategy Project Devblog Series: Entry #3

Another week goes by! Wow time sure does flies fast! Can’t believe that Ludum Dare 49 is almost here. This also means that don’t expect a devblog update for next week since my focus this week will 100% be for the upcoming Ludum Dare GameJam.

Last entry we set up some objectives to accomplish and I can happily say that all of them (well, almost all of them) have been succesfully achieved!

Take a look on how’s the project looking:

So, let’s go step by step and take a look on everything that has evolved.

First and foremost, you can see a new map has been used, instead of the placeholder one from the last entry. This map layout will be one of the few maps that’ll be available in a future version 1 of this project. I’m aiming for the version 1 having 3 different map layouts.

Second, we can see that we have sucessfully implemented a pathfinding system, along with a a indicator showing how far that unit can move. For the pathfinding, I want to thanks quill18creates for his amazing tutorial on how pathfinding works. Basically we used the Dijkstra’s algorithm to calculate the path a unit would take to reach it’s target position. We could’ve used an A* algorithm for the same purpose but it’s a little bit more complex to implement and, for the first iteration of our project, Dijkstra’s algorithm would do the job just fine for just a little bit of loss in the project’s performance.

One of the points that we made for our last entry is that we would have a walking animation whenever you moved a unit. However, after going back-and-forth on this, I’ve decided to scrap that. I feel like snapping to the tile selected would just feel better for the player. If I feel like extra polishing later on I could add a walk animation but for now I like how it feels right now.

A issue that you may have with the map above is the grey tiles obstructing your view. That’s why we added options to rotate our camera! Check it out:

Later on, I feel like I could add a outline whenever a unit is behind a tile obstructing it’s view, just to remind the player that you have a unit hidden behind that tile. However, for our prototype, it’s not in the pipeline at the moment.

So, basically we achieved (almost) everything AND more for our last entry target goals. We do have a 2 player units set up BUT Turns are not implemented yet.

Also the unit can take more than 1 movement action per turn since turns are not implemented. Basically we want that each unit can take a movement action AND a attack/magic/wait action in the same turn. For this, our goals in the next updated entry will be:

  • Add Turns to the game. Not allowing units to move more than once per turn.
  • Don’t let Player 1 control Player 2 pieces and vice-versa.
  • Add a basic prototype GUI for when you select a unit. Allowing you to select “Move/Attack/Magic/Wait” options, with “Move” being greyed out if the movement action has already been taken.

This will be a interesting challenge because I’ll need to add a Game Controller script to handle the Turn events and also “redo” the Unit Controller to allow it for different types of actions, instead of just moving around.

I do want to point out that the next updated entry on this will probably not be next week. That’s because Ludum Dare 49 is coming up and my attention this week will fully be for the upcoming game jam. That’s why we’ll have a delay on the next updated entry. However I do appreciate all of you who have been reading through these entries. I’ll add more info on the Ludum Dare project on this website later on, so hopefully you’ll want to check it out 🙂 Thank you for reading all of this.

Leave a Reply

Your email address will not be published. Required fields are marked *