Code Golf Competition

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Code Golf Competition

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Code Golf Competition

by Krock » Post

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
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

Re: Code Golf Competition

by hoodedice » Post

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
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Code Golf Competition

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Code Golf Competition

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Code Golf Competition

by rubenwardy » Post

My submission for competition one:

485 characters.

https://gist.github.com/rubenwardy/76c11fdbfe06d5f29a44
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Code Golf Competition

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Code Golf Competition

by Krock » Post

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!
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: Code Golf Competition

by PilzAdam » Post

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
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Code Golf Competition

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

Re: Code Golf Competition

by Pavel_S » Post

Awesome work guys!

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: Code Golf Competition

by Evergreen » Post

Great idea! I may enter the next one.

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Code Golf Competition

by rubenwardy » Post

Evergreen wrote:Great idea! I may enter the next one.
You can enter the current one :P

It's got ages to go.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: Code Golf Competition

by Evergreen » Post

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.

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: Code Golf Competition

by Kilarin » Post

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: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: Code Golf Competition

by Sokomine » Post

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

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Code Golf Competition

by Hybrid Dog » Post

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

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: Code Golf Competition

by Evergreen » Post

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)

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: Code Golf Competition

by Kilarin » Post

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

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Code Golf Competition

by Hybrid Dog » Post

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

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Code Golf Competition

by rubenwardy » Post

I am open for suggestions for competitions.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Code Golf Competition

by Hybrid Dog » Post

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

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: Code Golf Competition

by Evergreen » Post

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
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Code Golf Competition

by Krock » Post

It's too calm here!

Let's make some

NOISE
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: Code Golf Competition

by twoelk » Post

Krock wrote:It's too calm here!

Let's make some

NOISE

is that "noisy" code?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests