FunkinCrew / Funkin

A rhythm game made with HaxeFlixel
https://www.newgrounds.com/portal/view/770371
Other
2.98k stars 2.29k forks source link

Enhancement: Caching for characters (Mid Song Character Switching) #3055

Open radpas1213 opened 4 months ago

radpas1213 commented 4 months ago

Issue Checklist

What is your suggestion, and why should it be implemented?

Currently characters only load the sprite sheet when it is created, this is not good for songs that have mid song character changes. If there is a function for each CharacterRenderType to cache the sprite sheets before the stage loads it would be very beneficial.

Cartridge-Man commented 3 months ago

Pretty sure this is an issue with the mod you use for this event. iirc I’m pretty sure that the official game doesn’t actually have an event like this

radpas1213 commented 3 months ago

Yeah, I'm making a port of Mortis and right now I've decided to make the characters that are a bit too heavy when switching into extra characters instead.

Cartridge-Man commented 3 months ago

Well then this issue doesn’t matter, does it?

Cartridge-Man commented 3 months ago

Because what I’m trying to say is that the event is made by a modder and therefore it isn’t a problem with the base game. So either modify the event yourself or ask the creator of the event to make it better. Because I’m pretty sure the base game doesn’t have this

Cartridge-Man commented 3 months ago

So close this issue, is what I’m trying to say if my message wasn’t already incredibly transparent and the point of it so visible.

AbnormalPoof commented 3 months ago

Anyways, for an actual helpful answer: FunkinSprite has a cacheSparrow function that allows you to preload sprites, reducing lag to some extent when they're shown on screen. Alternatively, you can also simply hide the character (setting the alpha to an extremely low value) when the countdown starts, and then quickly swap out the Boyfriend when the event is triggered.

Cartridge-Man commented 3 months ago

Anyways, for an actual helpful answer:

ouch.