Funkin icon indicating copy to clipboard operation
Funkin copied to clipboard

[ENHANCEMENT] Chart Editor Character Previews

Open PurSnake opened this issue 2 months ago • 17 comments

Co-Authored-By: @ComedyLost They started it first and he made good start base, but i still kinda rewrote all that, BUT I want to show that them worked on it too!

Linked Issues

#6212

Associated Funkin PR

Assets PR: Link

Description

Janky a bit, but still...

This PR revives old CharacterPlayer class with cool features. Preview your characters animations, including PlayAnimation event! (Also includes custom animation notekinds, since character's scripts are also loaded)

Also some optimization for ScriptEvent stuff and icons reloading. (Also now NoteScript event) And I HOPE no performance issues. (I tested and there was none :P)

Screenshots/Videos

image image

Funkin_9KwuHDh7ZL Funkin_kMIPj8C8ej

!!!! Showcase video

This isn't the best thing I've written, but OH MY GOD, I did it all in two hours.

P.S. If changes are needed, I will make them immediately after requesting them. (Like fix all characters scripts for this pr and etc)

PurSnake avatar Oct 05 '25 20:10 PurSnake

Fantastic, this is a great feature to finally clean up.

For the issue where characters expand out of the box, we could look into expanding the preview box to match the "full" size of the character based on its bounds. Or we could leave it, having the characters go out of the box is a little charming.

Note to self: BaseCharacter.debug is true if the character is not being used in a stage, so you can use if (debug) {} in any scripts which cause issues when used in the chart editor via the preview. Do you have a list of all the characters that are currently causing these kinds of issues? (Blazin' is a likely culprit).

EDIT: At some point I want to go into this PR and squash it, then I can edit the commit message to include Co-authored-by: ComedyLost <[email protected]>

EliteMasterEric avatar Oct 06 '25 00:10 EliteMasterEric

Might not finish my version in favor of this one, it's great.

For the issue where characters expand out of the box, we could look into expanding the preview box to match the "full" size of the character based on its bounds. Or we could leave it, having the characters go out of the box is a little charming.

Expanding the box to the character's full bounds might cause the window to become BIG when it comes to things like BF's attack animation.

MightyTheArmiddilo avatar Oct 06 '25 00:10 MightyTheArmiddilo

All characters that are broken (that I could find)

  • All characters with a dark variant [Errors when trying to add the default variant]
  • Pico (Speaker Shooter) [Errors while trying to grab shooting chart]
  • Nene (All Versions) [Errors onUpdate while trying to add A-Bot stuff]
  • Otis [Same errors as Nene & Pico (Speaker Shooter)]
  • Spirit [Errors when trying to add to stage]
  • Blazin' characters [Errors when trying to hit a Blazin' specific notekind]
  • Tankman (Atlas) [Fully crashes the game]

ComedyLost avatar Oct 06 '25 01:10 ComedyLost

How is this doing? Does it function perfectly or still need some character fixes?

Hundrec avatar Oct 14 '25 10:10 Hundrec

The trojan horse truly was the contributors we made along the way

you guys ARE the trojan horse

trayfellow avatar Oct 14 '25 13:10 trayfellow

Yeah man The contributors carry the patches

Hundrec avatar Oct 14 '25 13:10 Hundrec

We are all bros...

NotHyper-474 avatar Oct 14 '25 14:10 NotHyper-474

I'm trying to hold back my tears

PurSnake avatar Oct 14 '25 15:10 PurSnake

Expanding the box to the character's full bounds might cause the window to become BIG when it comes to things like BF's attack animation.

Noticing 👀

biomseed avatar Oct 14 '25 19:10 biomseed

For the issue where characters expand out of the box, we could look into expanding the preview box to match the "full" size of the character based on its bounds.

That wouldn't work for things like Blazin' where overlap of sprites is part of the design.

biomseed avatar Oct 14 '25 19:10 biomseed

Expanding the box too much would make it very big for things like bf-attack, but currently it doesn't expand ENOUGH for several characters like parents-christmas.

It should at least consistently hold the idle animations.

I'm also working on fixing all the characters that break when using them in the preview.

EDIT: The character preview seems to be updating its size to match the PREVIOUS character (this is obvious if you switch characters a bunch), the problem is that anything I tried didn't work, so this is probably a HaxeUI-related issue and not necessarily Funkin's fault.

EliteMasterEric avatar Oct 19 '25 23:10 EliteMasterEric

EDIT: The character preview seems to be updating its size to match the PREVIOUS character (this is obvious if you switch characters a bunch), the problem is that anything I tried didn't work, so this is probably a HaxeUI-related issue and not necessarily Funkin's fault.

I was able to fix this myself in my closed PR (might redo it cuz I got nothing better to do) and all I did was move the code that resized the window out of the if statement reading the preview's dirty variable.

MightyTheArmiddilo avatar Oct 25 '25 02:10 MightyTheArmiddilo

Mighty, can you add the fix to this PR through PurSnake? That way your commit will make it in with the currently reviewed draft of the PR

Hundrec avatar Oct 25 '25 17:10 Hundrec

@PurSnake I attempted to give this a new review as it seems the expanding box bug has been fixed, but it needs a rebase (ideally to the current develop branch). I rebased it internally but switching characters causes the box to disappear and I'm not sure if that's your fault or mine.

image

EliteMasterEric avatar Dec 02 '25 13:12 EliteMasterEric

@EliteMasterEric Technically, this isn't our problem, as it's caused by Abnormal's changes to migrate a large number of characters to the AnimateAtlas format. Because of this, it can't get the animation width/height correctly I think I'll work on fixing that.

PurSnake avatar Dec 02 '25 18:12 PurSnake

Fixed aw boi

PurSnake avatar Dec 02 '25 23:12 PurSnake

That's done

biomseed avatar Dec 03 '25 22:12 biomseed

Now we just need the debug check PR to merge before 0.7.6

MightyTheArmiddilo avatar Dec 21 '25 15:12 MightyTheArmiddilo