TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Island Generator

271 pointsby exuperoover 8 years ago

14 comments

Lercover 8 years ago
A somewhat obscure piece of trivia.<p>There&#x27;s code similar to this seen on a computer screen in digimon. <a href="http:&#x2F;&#x2F;i.imgur.com&#x2F;gh3dK.jpg" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;gh3dK.jpg</a><p>A translation from the Basic dialect into Javascript <a href="http:&#x2F;&#x2F;fingswotidun.com&#x2F;code&#x2F;index.php&#x2F;Digimon" rel="nofollow">http:&#x2F;&#x2F;fingswotidun.com&#x2F;code&#x2F;index.php&#x2F;Digimon</a><p>Press the play button to get it trying a series of random seeds.
GuiAover 8 years ago
Great writeup!<p><i>Notice that range stops just shy of 2π. Floating point math sometimes produces a final angle indistinguishably close to 2π, adding one extra vertex to our n-gon. To see for yourself, change (- tau 0.000001) to tau and set the number of sides to 6. You’ll see an extra point in the output very close to the starting point.</i><p>This is a &quot;trick&quot; that you find everywhere in graphics programming, and I can&#x27;t believe we&#x27;ve been programming for over half a century and still have to deal with crap like that in our tooling. It leads to code that, while readable to the initiated programmer, is not what it <i>should be</i>.
评论 #12928329 未加载
评论 #12927742 未加载
评论 #12935349 未加载
cossatotover 8 years ago
This is cool, thanks for posting. I especially like how there are several styles of coastlines.<p>I&#x27;m really interested in algorithmic generation of topography, probably by first creating fractal stream networks (either from the coast&#x2F; low elevation boundary or from watersheds&#x2F;drainage divides). I&#x27;m a geologist so most game-oriented topography generators look super unrealistic to me, but making stream networks and working from there would be helpful with quantitative landscape analysis and simulations. Anyone heard of anything like this? If nothing else, then some way of filling in a polygon with branch-like fractals?
评论 #12927552 未加载
评论 #12927017 未加载
评论 #12928244 未加载
david-givenover 8 years ago
See also the venerable xmountains (possibly already installed on your workstation).<p>Screenshot: <a href="https:&#x2F;&#x2F;osde8info.files.wordpress.com&#x2F;2007&#x2F;02&#x2F;6a00d4141b9517685e00d09e56ce08be2b.jpg" rel="nofollow">https:&#x2F;&#x2F;osde8info.files.wordpress.com&#x2F;2007&#x2F;02&#x2F;6a00d4141b9517...</a><p>There&#x27;s a writeup on how it works:<p><a href="http:&#x2F;&#x2F;www2.epcc.ed.ac.uk&#x2F;~spb&#x2F;xmountains&#x2F;about_xmountains.html" rel="nofollow">http:&#x2F;&#x2F;www2.epcc.ed.ac.uk&#x2F;~spb&#x2F;xmountains&#x2F;about_xmountains.h...</a><p>I don&#x27;t know how old it is, but the timestamp at the bottom of the HTML file above is 1997.
beeswaxover 8 years ago
Nice. For those interested in the topic Amit Patel has a great article on polygonal map generation. Also discusses features like elevation, moisture, rivers etc:<p><a href="http:&#x2F;&#x2F;www-cs-students.stanford.edu&#x2F;~amitp&#x2F;game-programming&#x2F;polygon-map-generation&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www-cs-students.stanford.edu&#x2F;~amitp&#x2F;game-programming&#x2F;...</a>
jimktrains2over 8 years ago
Really cool! beyond the generation, I learned about <a href="https:&#x2F;&#x2F;github.com&#x2F;viebel&#x2F;klipse" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;viebel&#x2F;klipse</a> which looks pretty cool. The whole post also makes me want to look more into clojure.<p>Aside: Is it OK to not have a &lt;head&gt; element?
评论 #12931902 未加载
tzakrajsover 8 years ago
Crashes safari on iPad Air 2
评论 #12926874 未加载
评论 #12927029 未加载
pavel_lishinover 8 years ago
Neat! I got a very marshy one on my third generation: <a href="http:&#x2F;&#x2F;imgur.com&#x2F;doRJskF" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;doRJskF</a>
pmyjavecover 8 years ago
Very cool! I&#x27;m a keen surfer, and the imagination runs wild seeing each newly generated island.
tunnuzover 8 years ago
It&#x27;s broken. I just used it, and it randomly generated Australia (<a href="https:&#x2F;&#x2F;www.dropbox.com&#x2F;s&#x2F;3aa5mr7gvbbmpc5&#x2F;australia.png?dl=0" rel="nofollow">https:&#x2F;&#x2F;www.dropbox.com&#x2F;s&#x2F;3aa5mr7gvbbmpc5&#x2F;australia.png?dl=0</a>).
tunedover 8 years ago
If you like this stuff, check <a href="https:&#x2F;&#x2F;github.com&#x2F;Mindwerks&#x2F;worldengine" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Mindwerks&#x2F;worldengine</a>
niixover 8 years ago
This really great, brings me back to my childhood - I used to love to draw islands.
charlesetcover 8 years ago
This is so awesome! I now am a lover of islands :D
callesggover 8 years ago
Some islands look a bit unrealistic.<p>With swamp areas sticking out i the sea.<p>Waves would remove such things in a short timespan.
评论 #12928194 未加载