Pathfinding & Animations
Disclaimer: The images, artwork and sprites in this devlog are not the final draft and are designed for testing purposes. It will look different, maybe.
Greetings friends! Welcome to our second Development Blog for our first title Commuter: The Game.
Before we dive right into the content. I just wanted to take a moment to thank everyone on their warm welcome to the game. Our post on the r/tycoon subreddit and the comments we have received on our Instagram and Twitter pages has been so heartwarming! It really is motivating to see such a good response from a game that is just in its early stages. This also will keep me motivated! So thanks everyone!
Okay, enough of the sappy stuff.
As I promised on Reddit. I thought I would dive into a little bit more of the gameplay and how it works. Keep in mind, what I say below might change during the development process
Commuter is intended to be a top-down style 2D game. This is where the comparison to Airport CEO and Prison Architect come into play. Those style games are something I have always enjoyed and in fact their stories of their development is what inspired me to do this.
When the game starts out the user will be met with a menu in the style of a transit map you would see on any subway system. The user will be responsible for managing this “map.” Each station is a tap-able object that will enter you into the station where further management will come into play.
Once a certain threshold has been reached. The user will have the ability to unlock the next station in the line. The game will increase in difficulty and as you progress down the line more and more challenges will come up.
On top of all this there will be an event system. Think of like a sports event or parade. These will increase ridership and the player will be responsible to managing the line in an efficient way.
Line management will have three main measurements
- Rider Satisfaction/Safety
- Train Frequency
The user will be responsible for managing the ticket prices, setting the frequency of trains (more frequent means more breakdowns and maintenance cost), and ensuring the riders are comfortable and safe.
There will be more to come as it develops but I hope that gives you an idea of what the gameplay will consist of.
Pathfinding and Animations
This week we have been really focusing on ensuring the NPC sprites in the game know where to go and don’t get stuck. If anyone who has a tiny bit of coding knowledge you would know that Pathfinding can be incredibly complicated to code.
The other tricky issue here is that a lot of pathfinding tools are meant for a mouse click or tap style path. (I.E Tap the screen and the player goes there. Or something like that).
This game has multiple targets that the NPC sprite has to find from start to finish. Not only that the sprite has to wait for doors and clearance to board. So, yeah, this took WAY more time then I wanted. After about 1000 lines of code (and counting) between 4 scrips the pathfinding base is complete.
Now that the base is complete, pathfinding will just consist of calling some code and the engine will do the rest. Tedious but important step for this game.
Next step is to work on level development and get some of the gameplay engine going.
As always, please follow us on Twitter or Instagram for more photos and videos. You can also check out our Discord where I hang out while making the game. We also have a subreddit if that’s more your thing.