Rotating animated sprites.

Previous topic - Next topic

Hatonastick

After using LOADANIM to load a sprite strip, is ROTOZOOMANIM the only way to display a sprite you want to rotate and animate?  If so, how do I set the zoom part to not do anything at all?

Kitty Hello

zoomfactor = 1 -> size stays.
(153.245 * 1 = 153.245)

Hatonastick

Heh of course!  Sorry was a stupid question.

Hatonastick

I may have found a bug with GLBasic, or maybe my code has a bug and I'm doing something wrong here:
Code (glbasic) Select
LOADANIM "Playersprites.png", 1, 48, 48
ROTOZOOMANIM 1, 2, (screenwidth/2)-24, (screenheight/2)-24, direction, 1
Displays the sprite around two thirds the full size, while the following displays it fine:
Code (glbasic) Select
LOADSPRITE "Sprite0002.png", 1
ROTOSPRITE 1, (screenwidth/2)-24, (screenheight/2)-24, direction
I couldn't work out why the sprite displayed with rotozoomanim seemed to be missing details and clarity - until I realised it was smaller than it should be.  When I had both side by side it become much more obvious.

Maybe I'm doing something wrong with the above?  Or is it a bug of some sort?  I double checked and both versions of the sprite (one in sprite sheet, the other single) are exactly the same size in the graphics files.  I don't need the zoom aspect of the command at all, but was hoping to be able to use the animate and rotate side of things.

Gernot, any suggestions?

Kitty Hello

Might be a bug... I'm investigating.

EDIT:
Seems to work for me. Please post a minimal sample for this problem.

Hatonastick

Ok will do, but first going to have another look at my code, graphics etc. to see if I've made a mistake somewhere (which quite frankly is likely).  I thought I'd checked it last night, but a new day and new eyes might pick up what I missed before.

[Edit] Not a bug.  There is a difference between the two sprites, but it's not size.  Damn I must have been tired last night...  The sprite drawn using ROTOZOOMANIM is really blurry compared to the ROTOSPRITE version - right up until you start to rotate both, and then it looks fine.  It's not a bug though - might be an oddity with my graphics card, or with my brain.  So yay!  More random, pointless scare-mongering by me. :)

There is one oddity but I'm 99.9% certain that it's related to my graphics card.  It may have even caused my above mistake (try putting a sprite in a white box next to a sprite without, it's an optical illusion - well it was for me last night it seems).  It's either my graphics card or my brain (don't think it's Graphics Gale and you'd be amazed at the odd things you do or "see" when extremely fatigued). :)  Without changing any code, updating graphics etc. sprites that weren't being displayed using the alpha channel transparency last night, are this morning.  Now I've had odd things happen before with other games etc. that makes me think that my graphics card (possibly the RAM) and/or drivers has issues.

Kitty Hello

Very strange. What card is this?

Hatonastick

512Mb NVIDIA GeForce 8600M GT.  The drivers aren't direct from NVIDIA, they are some sort of proprietary semi-hack by Dell.  However I had to fiddle with some of the default settings the card uses a few weeks back  when I realised that an online game I play was not culling the billboards being used as particle effects.  I may have turned on/off something I shouldn't have.

Kitty Hello

Sounds so. I suggest installing the DELL drivers again and try to get an "cleanup" of your settings. I think you can change settings per .exe somewhere, too.

Hatonastick

Going to email you part of a screenshot which illustrates the difference.

[Edit] Oh and I've gone through all the card settings once more and turned a few things off that didn't need to be on.  Will see if any of those oddities turn up again.  Some friends of mine have the same graphics card in a similar laptop from Dell but running Vista and I don't believe they have the same problems - I'm running XP Home. :)  I might have to bite the bullet and "upgrade" one of these days.  I get the feeling Dell spends more time on its Vista drivers now.