{"id":21374625,"url":"https://github.com/lspgn/worker-biomes","last_synced_at":"2025-11-07T01:02:16.520Z","repository":{"id":144286806,"uuid":"271917026","full_name":"lspgn/worker-biomes","owner":"lspgn","description":"Minecraft biomes map generator using Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2020-06-13T04:38:00.000Z","size":2166,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T08:07:02.926Z","etag":null,"topics":["cloudflare","emscripten","map","minecraft","serverless","wasm","workers"],"latest_commit_sha":null,"homepage":"https://biomes.lspgn.workers.dev/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lspgn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-13T01:02:32.000Z","updated_at":"2024-04-01T03:15:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"abbef029-eeec-4b9d-b2fd-556935efa444","html_url":"https://github.com/lspgn/worker-biomes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lspgn/worker-biomes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lspgn%2Fworker-biomes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lspgn%2Fworker-biomes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lspgn%2Fworker-biomes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lspgn%2Fworker-biomes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lspgn","download_url":"https://codeload.github.com/lspgn/worker-biomes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lspgn%2Fworker-biomes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265120139,"owners_count":23714489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","emscripten","map","minecraft","serverless","wasm","workers"],"created_at":"2024-11-22T08:44:09.353Z","updated_at":"2025-11-07T01:02:16.438Z","avatar_url":"https://github.com/lspgn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Worker Biomes\n\n![Deploy](https://github.com/lspgn/worker-biomes/workflows/Deploy/badge.svg)\n\n## Introduction\n\nMinecraft generates its environment using an initial _seed_.\nThis method is called [procedural generation](https://en.wikipedia.org/wiki/Procedural_generation).\n\nA user can recreate a _world_ in by passing the same seed.\n\n**Worker Biomes** is similar to tools like [AMIDST](https://github.com/toolbox4minecraft/amidst)\nwith the difference that it runs in your browser.\n\nThis application uses [Cloudflare Workers](https://workers.cloudflare.com/),\na [serverless platform](https://en.wikipedia.org/wiki/Serverless_computing):\nthe code is sent at the edge and runs on servers all around the world.\nThe user does not need to maintain hardware, only code.\n\nThis is made with a C [biome generation library](https://github.com/Cubitect/cubiomes),\na [PNG image library](https://github.com/nothings/stb) compiled with\n[emscripten](https://emscripten.org/) ([WebAssembly](https://en.wikipedia.org/wiki/WebAssembly)).\nA JavaScript frontend using [leaflet](https://leafletjs.com/)\nprovides a map the user can explore.\n\nThis project was done for fun and to test Cloudflare Workers and WASM.\nIt is not actively supported and could definitely use optimizations.\n\n## Demo\n\nThe demo is available on: https://biomes.lspgn.workers.dev.\n\nLet's use the seed: `5483649151969237`.\n\nAt position `(0, 0)` the map is the following:\n\n[![Map generator webpage](docs/onsite_geo.png)](https://biomes.lspgn.workers.dev/?seed=5483649151969237\u0026x=0\u0026z=0)\n\nYou can see the area wit the red border represented below in the game:\n\n![Minecraft game screenshot](docs/ingame.png)\n\n## Installing\n\nMake sure you have a Cloudflare account.\nFollow this guide to get [API tokens](https://developers.cloudflare.com/api/tokens/create).\n\nThe free version of Workers allows up to 100000 requests a day.\nYou can deploy on workers.dev if you do not want to setup a zone and a domain\nbut you will not be able to control caching, firewall or rate-limiting parameters.\n\nA tile generation takes around 5ms. This Worker uses the cache API to serve\ntiles even faster. One tile is around 10KB.\nA quick exploration may fetch 50-100 tiles.\n\nIn order to proceed, edit `wrangler.toml`:\n* the `name` of your worker (default is biomes)\n* the `account_id` (you can find it in the dashboard on the Workers page)\n\nIn `webpack.config.js` edit the following:\n* `PUBLISH_ADDRESS`: this will define the endpoint to fetch tiles and allow the HTTP Referer\n  check to avoid image hotlinking.\n* `SEED`: if you want the default seed to be fixed (by default, it is random at build time).\n\nThe repository is already configured with [GitHub actions](https://github.com/features/actions).\nGitHub can compile and deploy for you if you define `CF_ACCOUNT_ID` and `CF_API_TOKEN`\nas secret environment variables.\n\nIf you choose to deploy manually, you will need to install\n[Wrangler](https://developers.cloudflare.com/workers/tooling/wrangler/install/),\nconfigure it with your account (`$ wrangler config`) and\nfetch the submodules.\n\n```bash\n$ git submodule update --init --recursive\n$ wrangler build\n$ wrangler publish\n```\n\nAnd you're done!\n\nNote: you can upload (without Wrangler) the WASM-compiled file via the\n[API](https://developers.cloudflare.com/workers/tooling/api/scripts#with-resource-bindings)\nafter running `npx webpack`.\n\n## Credits and notes\n\nThe [Cloudflare Emscripten Template](https://github.com/cloudflare/worker-emscripten-template)\nwas very useful for this project.\nThe project was made possible with the [Cubiomes](https://github.com/Cubitect/cubiomes) library\nand the [stb library](https://github.com/nothings/stb). A big thank you to the maintainers.\n\nThis program comes with absolutely no warranty and is not associated with Mojang AB.\n\nMinecraft is a Trademark of Mojang AB. Please check the\n[Commercial Guidelines](https://account.mojang.com/documents/commercial_guidelines).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flspgn%2Fworker-biomes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flspgn%2Fworker-biomes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flspgn%2Fworker-biomes/lists"}