Page 9 of 14
Re: 4KB Explosions Contest
Posted: Mon Feb 07, 2011 9:45 pm
by EMB
WARNING! BENT RULES AHEAD!
Size: 1.52Kb (1, 559 bytes)
main.lua
has been edited, although not in function.
Re: 4KB Explosions Contest
Posted: Mon Feb 07, 2011 10:03 pm
by Robin
Error: you didn't include AnAL.
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 7:24 am
by EMB
Sorry, it seems to be case sensitive only when put into a .love file...
Re-uploaded.
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 8:49 am
by BlackBulletIV
Mate that's sneaky! I never thought of downloading assets from the internet. What I don't get it why you didn't use this technique to make something totally awesome, using more images (and not a sprite sheet, mind).
Also, why did you have to edit main.lua. Your .love file is already well below the limit.
Finally, I did encounter bugs. Explosion images overlap each other, and I had the sound cut out for some reason.
But aside from that, congratulations on coming up with such an interesting technique.
For everyone else, here's the loading code:
Code: Select all
function loadExplosions()
require("anal")
love.graphics.setBackgroundColor(140, 189, 243)
if not love.filesystem.exists("expo.png") then
local http = require("socket.http")
local b, c, h = http.request("http://love2d.org/w/images/e/e3/Resource-AnalExplosion.png")
love.filesystem.write("expo.png", b)
end
img = love.graphics.newImage("expo.png")
if not love.filesystem.exists("expo.mp3") then
local http = require("socket.http")
local b, c, h = http.request("http://soundbible.com/force-sounds.php?id=mp3/Depth%20Charge%20Shorter-SoundBible.com-1978501900.mp3&clip=mp3")
love.filesystem.write("expo.mp3", b)
end
sound = love.audio.newSource("expo.mp3", "static")
end
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 12:47 pm
by kikito
EMB wrote:WARNING! BENT RULES AHEAD!
The rules are bent indeed. Even if the resulting explosions are exactly the kind of thing I wanted to discourage, your ingenuity is encomiable.
However, I've decided to add another rule to prevent downloading in the future. Otherwise, this contest's main purpose (procedurally generate content) would be distorted.
Nevertheless, your entry was valid when it was sent, so I've put it on the entry list with the others.
Let's see what other loopholes do people find
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 3:55 pm
by EMB
Don't worry, it was created as a joke in about an hour after thinking up the idea the previous night. (Why count sheep when you can find loopholes?)
The images overlap because the actual sprite sheet has a background, and I CBA to replace each BG pixel to make it transparent.
I don't know why the sound cut though...
Also: I test using a folder, and measured the folder's size forgetting it was going to be compressed T.T
That's why main.lua and anal.lua are "neutered".
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 7:13 pm
by BlackBulletIV
kikito wrote:However, I've decided to add another rule to prevent downloading in the future. Otherwise, this contest's main purpose (procedurally generate content) would be distorted.
Argh, I thought you would do that. But that's only fair, I could create explosions of grand proportions if assets were downloaded.
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 7:19 pm
by kikito
BlackBulletIV wrote:Argh, I thought you would do that. But that's only fair, I could create explosions of grand proportions if assets were downloaded.
Well, you can also create them
without downloading, as you have demonstrated yourself
.
Feeling like giving it another try
?
Re: 4KB Explosions Contest
Posted: Tue Feb 08, 2011 7:42 pm
by BlackBulletIV
Of course you can create one, it's that by downloading stuff you could create really awesome ones.
Yeah I want to give it another try, but time is the issue. We'll see.
Re: 4KB Explosions Contest
Posted: Wed Feb 09, 2011 3:58 pm
by Taehl
EMB wrote:WARNING! BENT RULES AHEAD!
Size: 1.52Kb (1, 559 bytes)
main.lua has been edited, although not in function.
Code: Select all
Error
explosions.lua:8: Second argument needed.
... Yes, I actually use my firewall. So sue me.