Planet Generation
We have random planet generation! Not bad looking for a sphere and a bunch of stretchy ovals.
It's basically just picking a random colour for the planet base, a random colour for the planet's land, and giving the clouds a lesser opacity but keeping them white. Right now it generates a set 10 detail blobs and 10 clouds, but that's easily configurable.
We also made sure to make the details clip to not get any weird planet overhang.
The planet detail and clouds are actually the same asset, which was really handy during the initial game jam. Woohoo for asset reuse!
In the original game, the clouds and details were two different scripts. Here we combined them to keep things simple.
We also updated it so that you can never have a planet without any details or clouds. Sometimes you'd just get a plain flat sphere. That's just boring.
Here's a sample code snippet for how we're doing our random colour picking.
The min and max here gives us a "shade range" of colours which are basically 40 - 80% saturated, which is the look we're going for. We self_modulate here which won't change the colours of any child nodes but we could have used modulate if that's what we did want (which we actually used on our asteroids).
We use this idea on basically anything in the game that needs a random colour set, like the enemies or space debris.
You can see the full project up on Codeberg here.
Get Satellite Bash
Satellite Bash
Defend your tiny planet against various space hazards
Status | Released |
Author | Wandering Door Games |
Tags | Arcade, foss, Godot, Mouse only, Open Source, Singleplayer, Space |
Languages | English |
Accessibility | Configurable controls, Interactive tutorial |
More posts
- Satellite Bash - Out Now!15 minutes ago
Leave a comment
Log in with itch.io to leave a comment.