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

[feature/automatic-offset-flipping] change offset fix properties #3543

Open
wants to merge 7 commits into
base: feature/automatic-offset-flipping
Choose a base branch
from

Conversation

cyn0x8
Copy link
Contributor

@cyn0x8 cyn0x8 commented Oct 3, 2024

Briefly describe the issue(s) fixed.

fixes some logic issues with the offset flip fix for #3539 by changing up some properties, as well as adding rotation support

character versions <1.1.0 are unaffected

  • new bopper property autoCorrectAnimations allows flipXOffsets and flipYOffsets as well as rotation compensation to work
  • bopper properties flipXOffsets and flipYOffsets are now arbitrary (unless a character, see below)
  • new character property playerSideOffsets determines whether flipXOffsets is true or not
  • new character property playerSideSingAnimations determines whether flipSingAnimations is true or not
2024-10-03.18-40-46.mp4
2024-10-03.18-41-51.mp4
2024-10-03.18-51-37.mp4

in these examples:

/* in tankman.json */
"version": "1.1.0",
"flipX": true,
/* autoCorrectAnimations not present, default true on 1.1.0 */
"playerSideOffsets": false,       /* offsets were originally made for tankman to be on the opponent side */
"playerSideSingAnimations": true, /* despite being on the player side in the spritesheet itself */

/* in dad.json */
"version": "1.1.0",
/* flipX not present, default false */
/* autoCorrectAnimations not present, default true on 1.1.0 */
"playerSideOffsets": false,
"playerSideSingAnimations": false,

/* in bf.json */
"version": "1.1.0",
"flipX": true,
/* autoCorrectAnimations not present, default true on 1.1.0 */
"playerSideOffsets": true,
"playerSideSingAnimations": true,

@cyn0x8 cyn0x8 changed the title automatic offset flipping merge [feature/automatic-offset-flipping] math for offset fix Oct 3, 2024
@cyn0x8 cyn0x8 marked this pull request as draft October 3, 2024 00:17
source/funkin/play/stage/Bopper.hx Outdated Show resolved Hide resolved
@EliteMasterEric EliteMasterEric force-pushed the feature/automatic-offset-flipping branch from 7679e4d to 3069396 Compare October 3, 2024 16:16
@EliteMasterEric
Copy link
Member

Base branch has been updated to include working submodules.

Also, your changes do NOT fix Tankman's flipped animations regardless of configuration. The feature needs to work on any characters whose offsets are correct right now, otherwise it will create a bunch of work for us (manually reconfiguring offsets) as well as a bunch of work for mod creators (who will have to fix their character offsets).

Try testing characters where "flipX": true is set.

@EliteMasterEric EliteMasterEric added status: needs revision Cannot be approved because it is awaiting some work by the contributor. type: enhancement Provides an enhancement or new feature. labels Oct 3, 2024
@EliteMasterEric EliteMasterEric added this to the 0.6.0 milestone Oct 3, 2024
@cyn0x8
Copy link
Contributor Author

cyn0x8 commented Oct 4, 2024

i took some notes

player sprite   with offsets intended for player side   on player side
data flipX should be true
flipX      is false (stage flipX != data flipX -> true  != true)
offsets    should not be flipped (already aligned)

player sprite   with offsets intended for player side   on opponent side
data flipX should be true
flipX      is true  (stage flipX != data flipX -> false != true)
offsets    should be flipped if flipXOffsets is true

player sprite   with offsets intended for opponent side on player side
data flipX should be true
flipX      is false (stage flipX != data flipX -> true  != true)
offsets    should be flipped if flipXOffsets is true

player sprite   with offsets intended for opponent side on opponent side
data flipX should be true
flipX      is true  (stage flipX != data flipX -> false != true)
offsets    should not be flipped (already aligned)

opponent sprite with offsets intended for player side   on player side
data flipX should be false
flipX      is true  (stage flipX != data flipX -> true  != false)
offsets    should not be flipped (already aligned)

opponent sprite with offsets intended for player side   on opponent side
data flipX should be false
flipX      is false (stage flipX != data flipX -> false != false)
offsets    should be flipped if flipXOffsets is true

opponent sprite with offsets intended for opponent side on player side
data flipX should be false
flipX      is true  (stage flipX != data flipX -> true  != false)
offsets    should be flipped if flipXOffsets is true

opponent sprite with offsets intended for opponent side on opponent side
data flipX should be false
flipX      is false (stage flipX != data flipX -> false != false)
offsets    should not be flipped (already aligned)

whether the offsets are intended for the player or opponent side is arbitrary and this affects when the offsets should be flipped, so im rewriting the properties to reflect that

see updated pr description

@cyn0x8 cyn0x8 changed the title [feature/automatic-offset-flipping] math for offset fix [feature/automatic-offset-flipping] change offset fix properties Oct 4, 2024
@cyn0x8 cyn0x8 marked this pull request as ready for review October 4, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs revision Cannot be approved because it is awaiting some work by the contributor. type: enhancement Provides an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants