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 Revisited21 days ago
- Spawn Exclusion Zones28 days ago
- Satellite Orbits35 days ago
- Score Feedback43 days ago
- Enemy Scaling50 days ago
- Satellite Bash - Out Now!60 days ago
- Planet Generation60 days ago
Leave a comment
Log in with itch.io to leave a comment.