Blue bordes on sprites !

Previous topic - Next topic

gregbug

Hi guys!

i'm always converting my libs (to semplify some things like, collision, alimation sprites list, bitmapfont, etc) originally writted for bmax...

now i added support for sprite animations...

all my sprites are in a single png with inside the frames of the animation...
i'm drawing it using polyvectos...
with previus version of glbasic is all ok even if i move the sprites 0.1 pixel
with 8.036 then sprites look like this (with a little blue border) (image attached).
the sprite sheet is png with alphachannel.. (image attached)

how do you think? is my fault?
PS: if i move the sprites exactly 1 pixel each time the blue border do not appears!.




[attachment deleted by admin]
Ciao Ciao,
Gianluca. (l'Aquila tornerà a volare alta nel cielo!!!!)

Hatonastick

#1
Actually I noticed that my game Star Pilot has exactly the same problem.

In my case I'm not using Polyvector, but I am using a PNG with alpha and a single frame from a sprite sheet which I display using ROTOZOOMANIM.  I'd always assumed it was my picture, but I just had a look using a program I have that can display PNG with transparency and it looks fine...

My sprites moves 1-4 pixels at a time mostly.  I'm wondering if it's a bug with the PNG loading library again.  Or maybe we've both forgotten something.  Wasn't there a trick to displaying/using PNG's in GLB?

[attachment deleted by admin]
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Ian Price

Are you ensuring that the anti-aliasing/interpolation is off by using SMOOTHSHADING FALSE? That might help. This ensures that pixels remain pixellated and not smoothed out. Don't know why this should change with the update to GLB though. If not the above, perhaps it's the alpha channel.
I came. I saw. I played.

Hatonastick

#3
Just tried that, made no difference my my case.  BTW I should point out that I've had this problem for ages, including with GLB 7.  I never said anything about it as I'd assumed it was something wrong with my sprite sheet (it may be still) and hadn't gotten around to checking it out until I saw this thread.  Tried it as a 24-bit image (original is 32-bit) with no change.

Hmm.  If this was a problem with GLB I'd have thought there would have been a lot of complaints, so I can't help thinking I've just done something odd or using an option I shouldn't.

Edit: Hmm this is interesting.  Ok I've solved it.  Sort of.  At least I've made the lines go away.

Ok heres the deal.

Loading the sprite sheet into Fireworks MX and saving it didn't remove the blue line.

Loading the sprite sheet into Paint.Net and saving it removed the blue line.

Loading the sprite sheet back into Fireworks MX and saving didn't add the blue line back.  Confused?  I sure am. :)

The sprites were originally slapped together and exported from the free edition of Graphics Gale.  As I'm having trouble remembering how to use this program, I can't tell you if that's how the blue line appeared.  At least not yet and in my case -- have no idea what Gregbug used to do his.

Edit:  Finally got Graphics Gale to add alpha and export it as part of the PNG image and sure enough the blue line is back.  I'd say it's either a bug with Graphics Gale or the PNG library it's using.  Maybe.  Anyway be interested to hear what Gregbug used to do his, and whether using something like Paint.net to load it, then save it back out again removes the blue line like it does when I try that.

Either way that's going to get annoying.  I'd switch back to Tile Studio but it looks like development has ceased on that one.

This is the PNG library that Graphics Gale uses apparently:
GLDPNG (c) 1998,2000 Copyright Tarquin All Rights Reserved.
ZLIB ver 1.1.2 (c) 1995-1996 Copyright Jean-loup Gailly and Mark Adler
http://www.phoenix-c.or.jp/~taki/

Edit: Gregbug, try using this modified sprite sheet.  I bet the blue lines have gone.  I tried it unmodified (the version you posted) and had blue lines, so I loaded it into Paint.net, saved it back out again and the blue lines (when I used this sheet in GLB) had gone.  So same issue as I had with my sprite sheet I suspect. ie.  Some graphics program using a slightly dodgy PNG library.

[attachment deleted by admin]
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

MrTAToad

I wouldn't be surprised if some painting packages use a dodgy PNG library.

I usually use either MS Paint or PhotoImpact for all my (non) drawings...

Hark0

#5
Graphics Gale its your friend!!!

IDEAL for animation too!!!!


ONLY WIN: http://www.humanbalance.net/gale/us/

For iphone, you can search EDGE Touch. Impressive

8)
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

Hatonastick

It's not my friend if it has a dodgy PNG library.  Mind you I'm using the Freeware version.  No idea if the paid version has the same problem, but then again I'm not going to buy it to find out.  Really wish there were other decent options besides Graphics Gale (which has had stability problems in the past) and Tile Studio (doesn't seem to be in development anymore).  Only other ones I've found are DOS based etc. which don't interest me at all.

If it wasn't for the fact that I've got too many projects I want to get done (after this game), I'd write my own.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

gregbug

 first of all thank you all for helping me! (This is really a great forum)

@Hatonastick

Quote from: Hatonastick on 2010-Jul-21
Edit: Gregbug, try using this modified sprite sheet.  I bet the blue lines have gone.  I tried it unmodified (the version you posted) and had blue lines, so I loaded it into Paint.net, saved it back out again and the blue lines (when I used this sheet in GLB) had gone.  So same issue as I had with my sprite sheet I suspect. ie.  Some graphics program using a slightly dodgy PNG library.

wow the modified sprite sheet work fine!!!!  =D
now i downloaded paint.net !!! and tested your method and work fine!!!  =D

thanks again!

originally i downloaded the single sprites form internet (8 single gif file) and converted in png and a sprite sheet from a simple program that i made in vb.net  ;/ . then loaded and save some times with photo shop CS3.  :o

..
thanks again!


Ciao Ciao,
Gianluca. (l'Aquila tornerà a volare alta nel cielo!!!!)

MrTAToad

Have you tried Pro Motion ?

gregbug

Quote from: MrTAToad on 2010-Jul-21
Have you tried Pro Motion ?

no... works well with png and alpha channel ?

is free on $$$ ?
Ciao Ciao,
Gianluca. (l'Aquila tornerà a volare alta nel cielo!!!!)

MrTAToad

Its $78 (£51, 61E), but there is a demo.

It should be fine with PNG's :)

Hatonastick

Isn't Pro Motion 8-bit colour only though?
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Ian Price

Don't forget GIMP - that is totally free and supports alpha.
I came. I saw. I played.

backslider

Gimp and Paint.Net are very good and FREE Graphic programs.

MrTAToad

QuoteIsn't Pro Motion 8-bit colour only though?
Only if it ran on a CGA graphics card :)