Selection of maximum tiles to walk

Discuss game development design and post your game ideas

Post » Tue May 10, 2016 4:43 pm

Image

Hi, I do not know how to explain the problem or how to look for a better solution for him.

I am creating a turn-based game, and the characters can walk in L between 1 and 6 tiles per turn.

I managed to create the tiles selection around the character, but could not find a solution to block the tiles that it does not reach, if there is a blockage.

https://dl.dropboxusercontent.com/u/130 ... index.html
In this example I made with pathfinding, it shows how it should work in theory, but it is not feasible every time selecinar a character to show the area to reach, take all this time my example.

My tests:
https://dl.dropboxusercontent.com/u/130 ... inder.capx
https://dl.dropboxusercontent.com/u/130 ... nder2.capx

I could explain my problem?
Is there any solution?

Regards.
B
5
S
2
Posts: 10
Reputation: 691

Post » Tue May 10, 2016 6:03 pm

Take a look at this exellent solution:

alextro wrote:Updated my sample (first page) with better optimization.

Also made interactive version from R0J0 example: pathfind_drag.capx

Image



All in here : flood-fill-and-path-finding_t170394?start=10
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed May 11, 2016 3:43 am

Yes as @99Instances2Go said, check the capx in 2nd post of mine from the topic that showcase movement range and blockage (blockade?).
alextro wrote:@fisholith
Great references you got there. Interactive demo from Pathfinding.js sure teach a lot with various algorithms.
And cool video demonstrates alternative method to achieve it.

I am about to implement the case for existing flood-fill range demo: https://dl.orangedox.com/UkkZMMQmTfgSKdbeYx
Actually that would be first part of tutorial (perhaps in future).
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 1 guest