Code Golf Competition

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Code Golf Competition

by rubenwardy » Wed May 07, 2014 18:03

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.
Last edited by rubenwardy on Sun May 25, 2014 14:29, edited 4 times in total.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Code Golf Competition

by Krock » Wed May 07, 2014 18:22

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
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

Re: Code Golf Competition

by hoodedice » Wed May 07, 2014 18:30

Can you PLEEEEEEEEEEEEEEEEEEEEEEEEEEEASE extend it to three weeks? I am busy this week, and having just a week is too less for me =(
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Wed May 07, 2014 18:42

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.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Code Golf Competition

by Krock » Wed May 07, 2014 18:50

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!
Last edited by Krock on Wed May 07, 2014 19:16, edited 6 times in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Wed May 07, 2014 18:52

My submission for competition one:

485 characters.

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

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Wed May 07, 2014 18:56

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.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Code Golf Competition

by Krock » Wed May 07, 2014 19:00

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!
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

Re: Code Golf Competition

by PilzAdam » Wed May 07, 2014 20:49

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?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Thu May 08, 2014 16:47

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.
 

User avatar
Pavel_S
Member
 
Posts: 131
Joined: Sat Apr 06, 2013 11:43

Re: Code Golf Competition

by Pavel_S » Thu May 08, 2014 17:51

Awesome work guys!
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Code Golf Competition

by Evergreen » Thu May 08, 2014 18:06

Great idea! I may enter the next one.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Thu May 08, 2014 18:21

Evergreen wrote:Great idea! I may enter the next one.


You can enter the current one :P

It's got ages to go.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Code Golf Competition

by Evergreen » Thu May 08, 2014 18:26

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.
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Code Golf Competition

by Kilarin » Fri May 09, 2014 00:44

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
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Code Golf Competition

by Sokomine » Fri May 09, 2014 01:34

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 :-)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Code Golf Competition

by Hybrid Dog » Fri May 09, 2014 18:32

̣
Last edited by Hybrid Dog on Thu May 22, 2014 17:39, edited 1 time in total.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Code Golf Competition

by Evergreen » Fri May 09, 2014 18:47

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)
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: Code Golf Competition

by Kilarin » Fri May 09, 2014 18:53

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. :)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Code Golf Competition

by Hybrid Dog » Fri May 09, 2014 19:08

̣
Last edited by Hybrid Dog on Thu May 22, 2014 17:39, edited 1 time in total.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Fri May 09, 2014 19:48

I am open for suggestions for competitions.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Code Golf Competition

by Hybrid Dog » Fri May 09, 2014 20:53

̣
Last edited by Hybrid Dog on Thu May 22, 2014 17:39, edited 1 time in total.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Code Golf Competition

by Evergreen » Fri May 09, 2014 22:14

I actually had that idea for the moon mod. I think it's a bit much for this kind of competition though.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Code Golf Competition

by Krock » Mon May 19, 2014 13:43

It's too calm here!

Let's make some

NOISE
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Code Golf Competition

by twoelk » Mon May 19, 2014 15:28

Krock wrote:It's too calm here!

Let's make some

NOISE



is that "noisy" code?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Code Golf Competition

by Krock » Mon May 19, 2014 15:49

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.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

Re: Code Golf Competition

by PilzAdam » Mon May 19, 2014 16:08

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).
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

Re: Code Golf Competition

by hoodedice » Mon May 19, 2014 21:08

I was thinking of making the most obfuscated code, but PA beat me to it
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

Re: Code Golf Competition

by PilzAdam » Sun May 25, 2014 00:26

When will the winner be announced?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Code Golf Competition

by rubenwardy » Sun May 25, 2014 12:58

PilzAdam wins for both categories

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

Next

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron