-
Notifications
You must be signed in to change notification settings - Fork 2
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
not use diagonals #1
Comments
Hey Freddy. EasyStar does not even support diagonals at the moment. I think it should fit your needs out of the box. It is my plan to eventually add diagonals as optional, and for the implementation to be something like this: I hope this answers your question. |
ok ... I have an error in my code because my character is diagonal in the way. The game that I am making is for mobile devices is there any room for improvement in easystar about the performance? |
Hey Freddy. Could you post the error you are getting that relates to diagonals? I am sorry to hear you are experiencing poor performance. When you say the performance is slow what do you mean? Does attempting to calculate a path slow down your game, or does it take a long time to calculate a path? Is there any way I can look at your source code? It would be helpful for me to look at your use case and see if there is anything else I can do to help. -Bryce |
Hi, the problem was in my code to move the characters ... I have already fixed. |
I think you might have some luck trying to lower the calculationsPerFrame. It may take long for your characters to "think" of the way to get to their path, but at least it wouldn't drag your game to a grind when they do. Do you have many npcs trying to find paths all at the same time? 2048x2048 is pretty huge. I would make sure that no npcs are trying to find paths when they are not on the screen. You might have better luck with a custom node based pathfinding system rather than a tile-based one. EasyStar considers every tile a node. In some use-cases it's better to define your nodes manually in a level editor. This way npcs are smarter about where to go, and only check nodes that are important. I found this image on google images to demonstrate what I mean: http://i49.tinypic.com/2mq24g0.png EasyStar draws no distinction between tiles. Every tile is a node: |
Hi, I'm working in a game and I need not use diagonals to avoid cutting corners. Can you help me?
The text was updated successfully, but these errors were encountered: