Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very, very nice! Possible feature: would it be possible to generate unique individual links a la pastebin?

Just a "generate link button" that stored all the current values of the variables and spit out a link like:

  http://danielribeiro.github.com/WebGLCraft/7vDq0hGh
Though I suppose for pastebin et al. those are just database links. There is too much data here to store it in the actual url string itself :(

Maybe just an export/import to json button then?

I would use this, like, immediately to share designs and pattern ideas with friends.

Also possible tweak: I just built a very tall tower and jumped off. But it doesn't quite "feel" like Minecraft gravity over long distances. The acceleration or maybe just the terminal velocity feel too slow.



Random bit of maths, given if you want compatibility with older IE's you're limited to around 2000 characters in the fragment string. Assuming you base 64 encode to generate valid urls, you can only fit an 8x8x8 grid into the fragment string.


If you wanted to generate the same terrain, then you could save a particular seed for the random function which could be appended to the url.

That wouldn't include all the player made modifications to the terrain but it would give people the same world.


How would you generate which seed to use?


The seed could be generated using the default random function of your platform without specifying the seed (the default seed is likely based on some timestamp component).

You would then take the value the default random function gives you and feed it into the overloaded constructor which allows you to specify the seed.

That way you could still record the seed's value which was used to generate your terrain.


But the terrain wasn't generated using an rng, it was generated by the user placing and deleting blocks.


If you read my first comment in this thread, I stated that by recording the seed it would allow you to save the terrain generated by the game not any modifications or alterations a user added to it with their own block placement.

This is used frequently in Minecraft for players to share interesting maps which have randomly generated.


Sorry, I misunderstood.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: