basic rotation (Development MSX Fora)MSX Resource Center PassionMSX MSX2 contest           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 49 gasten en 1 MSX vriend online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - basic rotation

Schrijver

basic rotation

zett
msx addict
Berichten: 282
Geplaatst: 25 Augustus 2003, 23:28   
Hi,
I have a problem .
I try to create a program thats make it posible to rotate a patern 16X16 in 16 steps.
but it don't work
can anybody create me a program in basic that made this posible????

I hope


Thank you ,

Rudi "Lord Zett" Westerhof


GuyveR800
msx guru
Berichten: 3048
Geplaatst: 26 Augustus 2003, 01:05   
Rotation is tough. It's Pythagoras' fault
There is no automatic solution possible for a low-res low-color screen.
Best is to use a PC graphic editor (like PSP) and edit each step by hand.

For Project Banshee we rotated a 16x16 sprite in 32 steps in Deluxepaint (on amiga ^^ and then edited the results in AGE.
zett
msx addict
Berichten: 282
Geplaatst: 26 Augustus 2003, 01:16   
no I want it don in basic
Ineed it becours it for a game im develping.

GuyveR800
msx guru
Berichten: 3048
Geplaatst: 26 Augustus 2003, 03:40   
Rotation is not something you will want to do in real-time.

However:

10 SCREEN 5 : CLS : DEFINT A-Z : DEFSNG R
20 FOR I = 0 TO 15 : LINE ( I , I ) - ( 15-I , 15-I ) , 15-I , B : NEXT I
30 FOR D = 0 TO 359 ' Rotate 360 degrees
40 RZ = D * (4 * ATN (-1) ) / 180 ' Convert degrees to radians
50 RS = SIN (RZ): RC = COS (RZ)
60 FOR Y = 0 TO 15 : FOR X = 0 TO 15
70 X1 = X * RC - Y * RS
80 Y1 = X * RS + Y * RC
90 PSET (50+X1,50+Y1) , POINT ( X , Y )
100 NEXT X,Y
110 NEXT D

Still, without manual anti-aliasing it looks like shite.
BiFi
msx guru
Berichten: 3142
Geplaatst: 26 Augustus 2003, 08:09   
And anti-aliasing in Basic will slow it down even MORE.
Argon
msx professional
Berichten: 842
Geplaatst: 26 Augustus 2003, 13:21   
I think a different sprite for every position would be a better option than doing it realtime...

K.
wolf_

msx legend
Berichten: 4721
Geplaatst: 26 Augustus 2003, 13:34   
You definitly don't want realtime rotation on an msx.

Besides, a 16x16 tile, rotated 45 degrees requires a bigger area. so your base-sprite can't be full 16x16.

lets see..

16x16

rotated 45 degrees, using pytho....blah.. that guy..: 16*16 + 16*16 = 512

sqr(512) = 22.6 .. let's say 23

so your 45 degree requires a 23x23 tile ..




zett
msx addict
Berichten: 282
Geplaatst: 27 Augustus 2003, 14:32   
GuyveR800 i thank you.
I olmost gona love you!!!!

thank you,


 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.