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

Skip parameter #2

Open
szamq opened this issue Jul 28, 2019 · 2 comments
Open

Skip parameter #2

szamq opened this issue Jul 28, 2019 · 2 comments

Comments

@szamq
Copy link

szamq commented Jul 28, 2019

Hi, I'm excited to see that you created JPS v2 which is even faster than previous version. Actually I used the skip argument as my grid is very dense. Would like to have it back. Let me know if that's possibile.

@fgenesis
Copy link
Owner

Actually, before i go back to actually re-implement this, do you have any numbers? Because i never had any maps that really warranted using skip, so this wasn't well tested and never actually benchmarked, iirc. So i guessed it's fair to cut this, less source of problems and confusion, etc etc.

So in case you have a map that you could share that shows perf benefits in action, or even just some numbers with skip==1 and skip>1, that would be super helpful. (ok to use the older JPS for checking this).

Alternatively, how big is your map? As you've been using skip you're probably aware of the problems it could cause; if all of your walls are thick enough to work with skip>1 without problems, maybe your map is too high-res and could do with less resolution?

@szamq
Copy link
Author

szamq commented Jul 29, 2019

I was doing benchmark once. From my head, the time was divided by skip number, so:
skip= 0 time of execution ~ X
skip = 10 time of execution ~ X/10
So it worked nicely.
I have grid which is 8192x8192, you can think of it as bitmap terrain like in worms but top down. So I don't mind really when enemy player sometimes squeezes through one or two pixel wide line. I'm using skip = 5 which gives me 5 times performance boost and it behaves almost the same. 2-3 pixel wide walls are very rare in my case. Old vid of the map https://gfycat.com/welcomelimitedflatfish

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

No branches or pull requests

2 participants