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

Prerendering Chunks #14

Open
englercj opened this issue Nov 5, 2014 · 2 comments
Open

Prerendering Chunks #14

englercj opened this issue Nov 5, 2014 · 2 comments
Milestone

Comments

@englercj
Copy link
Owner

englercj commented Nov 5, 2014

An optimization should be to prerender static layers of the tilelayers to larger chunked textures.

This is really more help to canvas so it only renders a couple sprites each frame instead of however many there need to be on the screen based on tile size. For WebGL this might actually hurt performance in some cases since we are no longer using the same texture and just batching the sprites.

User should be allowed to turn on prerendering for a layer regardless of renderer, and also turn on prerendering only if the renderer is canvas.

@englercj englercj added this to the v2.x milestone Nov 5, 2014
@englercj englercj removed this from the v2.0.0 milestone Mar 18, 2015
@englercj englercj added this to the v2.0.0 milestone Apr 15, 2015
@englercj englercj modified the milestones: v2.1.0, v2.0.0, v2.2.0 Mar 14, 2016
@anthonysapp
Copy link

This would be a great enhancement! I am seeing a big performance drop on an iPad, and running in cocoon and I'm pretty sure this would help. Any ideas on how / where you'd implement this? I'm inclined to give it a shot if I can.

@englercj
Copy link
Owner Author

englercj commented Apr 5, 2016

The idea would be to run through the map and draw chunks of it to different textures, then instead of using tiles for each of the map tile we render with the chunk tiles instead.

However, I think what I might do for v3 instead is drop the usage of sprites for tiles entirely and write custom rendering code. That way for webgl it is just a shader pass and for canvas I custom draw. I think I would get better perf that way. Even in that case it may still be nice to prerender chunks for the canvas implementation.

@englercj englercj modified the milestones: v3.0.0, v2.2.0 Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants