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

sprite sheet animation support #1692

Open
DreadKnight opened this issue Jul 8, 2020 · 3 comments
Open

sprite sheet animation support #1692

DreadKnight opened this issue Jul 8, 2020 · 3 comments
Labels
abilities The issue is related to an unit ability or more coding This issue requires some programming pipeline Affects how the project is being developed priority This should get fixed as soon as possible! visuals Various things that easily catch the eye

Comments

@DreadKnight
Copy link
Member

DreadKnight commented Jul 8, 2020

The modular unit abilities classes should be extend to properly support animation sprite sheets
which will be rendered in blender and assembled using https://github.com/FreezingMoon/Spritify
Will need to store the animation info in different files: assets/units/animations/unit_name.json.

@DreadKnight DreadKnight added coding This issue requires some programming visuals Various things that easily catch the eye abilities The issue is related to an unit ability or more priority This should get fixed as soon as possible! labels Jul 8, 2020
@DreadKnight DreadKnight added this to the 0.7 - Cycloper milestone Jul 8, 2020
@DreadKnight DreadKnight added the pipeline Affects how the project is being developed label Jul 8, 2020
@andretchen0
Copy link
Contributor

Using sprite atlases would probably cut down page load times quite a bit.

I checkout out Spritify, linked above. There's the Sharp library on npm that doesn't require ImageMagick to be installed on the user's system.

I've got a simple sprite atlas creator that uses Sharp. It's really simple though. It only makes a single "page" of images and doesn't care much about efficiency. (I was just making pixel art games and everything easily fit in a single 1024x1024 image, so I didn't bother improving the packing or implementing multiple pages.)

With an extra script, we could have multiple "pages" – but I don't know if it's worth implementing for the current version of AB.

Fwiw, I've already put it into the Vue/Three.js version I've been working on. Here's the current sprite sheet.

atlas

@DreadKnight
Copy link
Member Author

Using sprite atlases would probably cut down page load times quite a bit.

I checkout out Spritify, linked above. There's the Sharp library on npm that doesn't require ImageMagick to be installed on the user's system.

I've got a simple sprite atlas creator that uses Sharp. It's really simple though. It only makes a single "page" of images and doesn't care much about efficiency. (I was just making pixel art games and everything easily fit in a single 1024x1024 image, so I didn't bother improving the packing or implementing multiple pages.)

With an extra script, we could have multiple "pages" – but I don't know if it's worth implementing for the current version of AB.

Fwiw, I've already put it into the Vue/Three.js version I've been working on. Here's the current sprite sheet.

atlas

Nice, wasn't aware of Sharp, could come in handy. The sprite sheets are important when we'll have unit animations, hence why later in the milestone. For now we could use it for unit sets avatars, like in unit grid and queue, #1736
Pagination will be good, as there are plans for 2 more unit sets; Dark Priest could be skipped to stick with power of 2.

I'll update #198 in a bit to be about Phaser, but same idea, that way we'll reduce 1-3 Dark Priest sprites. And in v0.6 we can migrate to Phaser v3 #1584 so that we can implement #678 and make the game be lightweight initially & load fast.

@DreadKnight
Copy link
Member Author

Death animations should deprecate #2520 if accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abilities The issue is related to an unit ability or more coding This issue requires some programming pipeline Affects how the project is being developed priority This should get fixed as soon as possible! visuals Various things that easily catch the eye
Projects
None yet
Development

No branches or pull requests

2 participants