Sprite rotated in 16 positions

Share graphical tips, notes and queries related to our favourite screen layout and its editors.
User avatar
Sol_HSA
Microbot
Posts: 162
Joined: Thu Feb 04, 2021 11:03 am
Location: .fi
Contact:

Re: Sprite rotated in 16 positions

Post by Sol_HSA »

R-Tape wrote: Sun Jun 04, 2023 7:45 pm Nice one Sol. I don't know how much work it would take, but if anyone fancies turning this into a utility for non-coders*, I'd owe them a pint!

*or perhaps rather people like me that can code z80 asm and speccy BASIC, but never took C beyond the fahrenheit to celsius converter, and then swiftly forgot even that.
It's a commandline tool. Give it a picture and how many frames the rotation should take, it pukes out .png files (and a .gif animation). I can put a windows binary somewhere if that helps? =)
User avatar
Einar Saukas
Bugaboo
Posts: 3145
Joined: Wed Nov 15, 2017 2:48 pm

Re: Sprite rotated in 16 positions

Post by Einar Saukas »

Sol_HSA wrote: Mon Jun 05, 2023 11:51 am I can put a windows binary somewhere if that helps? =)
In your own Github page, you can click on "Releases", "create a new release", then upload the binary.

This way, your compiled binary will be available together with the source code that generated it, with a proper tag.

This will be the easier way for users to find it.
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: Sprite rotated in 16 positions

Post by R-Tape »

Yes please to the binary @Sol_HSA. It might help.

I really must learn about useful computers one day...
User avatar
Sol_HSA
Microbot
Posts: 162
Joined: Thu Feb 04, 2021 11:03 am
Location: .fi
Contact:

Re: Sprite rotated in 16 positions

Post by Sol_HSA »

Sorry for the delay @R-Tape , I added a few features =)

https://github.com/jarikomppa/spriterot ... al_release
User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: Sprite rotated in 16 positions

Post by R-Tape »

Sol_HSA wrote: Tue Jun 06, 2023 4:33 pm Sorry for the delay @R-Tape , I added a few features =)
Cheers! This is great - it makes it easy and quick to get a framework to clean up. Here's an example of a simple and complicated sprite, obvs the latter needs more cleaning up than the former.



highrise
Manic Miner
Posts: 305
Joined: Fri Mar 20, 2020 11:29 pm

Re: Sprite rotated in 16 positions

Post by highrise »

very interesting. I also didn't know you could rotate an area in zx paintbrush - which tool is that?
User avatar
Sol_HSA
Microbot
Posts: 162
Joined: Thu Feb 04, 2021 11:03 am
Location: .fi
Contact:

Re: Sprite rotated in 16 positions

Post by Sol_HSA »

Tweaked it a bit, the output looks a bit more stable now.

https://github.com/jarikomppa/spriterot ... _stability


User avatar
R-Tape
Site Admin
Posts: 6409
Joined: Thu Nov 09, 2017 11:46 am

Re: Sprite rotated in 16 positions

Post by R-Tape »

highrise wrote: Fri Jun 09, 2023 4:16 pm very interesting. I also didn't know you could rotate an area in zx paintbrush - which tool is that?
It's near the bottom left of the screen on the icon bar. The little red dot with the arrowed circle around it - when hovered over it's the 'rotate points mode'. When selected, you draw a shape freehand, then when you release the mouse, you can freely rotate it.
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Sprite rotated in 16 positions

Post by Joefish »

Interesting - I just noticed that R-Type sprite demo is getting a full 180° range of rotation from one original image. It only needs two source images, rotated 180°, to do the full rotation. It doesn't require 90° pre-rotations of the original sprite. So if your shearing process can reverse the order of horizontal and vertical slices (a vertical and horizontal mirroring together gives you a 180° rotation), then you only need the one original source image.
https://cohost.org/tomforsyth/post/8918 ... with-three
Post Reply