Star Generation

Star generation is made up of two star sprites and an Area2D node. Basically we use the Area2D node to get a spawn area, and within that we pick a random spot and then spawn a star there.
For a nicer effect, we give the stars a random scale and opacity. It adds a little depth to the whole thing.
In our game jam version, we were hard coding values in the code and doing a random range within those values to pick a spot, so this way is much cleaner.

We apply the same technique to how we generate our asteroids. In most cases the spawn area is the same size as what we do for our star generation, but on the instructions screen we wanted a smaller area of asteroids for the player to practice on. So we just adjust the size of the spawn area for this particular case and away we go.
Here's a snippet of how getting the spawn point works:

--
Play the Game
- On Wandering Door Games
- On itch.io
As always, the game is open source!
You can find it on our Codeberg.
💜 Love open source projects?
Here are ways you can support us making them!
https://wanderingdoorgames.obviousgain.ca/supportUs
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
- Star Generation RevisitedAug 16, 2025
- Spawn Exclusion ZonesAug 09, 2025
- Satellite OrbitsAug 02, 2025
- Score FeedbackJul 25, 2025
- Enemy ScalingJul 18, 2025
- Satellite Bash - Out Now!Jul 08, 2025
- Planet GenerationJul 08, 2025
Leave a comment
Log in with itch.io to leave a comment.