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

Allow downloading of only some animations / one animation at a time / zip file containing separate animations #48

Open
Gaurav0 opened this issue Jan 7, 2025 · 10 comments
Labels
enhancement New feature or request

Comments

@Gaurav0
Copy link
Member

Gaurav0 commented Jan 7, 2025

Let's steal this idea from https://github.com/vitruvianstudio/vitruvian-web now that it is open source with the same license.

Discussion: #49

@Gaurav0 Gaurav0 added the enhancement New feature or request label Jan 7, 2025
@jrconway3
Copy link
Contributor

Is this possible to even do? Just cut out a piece of the sheet and let users download a single animation? I haven't taken a look at vitruvian to see how it works.

@Gaurav0
Copy link
Member Author

Gaurav0 commented Jan 7, 2025

Sure. We create another canvas tag on the page and draw only the requested animation on it, and set that to be the download target.

Or we can use the same canvas and only draw the animation selected.

Or we can only draw the animation(s) selected if we chose to let the users select multiple animations.

Options, options, options. I need feedback to decide what to do.

@sanderfrenken
Copy link
Contributor

My 2 cents: I thought about this before, but I am not very in favor of doing this. This form of post processing I would leave up to the developer.
The sheet contains all animations, in a standardized format.

But for each project/ engine/ game someone would possibly require different formatting of the sprite sheets.

Facilitating all these possibilities from the generator will be an immense project, so I rather leave that to the developer using their own tooling.

@sanderfrenken
Copy link
Contributor

What we could do, is create another repo with some tooling to for instance convert full sheets into sliced sheets, with configuration options etc. That I would personally prefer above adding this to the generator it self

@bluecarrot16
Copy link
Contributor

Agree with @sanderfrenken . lpctools does exactly this and can operate in batch, seems to solve that problem if someone doesn't want to roll their own tool for this purpose.

I am somewhat more persuaded by the argument that the source images should be broken up by animation, mainly because things become very complicated when there are oversized animation frames generated, and we don't currently have a way of communicating back to the end user how the resulting sheet should be interpreted. Handling this would probably require re-architecting the generator, which napsio has now done... so maybe we should consider whether our attention should be focused on that fork going forward...

@sanderfrenken
Copy link
Contributor

Yeah, I think lpctools would be nice to add to this organization as well maybe?

About the source images, from artists/ contributor point of view I don't have any experience to have an opinion on this. You all know that much better than I do.

I am not sure how it would aid in communicating back to the end user how the resulting sheet should be interpreted though. Can you explain what you mean by that? There could be other ways to facilitate this explanation as well.

I do think that the generator can be adjusted to work with individual sheets per animation, and still spit out one universal sheet as we currently do. But it might require more work than expected when we try to do so.

The LPC Studio by Vitruvian is really nice. It's not up-to-date with the current assets, but that might be easy to fix. It supports recoloring, which is awesome. Didn't use it extensively yet, but overall it seems quite sophisticated already.

It would require us to learn Vue and I think overall the setup is a bit more complex compared to this generator (which is understandable as this generator is very simplistic). As with any modern frameworks, I do expect also it needs more LCM than the current generator.

I have to say that I do like the simplicity of this generator a lot, as it's easy to maintain and extend once you understand the inside. At the same time, the simplicity is also limiting.

Concluding, I think there are valid reasons to move to the more modern approach as the LPC Studio offers. But it will cost time to

  • make it up to date with all the new assets and functionality as in the current generator
  • learn/ understand the setup and be able to contribute to it

The current generator is more or less feature complete, and what is missing we can add. I have always seen it as a plain tool for developers, and I never wanted it to have a shiny or polished UI with all sorts of nifty features. So from that perspective, it has always served me well.

But I also understand that there are users that would like to see a more modernized implementation, and that I think is what LPC Studio does very well already.

For the sake of time, personally I would stick with the current generator (I try to focus as much as possible now on my new game release) for now. I don't have the time and focus now to properly dive into LPC Studios. But if I would have the time to spare, I do think it's worth looking into it and try to estimate how much is missing, and what it would take to make it complete.

Curious to know your thoughts on this as well @Gaurav0

@Gaurav0
Copy link
Member Author

Gaurav0 commented Jan 8, 2025

I definitely approve of moving lpctools here if @bluecarrot16 agrees.

As far as LPC Studio, I think it would be easier to steal the ideas and put them in the current generator than to switch. Which I was trying to do with this issue. I think making LPC Studio up to date would be considerable work.

But for each project/ engine/ game someone would possibly require different formatting of the sprite sheets.

Yes, I agree that providing different formatting for everyone would be an immense project, and moreover, counterproductive, as it would reduce the standardization we have. I've scaled back the proposal to just allow the user to display / download a single animation with the same formatting as LPC Studio does.

@sanderfrenken
Copy link
Contributor

Yes to remain on topic more:

I think that could be a middle ground for this issue's context at least: Allow someone to either export the whole sheet, or a single selected animation. Though I still think this can just as well be done by lpctools. So I would say it depends on the complexity that this will introduce if we should do it or not.

It could be a bit challenging, as the animations are dynamic: based on the weapon certain animations will or will not be available. So the list of animations to choose from should be dynamic, just as the logic that will take the requested animation from the sheet. The custom animation will not appear always at the same position in the sheet.

So alternatively, we could also allow only to select the "default" (animations till the death animation) animations to export as a single file.

@sanderfrenken
Copy link
Contributor

WRT migration to another generator (or rewriting the current one to a more modern framework for example) I will create 2 new discussions:

  • We could switch to source images being separate animation sheets instead of currently being the full sheet in one image in the current generator, but what are the pro's and the con's?

that discussion we can use to come to a conclusion on how to move forward with the source images. It sort of links to the other discussion we can have (but lets take them separately first):

  • Migration to either a new generator (EG LPC Studios) or rewriting the current one into a modern framework; or continue as is: our vision on the (nearby) future of the generator

@sanderfrenken
Copy link
Contributor

WRT migration to another generator (or rewriting the current one to a more modern framework for example) I will create 2 new discussions:

  • We could switch to source images being separate animation sheets instead of currently being the full sheet in one image in the current generator, but what are the pro's and the con's?

that discussion we can use to come to a conclusion on how to move forward with the source images. It sort of links to the other discussion we can have (but lets take them separately first):

  • Migration to either a new generator (EG LPC Studios) or rewriting the current one into a modern framework; or continue as is: our vision on the (nearby) future of the generator

#52

#53

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

No branches or pull requests

4 participants