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.

Show HN: A 'map editor' for Forbidden Island. No database required

2 pointsby user24almost 2 years ago
A side project of mine just for fun.<p>The island shape is fully determined by the URL; there&#x27;s no database behind this. Compressing the islands into sharable URLs was quite a fun challenge.<p>At the moment I just munge together each row into one long binary string, chop that into 6-bit chunks, and then convert each 6 bit chunk into a single letter chosen from a 64 character alphabet (because 111111=64).<p>I added a header with a version number to the encoded island to allow me to change the format in the future without breaking existing URLs.<p>In the future I&#x27;d like to generate a human-readable url so e.g. sunkenatlas.com&#x2F;#evil-rocky-cove or &#x2F;#perilous-sandy-archway would in a similar way be able to encode the islands deterministically.<p>But I think I&#x27;d need quite a large wordlist for this, as there are 18,446,744,073,709,551,616 possible 8x8 islands (2^64).<p>We can reduce that space quite a bit by ruling out islands with far too few or far too many tiles. But it&#x27;s still Quite Big.<p>Any help appreciated on that front :)

no comments

no comments