Leather128 / LeatherEngine

Just a little engine I decided to make since nobody seemed to have true custom mod support.
GNU General Public License v3.0
70 stars 57 forks source link

Any idea why custom arrows don't line up with the notes? #277

Closed BR14Nmusic closed 2 years ago

BR14Nmusic commented 2 years ago

Trying to make a ui skin but the arrows don't line up. Is there any way to offset only the judgement arrows or the note arrows without hard coding it into the code? All the assets should be centred and the only offsets I could find change arrow positions in the editor.

image

Leather128 commented 2 years ago

it seems you do not understand, your strum sprites (or note sprites) are just not centered. like seriously they just aren't. unless you can like send the xml or something to prove they are then uhhhh pretty sure they ain't centered buddy

BR14Nmusic commented 2 years ago

default image I'm prettu sure this should be centred? looking at the x y width and height in it should match up. Also, different note sprite types line up with them so I'm really not sure what's wrong since it's only the static arrows that are having issues. image

Leather128 commented 2 years ago

wait how is there 0 frameX, frameY, frameWidth, or frameHeight values for the strum xml data? there should be?

Leather128 commented 2 years ago

question: did you use different pngs for all the animations? (if so, did you actually center them properly in adobe animate??)

BR14Nmusic commented 2 years ago

I used separate pngs for the animations and they're all aligned like this in adobe animate image image ^the confirm arrows have two different frames image

Leather128 commented 2 years ago

are you sure all the pngs are aligned with each other?

BR14Nmusic commented 2 years ago

I'm pretty sure

BR14Nmusic commented 2 years ago

Okay, I think i've figured out the reason. I messed around with the size of the notes so i made a sprite sheet with dimensions closer to the default ui skin's default arrow set and then made it smaller. If the dimensions of a sprite was smaller than its default ui skin equivalent it was offset to the left, and if it was bigger (like my original arrows) they were offset to the right.

image bigger = offset to the right

image this was very close to the original default ui skin's arrow dimensions but slightly bigger and it was offset less to the right

image these were very tiney and they're offset to the left

So now I'm probably going to have to either make my ui skin's default arrows dimensions match the default ui skin. Which wouldn't be ideal since it would be better to have more freedom in the dimensions of custom notes in different ui skins. Hopefully this made sense

Leather128 commented 2 years ago

i guess that makes sense, tbh i'm just confused why it's happening though as it should scale fine to any size (like for example, how pixel notes are just tiny sprites scaled up by 6 without meeting the exact same dimensions as normal notes)