Page 1 of 2

Code Golf Competition

PostPosted: Wed May 07, 2014 18:03
by rubenwardy

Winning


For each competition, there are two categories you can win:
  • The shortest mod measured in characters. (code golfing)
  • The most obfuscated mod (the hardest to understand how it works)

Competition 1 (Closed)


  • Adds spikes which kill the player when touched and then explodes, destroying blocks in a 5 node radius (sphere).
  • The mod has to run on vanilla minetest_game and Minetest engine, without any additional mods.

Winner for both categories: PilzAdam.

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 18:22
by Krock
rubenwardy wrote:
  • The shortest mod measured in characters. (code golfing)
  • The most obfuscated mod (the hardest to understand how it works)

Much 1337
Very LEET
Such obfuscated

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 18:30
by hoodedice
Can you PLEEEEEEEEEEEEEEEEEEEEEEEEEEEASE extend it to three weeks? I am busy this week, and having just a week is too less for me =(

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 18:42
by rubenwardy
hoodedice wrote:Can you PLEEEEEEEEEEEEEEEEEEEEEEEEEEEASE extend it to three weeks? I am busy this week, and having just a week is too less for me =(


I am not sure if you are trolling or not.

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 18:50
by Krock
http://pastebin.com/e2aT5BCM
v2: https://gist.github.com/SmallJoker/abf9e25302d1f4c72140
Features:
Craftable!
Not much lag when checking every globalstep
MUCH lag on generating air
Useable even without the "legacy" mod!!
~readable


[del]465[/del] 446 CHARACTERS!

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 18:52
by rubenwardy
My submission for competition one:

485 characters.

https://gist.github.com/rubenwardy/76c11fdbfe06d5f29a44

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 18:56
by rubenwardy
Krock wrote:http://pastebin.com/e2aT5BCM
Features:
Craftable!
Not much lag when checking every globalstep
MUCH lag on generating air
Useable even without the "legacy" mod!!
~readable

465 CHARACTERS!


That is not a radius. It needs to explode in a sphere. I have clarified the top post.

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 19:00
by Krock
rubenwardy wrote:That is not a radius. It needs to explode in a sphere. I have clarified the top post.

Ye, you edited it right after I posted it!

Re: Code Golf Competition

PostPosted: Wed May 07, 2014 20:49
by PilzAdam
Here is my submission: https://gist.githubusercontent.com/Pilz ... tfile1.txt (paste it to init.lua in a mod folder; name doesn't matter).
You can use this image (move it to textures/a.png in the mod folder) if you want (not required for the mod to work) (I "wasted" over 50 characters to make the image work): Image

I have a "clear" version of this that is 1053 characters shorter, but I thought this is more fun.

EDIT: Can I submit both versions?

Re: Code Golf Competition

PostPosted: Thu May 08, 2014 16:47
by rubenwardy
PilzAdam wrote:Here is my submission: https://gist.githubusercontent.com/Pilz ... tfile1.txt (paste it to init.lua in a mod folder; name doesn't matter).
You can use this image (move it to textures/a.png in the mod folder) if you want (not required for the mod to work) (I "wasted" over 50 characters to make the image work): Image


That is hilarious, very well done.

PilzAdam wrote:I have a "clear" version of this that is 1053 characters shorter, but I thought this is more fun.
EDIT: Can I submit both versions?


I guess you can, one for each category.

Re: Code Golf Competition

PostPosted: Thu May 08, 2014 17:51
by Pavel_S
Awesome work guys!

Re: Code Golf Competition

PostPosted: Thu May 08, 2014 18:06
by Evergreen
Great idea! I may enter the next one.

Re: Code Golf Competition

PostPosted: Thu May 08, 2014 18:21
by rubenwardy
Evergreen wrote:Great idea! I may enter the next one.


You can enter the current one :P

It's got ages to go.

Re: Code Golf Competition

PostPosted: Thu May 08, 2014 18:26
by Evergreen
rubenwardy wrote:
Evergreen wrote:Great idea! I may enter the next one.


You can enter the current one :P

It's got ages to go.

I might give a shot at the shortest code. I'm not a lua syntax master though, so I might not do very well.

EDIT: Good thing it is an easy mod to write.

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 00:44
by Kilarin
rubenwardy wrote:For each competition, there are two categories you can win:
The shortest mod measured in characters. (code golfing)
The most obfuscated mod (the hardest to understand how it works)


If you hadn't specified the whole "spike" thing, then I think it would be obvious that the Air Sword mod wins BOTH categories. It's impossible to make a mod with less code, AND, reading through the thread makes it obvious that many folks still can't figure out how it works. :D

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 01:34
by Sokomine
The idea of the contest is very intresting, although the current issue is nothing I'm intrested in. Hope there will be subsequent contests with other topics :-)

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 18:32
by Hybrid Dog
̣

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 18:47
by Evergreen
Hybrid Dog wrote:
Sokomine wrote:The idea of the contest is very intresting, although the current issue is nothing I'm intrested in. Hope there will be subsequent contests with other topics :-)

What about using old mod requests (without telling this) for contests? So the mods which were requested (and ignored) some time ago would finally be created.

+1 Of course, there would have to be a twist on it (if it's a fairly easy mod to create)

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 18:53
by Kilarin
Evergreen wrote:
Hybrid Dog wrote:What about using old mod requests (without telling this) for contests?
Of course, there would have to be a twist on it (if it's a fairly easy mod to create)

Just add "and then explodes" to the end of the old mod request description. :)

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 19:08
by Hybrid Dog
̣

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 19:48
by rubenwardy
I am open for suggestions for competitions.

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 20:53
by Hybrid Dog
̣

Re: Code Golf Competition

PostPosted: Fri May 09, 2014 22:14
by Evergreen
I actually had that idea for the moon mod. I think it's a bit much for this kind of competition though.

Re: Code Golf Competition

PostPosted: Mon May 19, 2014 13:43
by Krock
It's too calm here!

Let's make some

NOISE

Re: Code Golf Competition

PostPosted: Mon May 19, 2014 15:28
by twoelk
Krock wrote:It's too calm here!

Let's make some

NOISE



is that "noisy" code?

Re: Code Golf Competition

PostPosted: Mon May 19, 2014 15:49
by Krock
twoelk wrote:
Krock wrote:It's too calm here!

Let's make some

NOISE



is that "noisy" code?


Yes, it has a builtin and well hidden [noise] code.

Re: Code Golf Competition

PostPosted: Mon May 19, 2014 16:08
by PilzAdam
Here is my submission for the shortest code: https://gist.github.com/PilzAdam/08eb6e724fe19f15870d
The nodename is "a" (same as in my obfuscated submission). It has 334 characters.
Here is a version, that supports the image from my other submission: https://gist.github.com/PilzAdam/4bcc9853676b4f404935 (it has 56 characters more).

Re: Code Golf Competition

PostPosted: Mon May 19, 2014 21:08
by hoodedice
I was thinking of making the most obfuscated code, but PA beat me to it

Re: Code Golf Competition

PostPosted: Sun May 25, 2014 00:26
by PilzAdam
When will the winner be announced?

Re: Code Golf Competition

PostPosted: Sun May 25, 2014 12:58
by rubenwardy
PilzAdam wins for both categories

I am trying to think about the next challenge. Any suggestions?