Page 2 of 14
Re: * 4KB Explosions Contest *
Posted: Mon Jan 10, 2011 11:52 am
by nevon
tentus wrote:Ryne wrote:But Kikito, I'm not good enough
. I am however, interested to see the results.
I'm gonna try my hand at procedurally animating a Wind Waker style explosion: if you want to whip up some 2 color 64x64 alpha'd art resources I bet we could find one that would work. (See attached example I threw together).
I've actually thought about doing something like that for a long time (or rather, I've thought "Man, the explosions in Wind Waker are awesome. I should so make something like that for my next game!"). Can't wait to see what you come up with!
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 4:31 am
by TechnoCat
Multiple submissions from the same person? yes/no?
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 7:00 am
by kikito
TechnoCat wrote:Multiple submissions from the same person? yes/no?
Yes!
Re: * 4KB Explosions Contest *
Posted: Tue Jan 11, 2011 5:40 pm
by TechnoCat
tentus wrote:I'm gonna try my hand at procedurally animating a Wind Waker style explosion: if you want to whip up some 2 color 64x64 alpha'd art resources I bet we could find one that would work.
If you can make the image even smaller by removing the alpha channel, just choose that green color and make it transparent in ImageData.
Re: * 4KB Explosions Contest *
Posted: Tue Jan 11, 2011 5:55 pm
by tentus
TechnoCat wrote:tentus wrote:I'm gonna try my hand at procedurally animating a Wind Waker style explosion: if you want to whip up some 2 color 64x64 alpha'd art resources I bet we could find one that would work.
If you can make the image even smaller by removing the alpha channel, just choose that green color and make it transparent in ImageData.
Actually, it'd raise the filesize by 95 bytes, with both of the images using the best PNG compression I can count on to be universally supported. Wouldn't that also cause aliasing problems?
I am interested in how you would code that, though, since I haven't done that in Love yet.
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 6:01 pm
by thelinx
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 6:07 pm
by TechnoCat
PNG-8. Obvious jaggies, but much much smaller.
- windwaker.png (564 Bytes) Viewed 2680 times
EDIT: oh crap, it blurred in the green.
It is hard to tell if it is going to be under 4kb before you zip your explosion.
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 6:10 pm
by kikito
Mmm what about using a 16-color pallete?
- windwaker.gif (862 Bytes) Viewed 2679 times
Borders may require some code retouching, but the internal details are conserved ... and only 862 bytes!
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 6:14 pm
by tentus
@thelinx: I've had nasty luck with PNGCRUSH, it used to crash Sauerbraten, a game engine I used to be very active with (this may be fixed now, I have no idea). Would you mind compressing the other one, for comparison's sake?
@kikito/Technocat: Bad aliasing drives me nuts. How would you do it in code, so I can see how the results turn out? Also, PNG-8 has some well-known gamma problems (
http://hsivonen.iki.fi/png-gamma/). This might not be true within Love, but I still shy away from the format.
Re: 4KB Explosions Contest
Posted: Tue Jan 11, 2011 6:19 pm
by TechnoCat
tentus wrote:@kikito/Technocat: Bad aliasing drives me nuts. How would you do it in code, so I can see how the results turn out? Also, PNG-8 has some well-known gamma problems (
http://hsivonen.iki.fi/png-gamma/). This might not be true within Love, but I still shy away from the format.
You can't have soft edges with no alpha channel.
But an easy way to turn green into transparent would be to use
http://love2d.org/wiki/ImageData:mapPixel
Code: Select all
function pixelFunction(x, y, r, g, b, a)
if r==0 and g==255 and b==0 then
a = 0
end
return r, g, b, a
end
ImageData:mapPixel( pixelFunction )