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 elevators/ladders, steps and portals #38

Open
brean opened this issue Feb 27, 2023 · 2 comments
Open

Add elevators/ladders, steps and portals #38

brean opened this issue Feb 27, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brean
Copy link
Owner

brean commented Feb 27, 2023

Implement and describe ways to go from one grid to another, e.g. for different level of a building:

  • elevators or ladders are going from one node on one grid to another node in another grid on the same position,
  • steps are similar to ladders but can be connected to other nodes on the second grid
  • portals are the same as steps or elevators but without a cost.

Also add a markdown-page with a description describing the problem and how to use it.

For the implementation you need to extend the Node to have a list of connecting nodes in other grids. Then you need to inherit the Grid class and extend the check_neighbors function to look for those connections after all other neighbors are checked. Because for the algorithm the path isn't stored as a grid but as a graph where all neighboring cells are seen as edges so you just need another edge in the other grid.

@brean brean added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed help wanted Extra attention is needed labels Feb 27, 2023
@brean
Copy link
Owner Author

brean commented Mar 5, 2023

First iteration here: 1278ff8, we maybe also want to add a way to create new portals from a grid-like data structure

@brean
Copy link
Owner Author

brean commented Jun 7, 2023

...also add more examples, also visual ones (multiple level in https://github.com/brean/svelte-pyscript-pathfinding )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant