News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

are there any rotate udg routines out there that rotate say 8 degrees at a time?

Started by the777, 08:14, 14 August 25

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

the777

i want one that does it in 8 degrees or so, clockwise and anticlockwise

i dont mind if the edges get cut off when it rotates, btw

any ideas?

i know that i would probably have to use shearing to do this, which would be faster

i also know that i would use 256 segments instead of 360 as the cpc deals with this number alot better, so it would be 32 segments at 8 degrees each

and written in basic

lightforce6128

That's an interesting question. Some thoughts from my side:

My first idea would be not to apply this change incrementally, because I'm sure that after the third or fourth iteration there will be nothing left from the original graphics. It would be better to always start from the original graphics and rotate this by 8°, 16°, ...

A second idea is: CPC symbols are defined as bit masks, stored in 8 bytes. To create a rotation, the given 8 bytes need to be combined somehow with AND and SHIFT operators to create the new 8 bytes. But I guess this will be unbelievably slow.

Another idea is to print out the orginal symbol and then use interpolation techniques to create the rotated symbol. This can be read in afterwards and stored as new symbol. But this will also be unbelievably slow.

How many symbols do you want to rotate? And how often should every symbol be rotated?

I think, a real-time rotation can only be achieved with a samll assembler program, e.g. as RSX extension.

GUNHED

In one of the German Computer Magazine CPC Schneider/Amstrad International, it was one of the spiall issues (100 pages content or so) they had an RSX extension being able to do such things and much more. 
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)


the777

Quote from: lightforce6128 on 20:06, 14 August 25That's an interesting question. Some thoughts from my side:

My first idea would be not to apply this change incrementally, because I'm sure that after the third or fourth iteration there will be nothing left from the original graphics. It would be better to always start from the original graphics and rotate this by 8°, 16°, ...

A second idea is: CPC symbols are defined as bit masks, stored in 8 bytes. To create a rotation, the given 8 bytes need to be combined somehow with AND and SHIFT operators to create the new 8 bytes. But I guess this will be unbelievably slow.

Another idea is to print out the orginal symbol and then use interpolation techniques to create the rotated symbol. This can be read in afterwards and stored as new symbol. But this will also be unbelievably slow.

How many symbols do you want to rotate? And how often should every symbol be rotated?

I think, a real-time rotation can only be achieved with a samll assembler program, e.g. as RSX extension.




ive found a program called panda sprites. i wonder if the code could be pulled out of this and used?

the777

Quote from: GUNHED on 16:41, 15 August 25In one of the German Computer Magazine CPC Schneider/Amstrad International, it was one of the spiall issues (100 pages content or so) they had an RSX extension being able to do such things and much more.
which one?

SpDizzy

Quote from: the777 on 17:20, 19 August 25
Quote from: lightforce6128 on 20:06, 14 August 25That's an interesting question. Some thoughts from my side:

My first idea would be not to apply this change incrementally, because I'm sure that after the third or fourth iteration there will be nothing left from the original graphics. It would be better to always start from the original graphics and rotate this by 8°, 16°, ...

A second idea is: CPC symbols are defined as bit masks, stored in 8 bytes. To create a rotation, the given 8 bytes need to be combined somehow with AND and SHIFT operators to create the new 8 bytes. But I guess this will be unbelievably slow.

Another idea is to print out the orginal symbol and then use interpolation techniques to create the rotated symbol. This can be read in afterwards and stored as new symbol. But this will also be unbelievably slow.

How many symbols do you want to rotate? And how often should every symbol be rotated?

I think, a real-time rotation can only be achieved with a samll assembler program, e.g. as RSX extension.




ive found a program called panda sprites. i wonder if the code could be pulled out of this and used?

That's the sprites utillity from the Oliver twins. As fas as I know doesn't provide any kind of sprites rotation functionallity. The main purpose of the tool is to draw animated sprites easily and use them on BASIC programs. But you need to define any of the frames

ZorrO

CPC+PSX 4ever

the777

Quote from: SpDizzy on 18:35, 19 August 25That's the sprites utillity from the Oliver twins. As fas as I know doesn't provide any kind of sprites rotation functionallity. The main purpose of the tool is to draw animated sprites easily and use them on BASIC programs. But you need to define any of the frames

yea i know. and yes it does look

https://postimg.cc/gallery/FFLrMBD/042c7d2c


andycadley

Quote from: SpDizzy on 18:35, 19 August 25
Quote from: the777 on 17:20, 19 August 25
Quote from: lightforce6128 on 20:06, 14 August 25That's an interesting question. Some thoughts from my side:

My first idea would be not to apply this change incrementally, because I'm sure that after the third or fourth iteration there will be nothing left from the original graphics. It would be better to always start from the original graphics and rotate this by 8°, 16°, ...

A second idea is: CPC symbols are defined as bit masks, stored in 8 bytes. To create a rotation, the given 8 bytes need to be combined somehow with AND and SHIFT operators to create the new 8 bytes. But I guess this will be unbelievably slow.

Another idea is to print out the orginal symbol and then use interpolation techniques to create the rotated symbol. This can be read in afterwards and stored as new symbol. But this will also be unbelievably slow.

How many symbols do you want to rotate? And how often should every symbol be rotated?

I think, a real-time rotation can only be achieved with a samll assembler program, e.g. as RSX extension.




ive found a program called panda sprites. i wonder if the code could be pulled out of this and used?

That's the sprites utillity from the Oliver twins. As fas as I know doesn't provide any kind of sprites rotation functionallity. The main purpose of the tool is to draw animated sprites easily and use them on BASIC programs. But you need to define any of the frames

It was quite famously used to create Dizzy and his rotation is a direct result of that. Not going to be usable in a game though... 


the777

Quote from: andycadley on 20:41, 19 August 25It was quite famously used to create Dizzy and his rotation is a direct result of that. Not going to be usable in a game though...
yea i know. but if you could strip the code out?

andycadley

Quote from: the777 on 21:03, 19 August 25
Quote from: andycadley on 20:41, 19 August 25It was quite famously used to create Dizzy and his rotation is a direct result of that. Not going to be usable in a game though...
yea i know. but if you could strip the code out?

You could strip the code out, but it will still be way too slow. That's why it is in the Panda sprites utility in the first place and not used in-place in Dizzy, which just uses pre-rotated sprites. 


the777

Quote from: m_dr_m on 01:36, 20 August 25What is UDG?
its a character that has been designed by a user e.g. a spaceship, missile, etc

andycadley

It's a Spectrum specific term for a custom character, because the Spectrum only allows you to redefine 21 (or 19 on 128K machines) of the characters in the character set (unlike the CPC that can just redefine them all. 

GUNHED

Quote from: the777 on 17:21, 19 August 25
Quote from: GUNHED on 16:41, 15 August 25In one of the German Computer Magazine CPC Schneider/Amstrad International, it was one of the spiall issues (100 pages content or so) they had an RSX extension being able to do such things and much more.
which one?
It was iirc one of the big special issues, but don't remember the issue. If you browse through them online you probably see the pictures of it. :-) Good luck :-)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

the777

Quote from: GUNHED on 19:11, 20 August 25
Quote from: the777 on 17:21, 19 August 25
Quote from: GUNHED on 16:41, 15 August 25In one of the German Computer Magazine CPC Schneider/Amstrad International, it was one of the spiall issues (100 pages content or so) they had an RSX extension being able to do such things and much more.
which one?
It was iirc one of the big special issues, but don't remember the issue. If you browse through them online you probably see the pictures of it. :-) Good luck :-)
trouble is there is about 8 special issues and they all have 100 pages +. and i dont speak german

SpDizzy

Quote from: ZorrO on 19:48, 19 August 25@SpDizzy - May I ask where you got picture for your avatar?

Oh, of course. It's just a portion of a tileset from a game I was working on few years ago. Health problems and other unpleasant topics put it on hold

ZorrO

CPC+PSX 4ever

SpDizzy

Quote from: ZorrO on Yesterday at 01:33@SpDizzy - Any chance to get this in higher resolution?
Must be on my old computer. I'm not the graphic designer, so need to ask. It was designed for the purpose needed, at a resolution our beloved machines can handle, as 4x16 mode 1 bytes tiles (from the top of my head). I think you can just resize on powers of 2, nearest neighbour, to get a nice blocky high resolution picture of that. What's the purpose?

the777

Quote from: GUNHED on 19:11, 20 August 25
Quote from: the777 on 17:21, 19 August 25
Quote from: GUNHED on 16:41, 15 August 25In one of the German Computer Magazine CPC Schneider/Amstrad International, it was one of the spiall issues (100 pages content or so) they had an RSX extension being able to do such things and much more.
which one?
It was iirc one of the big special issues, but don't remember the issue. If you browse through them online you probably see the pictures of it. :-) Good luck :-)
was it called gbasic by any chance? 

https://www.cpcwiki.eu/imgs/7/74/PCAISH5_Page_006.jpg

https://www.cpcwiki.eu/index.php/CPC_Schneider_International_Sonderheft,_Issue_5

GUNHED

Quote from: the777 on Yesterday at 08:59
Quote from: GUNHED on 19:11, 20 August 25
Quote from: the777 on 17:21, 19 August 25
Quote from: GUNHED on 16:41, 15 August 25In one of the German Computer Magazine CPC Schneider/Amstrad International, it was one of the spiall issues (100 pages content or so) they had an RSX extension being able to do such things and much more.
which one?
It was iirc one of the big special issues, but don't remember the issue. If you browse through them online you probably see the pictures of it. :-) Good luck :-)
was it called gbasic by any chance?

https://www.cpcwiki.eu/imgs/7/74/PCAISH5_Page_006.jpg

https://www.cpcwiki.eu/index.php/CPC_Schneider_International_Sonderheft,_Issue_5
Not completely sure. But, yes, I guess you found it!  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod