GLBasic forum

Main forum => GLBasic - en => Topic started by: gregbug on 2010-Jul-21

Title: Blue bordes on sprites !
Post by: gregbug on 2010-Jul-21
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]
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-21
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]
Title: Re: Blue bordes on sprites !
Post by: Ian Price on 2010-Jul-21
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.
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-21
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]
Title: Re: Blue bordes on sprites !
Post by: MrTAToad on 2010-Jul-21
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...
Title: Re: Blue bordes on sprites !
Post by: Hark0 on 2010-Jul-21
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)
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-21
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.
Title: Re: Blue bordes on sprites !
Post by: gregbug on 2010-Jul-21
 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!


Title: Re: Blue bordes on sprites !
Post by: MrTAToad on 2010-Jul-21
Have you tried Pro Motion ?
Title: Re: Blue bordes on sprites !
Post by: gregbug on 2010-Jul-22
Quote from: MrTAToad on 2010-Jul-21
Have you tried Pro Motion ?

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

is free on $$$ ?
Title: Re: Blue bordes on sprites !
Post by: MrTAToad on 2010-Jul-22
Its $78 (£51, 61E), but there is a demo.

It should be fine with PNG's :)
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-22
Isn't Pro Motion 8-bit colour only though?
Title: Re: Blue bordes on sprites !
Post by: Ian Price on 2010-Jul-22
Don't forget GIMP - that is totally free and supports alpha.
Title: Re: Blue bordes on sprites !
Post by: backslider on 2010-Jul-22
Gimp and Paint.Net are very good and FREE Graphic programs.
Title: Re: Blue bordes on sprites !
Post by: MrTAToad on 2010-Jul-22
QuoteIsn't Pro Motion 8-bit colour only though?
Only if it ran on a CGA graphics card :)
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-22
Edit: Never mind.

Anyway tried it, don't like it.  Guess it's going to be Graphics Gale after all.  Or Paint.net (which is easier and more intuitive to use to be honest).
Title: Re: Blue bordes on sprites !
Post by: Ian Price on 2010-Jul-22
Personally, I stick with MSPaint (borrowed from XP, not that horrible Windows7 shite). I only really use GIMP for adding alpha to my Wiz icons.
Title: Re: Blue bordes on sprites !
Post by: MrTAToad on 2010-Jul-22
Quote from: Hatonastick on 2010-Jul-22
Edit: Never mind.

Anyway tried it, don't like it.  Guess it's going to be Graphics Gale after all.  Or Paint.net (which is easier and more intuitive to use to be honest).
Yes, I didn't like it much either :)
Title: Re: Blue bordes on sprites !
Post by: Kitty Hello on 2010-Jul-23
I have Corel Photo Paint X4 now... And I don't know how to work with alpha. I'm getting old.
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-23
Quote from: Kitty Hello on 2010-Jul-23
I have Corel Photo Paint X4 now... And I don't know how to work with alpha. I'm getting old.
You can complain about that when you get as old as I am.  Or actually Ian because he's one year older than me.  =D

I'm looking at buying my first digital pad in years.  This time I'm getting a Wacom instead of a very cheap and nasty knock-off.  It's going to break my bank for sometime (despite being the lower end of the scale for their pads) but it's going to be worth it.  It also comes with Photoshop Elements which will be the first time in years that I've used that.  Whats Corel Photo Paint X4 like?
Title: Re: Blue bordes on sprites !
Post by: Kitty Hello on 2010-Jul-23
Corel Draw (Vector) is the best vector program IMO. But I never was good at the pixel program the offer. It's sort of photo shop. For pixel images it's not that good. I prefer MSPaint (XP) for that.
Title: Re: Blue bordes on sprites !
Post by: backslider on 2010-Jul-23
Paint.Net is good, too for Pixels because you can add alpha to each pixel (if you want) :)
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-23
Quote from: Kitty Hello on 2010-Jul-23
Corel Draw (Vector) is the best vector program IMO. But I never was good at the pixel program the offer. It's sort of photo shop. For pixel images it's not that good. I prefer MSPaint (XP) for that.
Hmm really?  I used to do all my cartoons in vector form and have been looking for a replacement product for what I used to use ie. Macromedia (products now owned by Adobe I think) Fireworks.  I used to push the limits of the program a lot because I also used to do 'paintings' in Fireworks even though it was really only designed to make creating simple graphics for webpages, but I did them as vectors instead of bitmaps because it meant I could easily edit and make rather interesting changes on the fly.  However it would take aaaaaaages to load each time and if I decided to select all it would almost cause my computer to lock up.  Fireworks wont even load some of the pictures now but thankfully it saved all pictures in a sort of dual PNG format that allowed other programs to see them as bitmaps so I can still load them. =D

Only downside is that all the Corel stuff costs an arm and a leg.

PS My avatar is a vector 'painting' done in Fireworks.  Even though this particular version is only 80x80 pixels, the original PNG file is almost 2Mb. :)
Title: Re: Blue bordes on sprites !
Post by: Moru on 2010-Jul-23
I used CorelDraw 8 a lot but mostly black/white or simple colors for logos, maps and similar stuff. Great program but a bit overpriced for the stuff we used it for :-) I'm not sure how good it is for sketching though.
Title: Re: Blue bordes on sprites !
Post by: Kitty Hello on 2010-Jul-23
I get the version 2 releases behind every now and then. About EUR 99 a pack.
Title: Re: Blue bordes on sprites !
Post by: matchy on 2010-Jul-23
I use Adobe Illustrator and have found it useful to export shape points with VBScript and import to GLB polyvector. :)
Title: Re: Blue bordes on sprites !
Post by: Wampus on 2010-Jul-23
I've been using Graphics Gale to put together some animations but I've been saving as BMP, i.e. only been using a single colour as transparency and no alpha channel. Because of that I've not seen problems but thanks for the head's up.
Title: Re: Blue bordes on sprites !
Post by: ketil on 2010-Jul-27
I use PhotoImpact or Gimp (depending on what i want to do), but I hear very good things about Pro Motion from some of my friends in the demoscene.

They say that Pro Motion is very good for animations, and it that it got "the DeluxePaint feeling".
It also includes an integrated Map/Tile editor for levels (thats why I'm probably going to buy it).

But ... for now: PhotoImpact, Gimp and Tiled (this is so cool) for doing graphics and levels.
Title: Re: Blue bordes on sprites !
Post by: Hatonastick on 2010-Jul-27
Quote from: Ragaril on 2010-Jul-23
I've been using Graphics Gale to put together some animations but I've been saving as BMP, i.e. only been using a single colour as transparency and no alpha channel. Because of that I've not seen problems but thanks for the head's up.
Yeah seems to be tied into the PNG library they are using.  From what I could see it's pretty ancient.  I think I'll be going BMP's from now on myself with GG.
Title: Re: Blue bordes on sprites !
Post by: aonyn on 2010-Jul-27
Personally, this is my vector graphics editor of choice.
http://www.xara.com/us/ (http://www.xara.com/us/)

I have been a CG guy, both 2D and 3D since about 1992.
I was a long time adobe guy, until I discovered Xara, and really have not looked back.
I never touch illustrator, and only occasionally do I need photoshop.
I also used Corel many years ago.
Xara is just very fast, easy to use, and priced very reasonably compared to the others, especially adobe.
And it handles alpha for png very simply.

For 3D work, I use modo.
http://www.luxology.com/ (http://www.luxology.com/)
A bit on the expensive side, but still a bargain compared to max or maya, and very nice interface.

I know this was off topic, but figured I would point out Xara since the topic of editors was mentioned.