Post new topic    
Liquid Metal Slime
Send private message
Can a slice be rotated? 
 PostThu Nov 07, 2013 6:31 am
Send private message Reply with quote
I was wondering if an image represented by a slice can be rotated at 90, 180 and 270 degrees. I wanted to see if I could simply use code to rotate a slice rather than drawing the image in all 4 positions.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Metal King Slime
Send private message
 
 PostThu Nov 07, 2013 6:41 am
Send private message Reply with quote
To my knowledge, no they can't unfortunately.

I could be wrong though. I think they can be flipped though, but again, I could be wrong.
Being from the third world, I reserve the right to speak in the third person.

Using Editor version wip 20170527 gfx_sdl+fb music_sdl
Liquid Metal Slime
Send private message
 
 PostThu Nov 07, 2013 6:49 am
Send private message Reply with quote
BMR wrote:
To my knowledge, no they can't unfortunately.

I could be wrong though. I think they can be flipped though, but again, I could be wrong.


Hmm, is it perhaps possible to rotate a sprite? I can't find anything in the Plotscripting Dictionary so far. I'm assuming there must be some way to do that since it can be performed in the editor. Though I don't want to overcomplicate things if the code is too complexed.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Metal Slime
Send private message
 
 PostThu Nov 07, 2013 12:46 pm
Send private message Reply with quote
For a slice maybe you can rotate is manually and add it to the collection? Or do you want a rotating animation?
Liquid Metal Slime
Send private message
 
 PostThu Nov 07, 2013 1:39 pm
Send private message Reply with quote
marionline wrote:
For a slice maybe you can rotate is manually and add it to the collection? Or do you want a rotating animation?


Yeah I figured manually may be the way to go. It's unfortunate there isn't a simple coding function for it but I'll make due with the manual method, it'll just take me a fair bit of time to perform manual rotations of 100's of images so I thought I'd ask.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Liquid Metal King Slime
Send private message
 
 PostThu Nov 07, 2013 3:19 pm
Send private message Reply with quote
No rotation support right now.

I imagine that it would be possible. We do already have some code that is used internally for rotating sprites in the editor, but it would need a lot of clean-up and changes before it could be usable for slices.

Also, making rotation work nicely with the slice cache could be tricky also.

So no promises, but maybe someday down the line. :)
Liquid Metal Slime
Send private message
 
 PostThu Nov 07, 2013 3:51 pm
Send private message Reply with quote
Bob the Hamster wrote:
No rotation support right now.

I imagine that it would be possible. We do already have some code that is used internally for rotating sprites in the editor, but it would need a lot of clean-up and changes before it could be usable for slices.

Also, making rotation work nicely with the slice cache could be tricky also.

So no promises, but maybe someday down the line. Smile


Awesome, that would be great to see at some future point in time. Doing it manually shouldn't be a problem, it'll just take a while.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Metal King Slime
Send private message
 
 PostFri Nov 08, 2013 11:21 am
Send private message Reply with quote
We already have code for rotating sprites (separate to what James mentioned) so I thought would this would be simple to add, and started doing so. Then I realised that rotating a sprite changes its width and height (unlike flipping), which is quite a large complication. I think I would like the positions of child slices anchored to the sides of a sprite to be updated when the sprite is rotated, but have the "slice width" and "slice height" commands return the original size. That's important for if we ever go ahead with the plan to allow arbitrary rotating and scaling of slices or even slice trees (like the map).
Display posts from previous: