A downloadable game for Windows

Fly through procedurally generated unstable star systems and mine asteroids for precious metals.

Upgrade your ship and weapons. Mix and match eight different ships and sixteen different weapon systems for your ideal combination of speed, firepower and accuracy.

Get into space shootouts with the pesky occupants of the systems who are very unfriendly just because you warp in and start mining their asteroids.


Controls

The controls in this game are hardcore. There is no safety net, the game does not help you. You will fly into stuff and get beaten by enemies a lot while learning the controls, but once you master them you'll be running rings around the AI.

Driving controls (primary thrust and rotation)

Up - Primary thrust forward

Right - Torque right

Left - Torque left

Down - "Panic button" automatically reduce spin down to 0

Jink controls (small manoeuvre thrusters)

WSAD - small thrust forward/back/left/right

Other controls

Space - shoot

Escape - pause

Menu

Mouse control

The game will save automatically while on the menu.




Why this project?

I wanted to fly through space with real physics shooting stuff, and I wanted to do randomly generated star systems with real physics.

I did a Basic program years ago simulating our own star system, but between Basic and ye olde computational machines it ran very slowly so I was interested in revisiting it.


Learning points

I did a ton of new stuff for this project.

  • Full 2D physics! Every single object in Stellar Miner is a dynamic physics object and it was great fun seeing emergent features of this and developing flying and manoeuvring strategy to play effectively.
  • Menu and audio mixer: Stellar Miner has my first "full" menu with resolution controls, volume controls, an upgrade screen and so on. I started out without realising the audio mixer existed but once I came across it and worked out how to use it, managing volume levels became a lot easier.
  • Secondary camera: I haven't done one of these before and it was interesting setting it up (the little system scanner in the bottom right) and working out how best to show the contents of the system.
  • Shader graphs: Expanding on my experience using shader graphs in SyRec I used shader graphs here for showing not just damage flashes, but ongoing damage status on ships and asteroids.
  • Parallax background: I've experimented a bit with parallax backgrounds before but this is my first serious go at it and I'm really pleased with the results. It's especially important in Stellar Miner as it helps visualise your movement speed, as you can be in areas with no other frame of reference for your movement.
  • Rogue-like system generation: I've always been interested in procedurally generated levels for games and this is my first serious application of this.
  • Object dehydration: There is potential for THOUSANDS of asteroids to be spawned in a level in Stellar Miner, and managing so many dynamic physics objects has a massive processing cost. So asteroids that aren't within a certain radius of the player, and that are in no danger of a collision are "dehydrated" (basically, turned off and stored in a list) so just their velocity and acceleration are handled in a much faster and simpler function, leading to:
  • Job system and burst: Stellar Miner is my first time using the Job system in unity and also using Burst to make it run even faster. I used these to handle the velocity and acceleration of the potentially thousands of asteroids that may be on a level, so that they don't hurt the game performance.
  • Coroutines: I used quite a few of these to manage timed events, such as the damage flashes.
  • AI coding: I had to do a TON of math to get the AI working well! They use exactly the same controls and thrusters as you do so have to account for stopping distances, relative velocity and so on. This is my first dynamic AI that doesn't follow a simple planned script. I also used an "aggro" system so they wont start chasing you right away, and only attack if you damage them or loiter near them.
  • Math: Just to reiterate, TONS of math doing all this. It was fun implementing my background in physics and mechanics!

Future features

  • AI improvements: The AI is a decent challenge but is still quite basic. In later versions I'll add target leading to enemies (so they can react to your movement speed and also use weapons beside lasers), and path finding/obstacle evasion (so they're not so easy to bait into asteroid collisions).
  • More ships and weapons: I haven't even used all the ships and weapons in the space sprite set I've used. There's a third tier of massive ships which also have a massive weapon slot. I'll also add more individual variants (e.g. a homing version of missiles) for each weapon.
  • Planet destruction: Once I've added the firepower of the top tier ships, I'll be adding planet destruction. If a system doesn't have enough asteroids? Just go blow up one of those planets. And don't mind the defenders, the atmosphere burning up, or all those bodies going flying off into space when it shatters. Gotta get that loot.
  • More enemy types: Once the enemy AI is upgraded and I've implemented all the ships and weapons, it's time for the enemy to get a firepower upgrade so they will have access to the same range of equipment as the player.
  • Menu improvements: I want to add some more specificity to the menu - e.g. the actual thrust, mass and armour ratings of each ship, but I might need to add some additional art assets beyond the pack I've used.
  • Enhanced sector preview: I'd like to add a "threat level" rating to each sector, indicating how well protected it is (and how much loot it has).
  • Star system features: There are a number of extra features I want to add to star systems. For example binary or trinary stars, moon and rings around planets, and surprise hazards such as comets shooting through the system at incredible speed, or the whole system falling into a black hole.

Bugs and issues

  • If you look closely at the videos I recorded you can see the asteroids (but not enemies) seem to be slowly falling into the star. This only seems to happen when I'm playing in Unity Editor and I haven't seen it happen in the actual build.
  • The "panic button" doesn't work perfectly and can sometimes leave your ship oscillating between -1 and +1 rotational velocity. Maybe I've done something wrong but it's been hard finding out precisely how torque and inertia are actually implemented internally in Unity and what torque is required to zero out a rotational velocity. It was a bit of a guesswork to even get it working as well as it does.
  • Not really a bug, but projectiles can collide with each other. I'm undecided if I'm happy with this or not. The problem it causes is that if a ship is rotating while firing, the projectiles will sometimes hit each other.

Credits

Design & coding - Seph

Space sprite set - Tatermand

https://opengameart.org/content/space-game-art-pack-extended

UI elements - craftpix

https://craftpix.net/freebies/free-space-shooter-game-gui/

Ore sprites - bluecarrot16

https://opengameart.org/content/lpc-ore-and-forge

Font - wepfont

https://www.fontspace.com/plat-nomor-font-f45735

Some sounds - game supply

https://gamesupply.itch.io/ultimate-space-game-mega-asset-package

Thruster sound

https://freesound.org/people/MATRIXXX_/sounds/515122/

Jink sound

https://freesound.org/people/mango777/sounds/547442/

Laser fire sound

https://freesound.org/people/_MC5_/sounds/524934/

Laser damage sound

https://freesound.org/people/kev_durr/sounds/396511/

Cannon fire sound

https://freesound.org/people/Werra/sounds/244394/

Download

Download
StellarMinerv0.11.zip 39 MB

Install instructions

Extract zip file contents to your preferred directory and run "Stellar Miner.exe".

The game will save automatically while you're on the menu screen.

Development log

Leave a comment

Log in with itch.io to leave a comment.