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.

Newcomers DBPro Corner / Problem with sprite anim [DBP]

Author
Message
MrBlack
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: Switzerland
Posted: 1st Aug 2004 03:54
Hi,

I have this code to animate and move left/right a little character made of 10 JPG files. Here is the code :



When I run it and move the character, the image of him running is very "blurry". It seems out of focus when the anim runs.

If you wanna test for yourself (english not being my mothertongue, I have problems explaining my question ), you can download the 10 JPG there (25 KB) : http://www.inlogicstudio.com/divers/runner.zip

Thanx for your help !

You have failed me for the last time
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Aug 2004 20:37
Well first, the CLS command in the loop is rather worthless, it just slows things down. Not really that important right now for your program, it may become so later.

Second, JPG is a lousy format for animated graphics, because the compression used by them "bleeds" and "blurs" all over the place. Try bitmaps instead. Yes, they are larger, but they are cleaner.
S.

Any truly great code should be indisguishable from magic.
MrBlack
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: Switzerland
Posted: 3rd Aug 2004 03:45
Thank you. I'll try with BMP. Just have to say that the JPG used there are 100% quality / 0% compression level.

The CLS, I use not to have a blue screen behind the sprite.

You have failed me for the last time
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 3rd Aug 2004 05:33
Well, you see, the jpeg standard only "approximates" the pixels actually used in the image, while sprites in particular are sensitive to every pixel being drawn. It's a bit of a bother, but since they are usually small it's no big worry...
S.

Any truly great code should be indisguishable from magic.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Aug 2004 07:46
It might simply be the case that you're moving him too fast or updating his image too quickly.

Does this look any better:

MrBlack
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: Switzerland
Posted: 4th Aug 2004 15:31
Fantastic Sparky ! It looks excellent this way.

Many thanx

You have failed me for the last time

Login to post a reply

Server time is: 2024-09-22 19:18:25
Your offset time is: 2024-09-22 19:18:25