Qbasicnews.com
May 31, 2020, 09:24:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Sprite rotation...  (Read 1723 times)
R@dioman
Ancient QBer
****
Posts: 410



« on: May 03, 2003, 10:57:42 PM »

I want to use the sprite rotation routines from cosmox or rellib, but at every 90 degree increment, it jerks the sprite a bit. Is it just my faulty programming, or is it the routine? Is there any routines out there that gives you a smooth 360 degree rotation? Thanks
Logged

toonski84
__/--\__
*****
Posts: 2567



« Reply #1 on: May 03, 2003, 11:01:56 PM »

well, since rel's visiting his old man i should probably say something like "could i see the program?"  are you including both 0 and 360 as degrees in your loop?  at what degree does it jerk?
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
wizardlife
Na_th_an
*****
Posts: 1456


WWW
« Reply #2 on: May 03, 2003, 11:07:47 PM »

Quote from: "R@dioman"
I want to use the sprite rotation routines from cosmox or rellib, but at every 90 degree increment, it jerks the sprite a bit. Is it just my faulty programming, or is it the routine? Is there any routines out there that gives you a smooth 360 degree rotation? Thanks


What increments are you using? Surely you're not rotating each degree? His routines would be working in radians anyways... I'd go in 5 or 8 degree notches, or just make 16/32 directional sprites manually.
Logged

toonski84
__/--\__
*****
Posts: 2567



« Reply #3 on: May 03, 2003, 11:17:22 PM »

i rel's rotation routines do go by degree.  most libs i've seen have integer increments, but it's usually something like up to 255 or something.  i'll have to check the library itself.

but the program itself would be helpful so we could see whether or not it's the program or the routine.

edit:  yeah, it's 0-359.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
R@dioman
Ancient QBer
****
Posts: 410



« Reply #4 on: May 04, 2003, 12:51:19 AM »

Well, here's an example using cosmox. It has the same problem: (right-click, save-as...)

www.geocities.com/juice801980/temp.zip

It jerks at every 90 degrees. :Huh:
Logged

relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #5 on: May 05, 2003, 02:59:46 AM »

Hmmmm... Didn't notice it. Lachie use it on REO and it didn't have any probs.

There's an example file there.  Are you by any chance using a non released ver?  You could look at the source to see if the SHR is:

SHR 8
instead of Shr 7

as shifting 8 would mess the sign bit.

if you are using the unrealeased crap ver then you need to get the newest ver which I could only provide via email as my site is probaby dead already.

Be back on Thursday.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!