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

Performance issues with large blocks #25

Closed
XeroOl opened this issue Aug 25, 2016 · 7 comments
Closed

Performance issues with large blocks #25

XeroOl opened this issue Aug 25, 2016 · 7 comments
Labels

Comments

@XeroOl
Copy link
Contributor

XeroOl commented Aug 25, 2016

I just went back to my level Coral Block and the game seems to delay before moving the snakes. Also, the animation of the snakes is sometimes skipped. It most likely has to do with the giant map-sized block. This issue wasn't present when I made the level.

@XeroOl XeroOl changed the title performance issues with large blocks Performance issues with large blocks Aug 25, 2016
@thejoshwolfe
Copy link
Owner

I suspect it's the infinite loop detection code I added in #10 that's causing the problem. I have a number of ideas to work around this, such as disabling the infinite loop detection if there aren't portals directly above one another.

That being said, this level is a bit esoteric in its use of a block to form walls instead of using walls to form walls. The performance regression is my fault, and I'll look into fixing this, but it might be worth mentioning that this usecase isn't really something that's super necessary to support.

@thejoshwolfe
Copy link
Owner

I'm actually having trouble seeing any performance problem on my machine. It might be due to the type of graphics card I have or something. I'm not sure.

I've uploaded two experimental versions to try to isolate what's causing the performance problems. Please tell me how these two branches look to you:

perf1

perf2

@XeroOl
Copy link
Contributor Author

XeroOl commented Aug 26, 2016

I would think that the infinite loop detector only would be active if portals are present/used. Is there any disadvantage to only enabling the loop detector while a portal is in use?

@XeroOl
Copy link
Contributor Author

XeroOl commented Aug 26, 2016

perf1 appears to have little/no effect.
perf2 seems to get rid of the problem completely for me, with the exception of the support beams.
I'm guessing that the support beam cover is what's causing the problem. If that's the case, it might be possible to fix this bug when implementing #19.

@thejoshwolfe
Copy link
Owner

Alright, please try this branch:

perf3

@XeroOl
Copy link
Contributor Author

XeroOl commented Aug 26, 2016

perf3 works perfectly.

@thejoshwolfe
Copy link
Owner

thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants