Code Golf Competition

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

Re: Code Golf Competition

by Hybrid Dog » Sun May 25, 2014 13:11

rubenwardy wrote:PilzAdam wins for both categories

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

city map generation (with houses)
 

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 14:29

Hybrid Dog wrote:
rubenwardy wrote:PilzAdam wins for both categories

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

city map generation (with houses)


Good idea, but there needs to be rules.

What do you think of these?

  • Flat land generation is allowed.
  • Houses can not overlap, or corrupt each other.
  • WorldEdit is not allowed.
  • Schematic files are counted in the character count.
  • Houses must be a 9x9x5 hollow cube with a 7x7x3 space inside. (width, depth, height)
  • Roofs must be sloped.
  • Houses can be made out of any material.
  • Must have a floor.
  • Houses must have one door in the middle of one side.
  • The door must be accessible at all times.
  • Houses need to generate in village hotspots, villages contain a minimum of 10 houses.
  • loadstring() or eval() functions are not allowed.

This may be too many rules, suggest which ones to get rid of. Or what to add.
Last edited by rubenwardy on Sun May 25, 2014 17:36, edited 2 times in total.
 

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

Re: Code Golf Competition

by Hybrid Dog » Sun May 25, 2014 15:57

rubenwardy wrote:Houses must be a 9x9 hollow cube with a 7x7 space inside.

I think worldedit should be allowed but if it's used, the chance is smaller to win the contest.
 

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

Re: Code Golf Competition

by Sokomine » Tue May 27, 2014 18:21

City map generation is not trivial. So far, to my knowledge, only MirceaKitsune, Nore and I followed it through - with very similar approaches. Nores mapgen also allowes for smaller side-roads and is already well integrated into a mapgen. I havn't checked on the latest version of MirceaKitsunes villages.

rubenwardy wrote: WorldEdit is not allowed.

WorldEdit would mean doing it manually. Using WorldEdit for loading the savefiles of buildings is definitely ok.

rubenwardy wrote: Schematic files are counted in the character count.

Er, for what? Code size? They're not relevant in that regard. They're the data part - like textures and such. Building houses that would fit well into a village or town might be something for a nice building contest though.

rubenwardy wrote: Houses must be a 9x9x5 hollow cube with a 7x7x3 space inside. (width, depth, height)
Roofs must be sloped.
Houses can be made out of any material.
Must have a floor.
Houses must have one door in the middle of one side.

Sounds a bit boring. City/village map generators usually aim at spawning *any* building - usually from a WorldEdit or schematics savefile. Thus, Nores mapgen can spawn my village houses as well.

The general approach of a village mapgen (at least Nore and I took this approach) is to create a data structure which holds information about the village: Where are the roads? Where does a building start (and which one), how is it orientated? Other factors are: How many of that type of building are desired per village?
 

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 » Tue May 27, 2014 18:47

Sokomine wrote:City map generation is not trivial. So far, to my knowledge, only MirceaKitsune, Nore and I followed it through - with very similar approaches. Nores mapgen also allowes for smaller side-roads and is already well integrated into a mapgen. I havn't checked on the latest version of MirceaKitsunes villages.

rubenwardy wrote: WorldEdit is not allowed.

WorldEdit would mean doing it manually. Using WorldEdit for loading the savefiles of buildings is definitely ok.

rubenwardy wrote: Schematic files are counted in the character count.

Er, for what? Code size? They're not relevant in that regard. They're the data part - like textures and such. Building houses that would fit well into a village or town might be something for a nice building contest though.

rubenwardy wrote: Houses must be a 9x9x5 hollow cube with a 7x7x3 space inside. (width, depth, height)
Roofs must be sloped.
Houses can be made out of any material.
Must have a floor.
Houses must have one door in the middle of one side.

Sounds a bit boring. City/village map generators usually aim at spawning *any* building - usually from a WorldEdit or schematics savefile. Thus, Nores mapgen can spawn my village houses as well.

The general approach of a village mapgen (at least Nore and I took this approach) is to create a data structure which holds information about the village: Where are the roads? Where does a building start (and which one), how is it orientated? Other factors are: How many of that type of building are desired per village?


This is a code golf competition. It needs to have tight specifications, otherwise people could say: "here is a single node. It is a house."
 

Previous

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 17 guests

cron