PDA

View Full Version : I would love a level code generator...


krcm0209
7 Jun 2009, 04:03
Almost every time I start up Worms and host a game, I find it hard to get a level I like by randomly generating codes. I came up with this idea during my first few times playing online. It would be awesome if Team 17 or some other party released a website or service that gave you an empty drawing box and a simple drawing tool. What this would do is allow you to draw out a map/level to your liking and then it would spit out a code to put into the code field in Worms PSN level generator.

Example:
I want to play a level with platforms in specific spots on the map and maybe a small island in the lower right corner. I go and draw out that level in the box and click submit. I then recieve a code to generate that level in Worms.

What do you think?

Wormetti
7 Jun 2009, 11:26
The codes can't translate to any level. It puts the code through an algorithm and spits out a level. You wouldn't be able to manually draw a level that fit exactly with the algorithm.

Muzer
7 Jun 2009, 12:49
What Wormetti said. It's the codes that generate the maps, the process can't be reversed (unless the map fits exactly, which is extremely unlikely).

AndrewTaylor
7 Jun 2009, 15:53
Even so, there's no way to work out what code would lead to a given terrain without just trying them all.

Muzer
7 Jun 2009, 15:59
If it uses the same algorithm as the previous ones, it will convert all codes down to 8 hex digits (32-bit). Each code then has 8 different variations (corresponding to the 8 mini thumbnails in the W:A map editor). So there will be (2^32) * 8 = 4294967296 * 8 = 34 359 738 368 combinations.

No idea how fast the PS3 is and whether a bruteforce is feasible...

(And yes, I do know that 2^32 = 4294967296 off by heart. I'm just that sad. I did the second calculation with google though :p)

AndrewTaylor
7 Jun 2009, 17:15
The best you could do would be to generate and MD5 all the terrains. This would take months, even with several computers. Then you store all the MD5s. This would take 69GB. Then you'd want to sort them into order of the MD5 hash and store again.

Then, when you've drawn a landscape, you could work out its MD5 and look it up. Then you generate any landscapes with matching hashes and see if they really match. They never, ever will.

Finding landscape codes that are similar to the one you input is not remotely feasible. It's far more sensible to just bash 'random' until you see one you like and write it down.

krcm0209
7 Jun 2009, 18:05
Well, that's too bad... I was really hoping there was a way to reverse the process. :(

MtlAngelus
11 Jun 2009, 09:50
They could add the ability to upload your favorite code(s), and have people rate them. That way they could have a database of codes that generate maps that people like, and you could use that to browse popular maps... it's unlike that'll happen tho.

Alternatively, you can post here (or in a new, dedicated thread) the codes you liked and expect a few more people to do the same, and eventually you'll build a database of your own.

vhero
17 Jun 2009, 21:28
alternatively they could allow images to be turned into maps whcih would be a LOT easier..

MtlAngelus
19 Jun 2009, 08:39
That would lead to a number of issues tho.

They'd have to make sure maps are at least a certain size to allow the game enough space to accommodate worms and props in there, for example.

Also there'd be the issue of people using inappropriate images in maps.