Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pathfinder #648

Merged
merged 4 commits into from
Dec 22, 2023
Merged

Add pathfinder #648

merged 4 commits into from
Dec 22, 2023

Conversation

mprevel
Copy link
Contributor

@mprevel mprevel commented Dec 3, 2023

Hi,

This is a pathfinding algorithm as discussed in #646

It took me a little bit more time than what I was expecting.

Please let me know if you have questions, comments or want some changes about it.

Regards,

Copy link
Member

@davesmith00000 davesmith00000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the slow review. This looks great! 🚀

I've left a few minor comments for your consideration - mostly just for style / consistency. I think the next things are:

  1. I'd like to see it working / have an example to turn to for reference. Usually at this point I'd set up a scene in the sandbox, maybe just a simple grid and have it solve and show coloured boxes for the path or something. I can do this if you'd rather not.

  2. Decide whether or not to just remove the old search grid. I think we could. Indigo isn't in a place where people are moaning about breaking API changes.

We could just raise issues for those two points, and I can make a demo and then consider removing SearchGrid as steps outside this PR.

import scala.annotation.tailrec

@deprecated("Use the new indigoextras.pathfinding.PathFinder", "0.15.3")
@nowarn("cat=deprecation")
final case class SearchGrid(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tempting to just remove this stuff. I doubt many people are using it. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not remove it.

@mprevel
Copy link
Contributor Author

mprevel commented Dec 21, 2023

The PR is updated according to the comments but the removal of the old pathfinder.

Copy link
Member

@davesmith00000 davesmith00000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work @mprevel, and the demo is very cool. 😎
image

@davesmith00000 davesmith00000 merged commit 899862c into PurpleKingdomGames:main Dec 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants