Sprite Operation Possible bug
issueid=22 24-11-2010 21:48
Junior Member
Number of reported issues by plamen: 4
Sprite Operation Possible bug
Unusual TGA format

Hi guys, Is it just me or there is some issues with sprite animation. I am loading large sprite sheet 4kx4k. My VGA is ok with it but animation running wrong. I am uploading the test sprite sheet. It is 512x128 frame size with 256 frames. Do you have same problem with it? First i made it with my simple code but then i just replaced the filename in one of the sample TBGL scripts for sprite animation and results were same. Any help?


Sorry i found the problem. Its the TGA top/down option
Issue Details
Issue Number 22
Project TBGL
Category Unknown
Status Not a Bug
Priority 5 - Medium
Affected Version Unknown
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




24-11-2010 23:09
thinBasic MVPs
Hi,

I created the sprite functions. What did you ment with TGA top/down option?

25-11-2010 16:17
Junior Member
Its about the Image origin field in TGA format descriptor .Some software products use different image origin /usually opposite corner/ and call it top/down ordering. I realized that the only TGA files supported by ThinBasic are not compressed and with specific orientation. So normally most tga output need to be flipped vertically to work ok. In the attached example i just flipped the tga in my image viewer and saved it to fix the problem. In most cases when someone use single tga image for sprite its just need to use sprite flip command but in case with sprite sheet it doesn't work. Because it flips the sprite frame not the sheet. So it was my mistake to think that sprites are not ok. It s just that tga files should be exactly of certain type.
Any way its not big deal i just have to remember not to use RLE and not to forget to flip my tga after my sprite sheet maker software.

25-11-2010 18:00
thinBasic MVPs
Thanks for the info. Yes, with sprite sheets you will have that problem. Using FLIP only changes the way a sprite is drawn. But it doesn't change the coordinates from the texture aray of the sheet.

+ Reply