Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / animated sprite distortion

Author
Message
thaduke
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: USA, PA
Posted: 27th Jan 2004 03:14
Im working with animated sprites. For some reason, when it chops up the image, it doesn't do it quite accurately it seems. The resulting image is clipped on both sides, but still stretched to the correct size. I've noticed this problem the most when working with images with values of greater than 6 across and 1 down. Anyone know whats up with that?

...the prophecy is true afterall... Vortex2000 has returned~
thaduke
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: USA, PA
Posted: 27th Jan 2004 03:39
btw, are images in an animated sprite file supposed to be flush (right up against eachother) or do they use a one-pixel border around all frames?

...the prophecy is true afterall... Vortex2000 has returned~
thaduke
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: USA, PA
Posted: 27th Jan 2004 06:33
UPDATE! After giving my animated sprite image a one pixel border around each image within it, it has turned into jello! When i run a program with the animated sprite in it, the animated sprite "wobbles" or "jiggles" like jello. Sorta like if it was viewed through water, and the moving water made it look distorted

...the prophecy is true afterall... Vortex2000 has returned~
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jan 2004 10:40 Edited at: 27th Jan 2004 10:40
Animated sprite screens are usually spaced evenly. If you have found one on the net, it may be spaced at 16 or 32 pixel distances. To align each image, if you can't work out the distances you could make an avi, and place the sprites on top of each other. Then save each frame as a bmp. Or you could just make a picture using layers, and place the sprites on top of each other, then pick them all up, one at a time, and save them as individual pictures. Then use Load Image for each one.

Pincho.

thaduke
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: USA, PA
Posted: 27th Jan 2004 14:40
If your saying that each tile of the animated sprite needs to be the same size and spaced evenly, so that when cut into sections each image lines up properly, I have already done that. I assure you this image lines up properly when cut into sections. It is pixel perfect. Although, the images are rectangular. If i were to define the images so they had equal height and width (all squares), would that solve my problem?

...the prophecy is true afterall... Vortex2000 has returned~
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 27th Jan 2004 15:57
Animated sprites are broken at the minute. Do a search in the bug forum for full details. The problem is as described where the animation frames are distorted by the odd line or two and extra pixels here and there. It appears each frame is stretched.

Here is direct link:

http://www.thegamecreators.com/?m=forum_view&t=14254&b=15

Boo!
thaduke
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: USA, PA
Posted: 27th Jan 2004 23:30
Thankyou Pincho and Spooky for your help. Special thanks to Spooky for helping me understand whats going on. I guess i should have checked the bugs forum first. Hey spooky, if you ever hear of a "real" bug fix for animated sprites, I would be more than thankful if you notified me of the fix. Thanx

...the prophecy is true afterall... Vortex2000 has returned~
Kwiki Mart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location: PA
Posted: 27th Jan 2004 23:38
I like to keep my images the same size. if I had a sprite that was 64x64 then I would center the mass of the sprite and keep major body parts in the same location for each image. i.e. the head. One sprite i had worked fine walking right but when i mirrored the sprite to walk left it went "jello" on me. I found it was because not all of my images were the same width and the sprite jumped left and right. Easy fix though, I had to make sure that every image was the same size as the largest image.

and no the images do not need to anyware near each other on your master .bmp. As long as they are #ed correctly and the proper size it will work fine.

On target, On time!
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 28th Jan 2004 06:28
In the bug report, I posted a set of functions to do the same thing as the animate sprite commands. Here they are, it may help.


the demo uses this image, also in the bug report.

http://www.angelfire.com/rnb/closetoperfect/udeck.bmp

RGT may be gone but the best DBP forum is still alive and kicking, check it out.
http://www.dannywartnaby.co.uk/rgt/
thaduke
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: USA, PA
Posted: 28th Jan 2004 17:33
Thanks for both of your suggestions. CTP's animated sprite function is a great replacement for DB's buggy function. I was thinking of writing something like it myself.

...the prophecy is true afterall... Vortex2000 has returned~

Login to post a reply

Server time is: 2024-05-13 16:52:04
Your offset time is: 2024-05-13 16:52:04