forum

[resolved] [Storyboarding] Add support for decimal value coordinates

posted
Total Posts
9
This is a feature request. Feature requests can be voted up by supporters.
Current Priority: +0
Topic Starter
Kawa
I tried searching for a similar topic but had no luck (or I haven't tried looking hard enough) so please let me know if this has been requested already.
(I hope this belongs in Feature Requests since I don't exactly believe this is a bug and I don't know if there's any other subforum for smaller details like these...).

What I wouldn't mind seeing implemented is the possibility of placing sprites on more accurate X and Y coordinates. The way it works now is, you can move a sprite to, for example,
M,0,0,,173.25302,251.675003
and the sprite will stay on that exact position up until the point where you save your beatmap. What happens next is, the float values'll round down to integer values, resulting in
M,0,0,,173,251
.

When initially declaring a sprite on starting coordinates. If the values are decimal, the sprite isn't even recognized by the editor and is just skipped.
To put it simply,
Sprite,Background,TopCentre,"sb/eq.png",173.25302,251.675003
will cause the called sprite to be ignored by the editor (meaning it won't even show up), opposed to
Sprite,Background,TopCentre,"sb/eq.png",173,251
where the sprite shows up normally (albeit misplaced due to rounded values).

Now this might not seem like much of a difference, it's just a tiny little bit, nobody is ever going to notice that. It does, however, make a difference when trying to align several sprites alongside another object, may it be a background element or any other sprite.

A simple example:

This is a basic example of some audio spectrum bars moved to the edge of a background object. They look perfectly aligned.


Then, the beatmap is saved and the sprites re-position themselves to the rounded down values, resulting in this mess.


TL:DR Make the Move command and initial Sprite positioning support float values instead of being rounded down to integers.
Rilene
Though I do not storyboard but I see this very useful to storyboarders.
abraker
I think this is due to the engine's inability to store floating pint coordinate values as everything is rounded to the nearest osu!pixel. If floating point coordinates are implemented, this issue would perhaps be solved as well.
Minhtam
Realistically, I don't see how this is possible. Every pixel is a coordinate in Z^2, not R^2. So even if there is support for decimal value coordinates, the final effect would be that the monitor would automatically round it to the nearest pixel anyway.
Topic Starter
Kawa
I'd just like to point out that this doesn't really have much to do with pixels, rather than the initial values, at which the sprites are stored.

abraker wrote:

I think this is due to the engine's inability to store floating point coordinate values as everything is rounded to the nearest osu!pixel. If floating point coordinates are implemented, this issue would perhaps be solved as well.
The 1st image presents the sprites when there still hasn't been any "intrusion" of the client (other than reading the file and displaying the sprites on the screen). Basically the moment I load up the .osb (storyboard file). From what I noticed (I could be completely wrong), when a beatmap is saved, the .osb file is optimized (stuff like removing duplicate lines and such). That's the point where the float values for sprite movement get rounded down (since other functions like scaling, rotation and fading still retain them). If that you mentioned were true, the 1st image wouldn't even be possible (probably).

Minhtam wrote:

Realistically, I don't see how this is possible. Every pixel is a coordinate in Z^2, not R^2. So even if there is support for decimal value coordinates, the final effect would be that the monitor would automatically round it to the nearest pixel anyway.
Slightly different but still relevant, if this were the case, I don't think the 1st image would be possible (all the sprites are properly aligned there and there's no error with the pixels, so to say).

I've recently been contacted by Damnae regarding the matter, so I'll add this here.
This part might make more sense to someone who has tried storyboarding in the past:
Using M (Move) moves a sprite on both X and Y coordinates in one and doesn't store float values but rather rounds them down.
Using MX/MY (MoveX or MoveY) moves a sprite on only one axis, and stores floats, due to a different code path (same as rotate, fade and scale).

To put it simply, instead of
M,0,0,,173.25302,251.675003
you have to use
MX,0,0,,173.253
MY,0,0,,251.675

Again, all credit goes to Damnae for figuring this out.

(I've already uploaded a random beatmap with the fixed positioning that can serve as "proof" of this working, I guess).
Bara-
Pixels =/= Coordinates, so sure, why not?
It can cause for mich better alignment :3
Minhtam

Baraatje123 wrote:

Pixels =/= Coordinates, so sure, why not?
It can cause for mich better alignment :3
I'm not making a case for why it shouldn't happen. I'm just saying why I think it can't happen.
Damnae

Minhtam wrote:

Baraatje123 wrote:

Pixels =/= Coordinates, so sure, why not?
It can cause for mich better alignment :3
I'm not making a case for why it shouldn't happen. I'm just saying why I think it can't happen.
He's not saying you're saying it shouldn't happen, he's just saying that what you're saying about it not being able to happen is wrong. And I'm saying he's right to be saying that.
BanchoBot
Issue(s) in this thread have been addressed by the following changes:
  1. Support decimal coordinates for Move command and initial sprite position. (Damnae)
The changes will be applied to builds newer than b20151021cuttingedge.

Please follow up in this thread if you believe more work needs to be done to fix the mentioned issues. If they have not yet been resolved, please provide any new details that may have arisen after this build.
Please sign in to reply.

New reply