https://github.com/yurkth/astraea
A planet generator inspired by Planetarium.
https://github.com/yurkth/astraea
pixel-art procedural procedural-generation procgen
Last synced: 3 days ago
JSON representation
A planet generator inspired by Planetarium.
- Host: GitHub
- URL: https://github.com/yurkth/astraea
- Owner: yurkth
- License: mit
- Created: 2020-05-10T17:09:20.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-20T18:41:10.000Z (over 3 years ago)
- Last Synced: 2025-04-25T17:17:02.422Z (3 days ago)
- Topics: pixel-art, procedural, procedural-generation, procgen
- Language: JavaScript
- Homepage: https://yurkth.github.io/astraea/
- Size: 48.8 KB
- Stars: 170
- Watchers: 5
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Astraea
The planet generator inspired by [Planetarium](https://managore.itch.io/planetarium). Please see also the [Twitter bot](https://twitter.com/astraea_yk).
**I do not authorize the use of anything generated by this project for the selling of NFTs.**

## Algorithm
By shaving off the extra pixels from the square and bringing them together in the center, the 2D sprite is made to look like 3D.

The planets' patterns are generated by some simple noise functions.
If the plane references 2D noise, it will be scaled incorrectly, like Mercator projection. Therefore, the 3D noise is compressed into a 2D plane.
In other words, it converts 3D noise into a 2D plane and makes it look like a 3D sphere.
Please see my blog [post](https://yurkth.hateblo.jp/entry/astraea-planet-generator) for more information (sorry, it's Japanese).
## License
Astraea is licensed under the MIT license. See the [LICENSE](https://github.com/yurkth/astraea/blob/master/LICENSE) for more information.
### Libraries
- [p5.js](https://github.com/processing/p5.js) is licensed under the LGPL-2.1 license.
- [seedrandom](https://github.com/davidbau/seedrandom) is licensed under the MIT license.
- [simplex-noise](https://github.com/jwagner/simplex-noise.js) is licensed under the MIT license.
- [poisson-disk-sampling](https://github.com/kchapelier/poisson-disk-sampling) is licensed under the MIT license.
- [zlib.js](https://github.com/imaya/zlib.js) is licensed under the MIT license.### Assets
- The [Corpora](https://github.com/dariusk/corpora) is licensed under the CC-0 license.
- The [PICO-8 palette](https://www.lexaloffle.com/pico-8.php?page=faq) is licensed under the CC-0 license.
- The [PICO-8 font](https://www.lexaloffle.com/bbs/?tid=3760) (unofficial) does not claim any copyright.
- The [official font](https://www.lexaloffle.com/pico-8.php?page=faq) is also licensed under the CC-0 license.### References
- [TIC-80](https://github.com/nesbox/TIC-80) is licensed under the MIT license.
- To draw a circle in pixels, I used the [circb](https://github.com/nesbox/TIC-80/blob/master/src/tic.c#L948-L961) function as a reference.