Blurry Sprites?

BlitzMax Forums/BlitzMax Programming/Blurry Sprites?

AvestheFox(Posted 2011) [#1]


Notice the purple dragon thing. notice that he's blurred here in this position of the map. This only happens when he's in certain positions and I'm going to assume that the x position is in a floating point.

At first I thought maybe the sprite was flickering back and forth between two none floating points but then I took this snapshot and it just seems to be blurred.

On a second note, I'm porting this code all from B3D.

Not that I have so much a problem with it (it looks kind of interesting) but Is this normal in BMax?

Last edited 2011

Last edited 2011


Czar Flavius(Posted 2011) [#2]
If the position is a float, and between two integer values, it blurs the image. If you don't want this to happen, convert the positions to integers at the point of drawing.

Or look up LoadImage in the help file and look at the FILTEREDIMAGE flag.

Your game looks cool!

Last edited 2011


AvestheFox(Posted 2011) [#3]
Thanks! :) I've been working hard at it everyday for the past month.


zzz(Posted 2011) [#4]
A bit OT, but is that spike by any chance?


AvestheFox(Posted 2011) [#5]
@zzz, well, since you've guessed correctly, are you from Ponychan or Equestria Daily or neither?


Grisu(Posted 2011) [#6]
I love little dragons. Any test demo ready yet?! :)


zzz(Posted 2011) [#7]
@AvestTheFox: i lurk ponychan a bit when im bored. it was b of all places that gave me a bad case of pony lol.. i just didnt see that one coming :p


AvestheFox(Posted 2011) [#8]
@Grisu there had been three test demos since the production in B3D. you can find the dload links on my blog.. and to shorten the search for you here's all the posts involving test demos: http://spikeqdev.blogspot.com/search/label/Test%20Demos


AvestheFox(Posted 2011) [#9]
@zzz lol, yeah. its a bit insane :3

the ponychan thread concerning this game is in /collab/ (or here: http://www.ponychan.net/chan/collab/res/10544.html ) I update it daily along with the blog.


col(Posted 2011) [#10]
Hiya. Looks great.
I see there is some bug reports and feedback on your site already, so there's no point repeating them here.


Notice the purple dragon thing.


Did you fix this issue?
I was going to say it may have something to do with the upscaling of the character. He's at 32x32 pixels in his original form. As a suggestion I'd make the all of the gfx as the biggest/highest resolution then down-scale them rather than upscale. Or Maybe have a couple of different versions at resolutions that are different from each other? Say a set at 64x64 and 32x32?

Just my 2 pennies worth.

It does look great by the way :-)


ImaginaryHuman(Posted 2011) [#11]
It might be that a) you're using mipmaps, and b) if you are maybe the scale you're using is causing the next lower mipmap level to be used to render the sprite, which has half the resolution, and as a result it's doing bilinear filtering to scale up to the current size, causing a blur? Cus it kinda looks like it's a half resolution.


Czar Flavius(Posted 2011) [#12]
For that kind of game I would not scale the character image.


col(Posted 2011) [#13]
@Czar Flavius

Nor would I, but he's making the window dynamic sizeable ( which I personally wouldn't do also, but it's not my game ), and also gives a choice of resolutions too.

Hence the reason I suggest to use maybe more than 1 set of tile gfx, and depending on the resolution chosen, choose the correct tileset to give the best looking result.


AvestheFox(Posted 2011) [#14]
Uh, guys, I scaled the screenshot to that size, not the game ;)

the original resolution is 240 x 160 ... gba default

the screenshot was scaled to make the subject more clear


ImaginaryHuman(Posted 2011) [#15]
Are you drawing the sprite at its original size or are you scaling?


AvestheFox(Posted 2011) [#16]
Drawing them as their original size.

Spike's sprite is indeed 32 x 32 on a 16 x 16 tile map


Jesse(Posted 2011) [#17]
can you post the original sprite image?


AvestheFox(Posted 2011) [#18]
Here ya go



Last edited 2011


5quid(Posted 2011) [#19]
Looks to me like you just need to turn off the FILTEREDIMAGE flag in the LoadImage for your sprites. The default flags for loading images is MASKEDIMAGE | FILTEREDIMAGE. So if you are using LoadImage or LoadAnimImage just add MASKEDIMAGE to the flags option to override the autoflags. This will get rid of the filtered image problem you are having. For example:

LoadImage( "myimage.jpg", MASKEDIMAGE );

Last edited 2011