4KB Explosions Contest

General discussion about LÖVE, Lua, game development, puns, and unicorns.
EMB
Citizen
Posts: 70
Joined: Sat Jan 08, 2011 8:49 pm

Re: 4KB Explosions Contest

Post by EMB »

WARNING! BENT RULES AHEAD!
Size: 1.52Kb (1, 559 bytes)
main.lua has been edited, although not in function.
EMB.explosions.love
(1.52 KiB) Downloaded 735 times
Last edited by EMB on Tue Feb 08, 2011 7:18 am, edited 1 time in total.
Request Programs
If Linux were a beer, it would be shipped in open barrels so that anybody could piss in it before delivery
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 4KB Explosions Contest

Post by Robin »

Error: you didn't include AnAL.
Help us help you: attach a .love.
EMB
Citizen
Posts: 70
Joined: Sat Jan 08, 2011 8:49 pm

Re: 4KB Explosions Contest

Post by EMB »

Sorry, it seems to be case sensitive only when put into a .love file...

Re-uploaded.
Request Programs
If Linux were a beer, it would be shipped in open barrels so that anybody could piss in it before delivery
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: 4KB Explosions Contest

Post 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
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 »

EMB wrote:WARNING! BENT RULES AHEAD!
:rofl:

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 :)
When I write def I mean function.
EMB
Citizen
Posts: 70
Joined: Sat Jan 08, 2011 8:49 pm

Re: 4KB Explosions Contest

Post 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".
Request Programs
If Linux were a beer, it would be shipped in open barrels so that anybody could piss in it before delivery
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: 4KB Explosions Contest

Post 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.
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 »

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 :)?
When I write def I mean function.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: 4KB Explosions Contest

Post 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.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: 4KB Explosions Contest

Post 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. :P
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests