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

Online pack sprites from loader #1

Closed
lordmauve opened this issue Aug 14, 2019 · 1 comment
Closed

Online pack sprites from loader #1

lordmauve opened this issue Aug 14, 2019 · 1 comment

Comments

@lordmauve
Copy link
Owner

wasabi2d includes an image loader that it inherits from Pygame Zero for loading images from the images/ directory. However this is not currently used in texture packing.

Currently rectpack's offline mode is used and we pass a hard-coded list of images to pack. Even pre-packing all the images in the images directory would be better than this. However, online packing the images that actually get requested is a little more scalable. Sadly rectpack's online solver does not return the location to pack the next image - an issue that is relatively but not completely shallow - see rectpack#27.

We must no longer convert the alpha channel (does this premultiply)?:
https://github.com/lordmauve/wasabi2d/blob/master/wasabi2d/loaders.py#L183

@lordmauve
Copy link
Owner Author

Done - by replacing rectpack with my own implementation.

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

1 participant