4KB Explosions Contest

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: * 4KB Explosions Contest *

Post 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!
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: 4KB Explosions Contest

Post by TechnoCat »

Multiple submissions from the same person? yes/no?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: 4KB Explosions Contest

Post by kikito »

TechnoCat wrote:Multiple submissions from the same person? yes/no?
Yes!
When I write def I mean function.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: * 4KB Explosions Contest *

Post 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.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: * 4KB Explosions Contest *

Post 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.
Attachments
sprite.png
sprite.png (2.55 KiB) Viewed 2690 times
Kurosuke needs beta testers
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: 4KB Explosions Contest

Post by thelinx »

One pngcrush later...
Attachments
sprite.pngcrushed.png
sprite.pngcrushed.png (2 KiB) Viewed 2688 times
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: 4KB Explosions Contest

Post by TechnoCat »

PNG-8. Obvious jaggies, but much much smaller.
windwaker.png
windwaker.png (564 Bytes) Viewed 2685 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.
Last edited by TechnoCat on Tue Jan 11, 2011 6:12 pm, edited 1 time in total.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: 4KB Explosions Contest

Post by kikito »

Mmm what about using a 16-color pallete?
windwaker.gif
windwaker.gif (862 Bytes) Viewed 2684 times
Borders may require some code retouching, but the internal details are conserved ... and only 862 bytes!
When I write def I mean function.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: 4KB Explosions Contest

Post 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.
Last edited by tentus on Tue Jan 11, 2011 6:19 pm, edited 1 time in total.
Kurosuke needs beta testers
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: 4KB Explosions Contest

Post 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 )
Last edited by TechnoCat on Tue Jan 11, 2011 6:28 pm, edited 6 times in total.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 10 guests