Torpedos Go Boom

Alex Anderson 🚀Alex Anderson 🚀, May 30, 2024
Torpedos Go Boom

Hey gang! Happy Thorium Thursday!

For starters, thanks to the 25 of you who responded to the last newletter email. Your messages of support and encouragement warmed my heart. Thank you. These conversations also started the ball rolling on a couple of new projects, including a musical score and fleshing out the universe that the Thorium Nova campaigns will operate in. You can check out the details of that in the #universe channel on Discord.

I've spent the past month working on the torpedo system. Here's the gist:

Torpedos are projectiles fired from the ship. They consist of:

  • a casing, which determines the speed and range of the torpedo,
  • a warhead, which sets the yield (how big a boom) and the damage type (explosive, radiation, electrical, or kinetic)
  • a guidance module, which tells the torpedo how to follow its target, even stealthy targets (infrared, visual, magnetic, and gravitational)

I'm still trying to figure out how combat altogether will work, but for now the plan is for there to be two offensive systems: Phasers for weakening a ship, and Torpedos for doing major damage. Those pair with the two defensive systems: Shields, which recharge and can be configured to block either Phasers or Torpedos, but not both; and the hull, which is the overall hit points of the ship and cannot be recharged. Damage and health is all measured in units of energy - gigajoules specifically.

Building this all ended up being a huge undertaking that touches on a lot of the features that make Thorium Nova special:

  • There's a new targeting screen with a 3D grid, which lets the Tactical officer see what ships are nearby for targeting.
  • The number of available torpedos is determined by the inventory contents of the torpedo launcher room.
  • Eventually new torpedos will be created using a Fabricator system.
  • Once launched, torpedos move according to the physics engine, which also detects collisions.
  • Everything about torpedos, from how much damage they do to how long it takes to load and fire them, to their color on the viewscreen, is all configurable.

Fortunately, using torpedos should still be really simple. Choose your torpedo from the list (again, populated based on the torpedo inventory items in the torpedo launcher room, so it's possible to replenish these mid-mission). Load the torpedo into one of your ship's torpedo tubes. Click on your target. Click fire!

psst. there's a video up there. If you can't see it, check out the blog post in your web browser

It was really satisfying the first time I fired a torpedo - it spawned into the universe, started moving towards its target, and the target was blown 5 kilometers away by the impact! As it turns out, I accidentally set the torpedo's mass to 5 times the mass of the Earth. Math is hard sometimes.

After getting the torpedo movement and behavior right, I wanted to make sure we had some nice effects, so I spent a few days working on a particle engine. This is multi-purpose, and will be used for all kinds of things in the future, but for right now it powers the very obvious explosion effect. One of these days I'll tone it down...

This isn't released yet, but it will be in the next alpha of Thorium Nova. I'm planning on cleaning up a few things and fixing bugs before that alpha is out, but you can look forward to that in the future.

That's all for now. Take care of yourselves!