Skip to content

Comments

Dedicated classes for grouped files/SFX#570

Merged
Endaris merged 12 commits intopanel-attack:betafrom
Endaris:sfxGroup
Dec 30, 2024
Merged

Dedicated classes for grouped files/SFX#570
Endaris merged 12 commits intopanel-attack:betafrom
Endaris:sfxGroup

Conversation

@Endaris
Copy link
Collaborator

@Endaris Endaris commented Dec 28, 2024

Mainly created as an intermediate step to facilitate #542
The primary intention is to create an intermediary step of finding the files that will be used to load the respective love userdata.
By creating and keeping a reference to the files and grouping them into the sensible units they are it becomes possible to identify whether the overall getup of a file group changed before even doing a file-by-file comparison, addressing both point 1 and 2 of the open issues for a drag+drop mod import.

Additionally it has the small advantage of being more intuitive to use. Which is not a lot given that there are no particular features we'd want to add more of these for but the syntax certainly seems nicer and it could tentatively allow to specify volume multipliers per SFX group rather than just for all SFX of a mod as a whole.

Oh, and a new FileUtils function for matching these files along with some tests, which is nice and also being used for loading up panels already. In the future this can be used to load up other existing numbered assets like fanfares, pop sfx which also want to know about file references for the sake of ModImport.
Seems prudent to prototype ModImport with just characters/stages though as they present the most common use case.

I'll keep this open until the current beta hits stable.

@Endaris Endaris added Cleanup Cleans up code or adds documentation, does not affect gameplay sound relates to game sound labels Dec 28, 2024
@Endaris Endaris merged commit 12a5175 into panel-attack:beta Dec 30, 2024
@Endaris Endaris deleted the sfxGroup branch December 30, 2024 21:19
Endaris added a commit that referenced this pull request Jan 2, 2025
* initial draft for SfxGroup file matching

* add test cases and fix file matching

* move getMatchingFiles function to FileUtils

* move test file

* use file name matching routine for loading single panels and add tests + some cleanup

* finish FileGroup and SfxGroup more or less?

* start integrating SfxGroup with Character

* fix taunts not playing

* replace subSfx loading with loading SfxGroups instead

* fix crash when playing shock sfx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cleanup Cleans up code or adds documentation, does not affect gameplay sound relates to game sound

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant