Graal Seeker is a 2D game that blends RPG with roguelike mechanics and real-time tactical battles. It recreates the initiatory journey of a knight seeking the Holy Grail in fifth century Britain. Seek the Graal in a medieval Britain. Find your Graal based on the choices you make. Build a team and choose how to evolve your character. We are currently running a greenlight campaign, please support us!

Report article RSS Feed Devlog on pathfinding

Here are some animated gif on the wip pathfinding we are working on.

Posted by loudo on Jul 23rd, 2014

Hi folks,

This is a devlog about the pathfinding in Graal Seeker. In this article I will show you some animated gif with wip animations. I would to apologize in advance for the poor quality of the gif, you should know as well that it's only 10 fps. Furthermore, you will see green and red dots I use for test purpose. The green dots show the path and the red dots show the not walkable tiles. Anyway, it's been a long time since I showed you some animations so I hope you like it.

But first, how the pathfinding works here? It's a basic A Star pathfinding that excludes not walkable tiles. We store all tiles of the path in the correct order. We calculate the vector between the current position and the very next tile and calculate a movement step with which the movement engine will move the character at each frame.

Now, let's see the current state for the implementation of the z-ordering. Every time a character reaches a tile, the z-order list is updated. You can see the character walk behind and ahead the trunk.

Z order test

Then, during a movement the player can change his mind and request for an other destination. To have something smooth and to keep the characters aligned with the centers of the tiles, we only update the destination when the player clicks, and we wait the character reaches the next tile before recalculating the path. This is why we don't calculate the vector and the movement step with the destination tile, and we use the next tile instead. Here, you can see the path change each time I click.

dynamic path test

Finally, we can't let the characters go at the same destination. So, we recalculate all paths at each frame. We always set the next tile of the movement as not walkable. You can see here a character interrupt the movement of an other character.

dynamic path test 2

Thanks for reading :) Next time, I will present you some characters of Graal Seeker.

Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Graal Seeker
Windows, Mac
Custom Built
Send Message
Official Page
Release Date
Game Watch
Track this game
Report Abuse
Report article
Related Games
Graal Seeker
Graal Seeker Single Player Roguelike
Related Engines
Custom Built
Custom Built Commercial Released Sep 1, 2007
Related Groups
Indie Devs
Indie Devs Hobbies & Interests group with 1,176 members
Lugludum Developer