Jump to content

Thruster

From Horizon's End Wiki

Thrusters are the primary source of propulsion for starship cruising.
Thrusters add speed and acceleration in the direction that they are pointing; therefore, applying thrust to one or multiple sides of a ship is possible.
A thruster's exhaust path may not be blocked by any block of the active starship at any distance, with the exception of one glass or glass pane block with no space in between.

Afterburner Thruster

Afterburner

An afterburner thruster, with a magma block for the glow block.

Properties
Acceleration 3.0
Speed 17.5
Weight 5.0
Resource Requirements
Invicon Iron Block.png: Inventory sprite for Iron Block in Minecraft as shown in-game linking to Iron Block with description: Iron Block
Iron Block

1

Invicon Sponge.png: Inventory sprite for Sponge in Minecraft as shown in-game linking to Sponge with description: Sponge
Sponge

1

Invicon Gold Block.png: Inventory sprite for Gold Block in Minecraft as shown in-game linking to Gold Block with description: Gold Block
Gold Block

1

Invicon Sea Lantern.gif: Inventory sprite for Sea Lantern in Minecraft as shown in-game linking to Sea Lantern with description: Sea LanternInvicon Glowstone.png: Inventory sprite for Glowstone in Minecraft as shown in-game linking to Glowstone with description: GlowstoneInvicon Shroomlight.png: Inventory sprite for Shroomlight in Minecraft as shown in-game linking to Shroomlight with description: ShroomlightInvicon Ochre Froglight.png: Inventory sprite for Ochre Froglight in Minecraft as shown in-game linking to Ochre Froglight with description: Ochre FroglightInvicon Verdant Froglight.png: Inventory sprite for Verdant Froglight in Minecraft as shown in-game linking to Verdant Froglight with description: Verdant FroglightInvicon Pearlescent Froglight.png: Inventory sprite for Pearlescent Froglight in Minecraft as shown in-game linking to Pearlescent Froglight with description: Pearlescent FroglightInvicon Redstone Lamp.png: Inventory sprite for Redstone Lamp in Minecraft as shown in-game linking to Redstone Lamp with description: Redstone LampInvicon Magma Block.png: Inventory sprite for Magma Block in Minecraft as shown in-game linking to Magma Block with description: Magma Block
Any Thruster Block

1

Afterburners provide plenty of acceleration and speed in a small package but are less efficient than other thrusters. They are typically the best thruster for most applications.

The magma block can be any Thruster Block.

Ion Thruster

Ion

An ion thruster, with a sea lantern for the glow block.

Properties
Acceleration 0.05
Speed 4.0
Weight 1.0
Resource Requirements
Invicon Sponge.png: Inventory sprite for Sponge in Minecraft as shown in-game linking to Sponge with description: Sponge
Sponge

1

Invicon Sea Lantern.gif: Inventory sprite for Sea Lantern in Minecraft as shown in-game linking to Sea Lantern with description: Sea LanternInvicon Glowstone.png: Inventory sprite for Glowstone in Minecraft as shown in-game linking to Glowstone with description: GlowstoneInvicon Shroomlight.png: Inventory sprite for Shroomlight in Minecraft as shown in-game linking to Shroomlight with description: ShroomlightInvicon Ochre Froglight.png: Inventory sprite for Ochre Froglight in Minecraft as shown in-game linking to Ochre Froglight with description: Ochre FroglightInvicon Verdant Froglight.png: Inventory sprite for Verdant Froglight in Minecraft as shown in-game linking to Verdant Froglight with description: Verdant FroglightInvicon Pearlescent Froglight.png: Inventory sprite for Pearlescent Froglight in Minecraft as shown in-game linking to Pearlescent Froglight with description: Pearlescent FroglightInvicon Redstone Lamp.png: Inventory sprite for Redstone Lamp in Minecraft as shown in-game linking to Redstone Lamp with description: Redstone LampInvicon Magma Block.png: Inventory sprite for Magma Block in Minecraft as shown in-game linking to Magma Block with description: Magma Block
Any Thruster Block

1

Ion thrusters accelerate very slowly but can be used to achieve high top speeds. These are typically used on cheaper vessels where acceleration is less of a concern than cost is.

The sea lantern can be any Thruster Block.

Plasma Thruster

Plasma

A plasma thruster, with a redstone lamp for the glow block.

Properties
Acceleration 0.75
Speed 2.5
Weight 1.0
Resource Requirements
Invicon Redstone Block.png: Inventory sprite for Redstone Block in Minecraft as shown in-game linking to Redstone Block with description: Redstone Block
Redstone Block

1

Invicon Sea Lantern.gif: Inventory sprite for Sea Lantern in Minecraft as shown in-game linking to Sea Lantern with description: Sea LanternInvicon Glowstone.png: Inventory sprite for Glowstone in Minecraft as shown in-game linking to Glowstone with description: GlowstoneInvicon Shroomlight.png: Inventory sprite for Shroomlight in Minecraft as shown in-game linking to Shroomlight with description: ShroomlightInvicon Ochre Froglight.png: Inventory sprite for Ochre Froglight in Minecraft as shown in-game linking to Ochre Froglight with description: Ochre FroglightInvicon Verdant Froglight.png: Inventory sprite for Verdant Froglight in Minecraft as shown in-game linking to Verdant Froglight with description: Verdant FroglightInvicon Pearlescent Froglight.png: Inventory sprite for Pearlescent Froglight in Minecraft as shown in-game linking to Pearlescent Froglight with description: Pearlescent FroglightInvicon Redstone Lamp.png: Inventory sprite for Redstone Lamp in Minecraft as shown in-game linking to Redstone Lamp with description: Redstone LampInvicon Magma Block.png: Inventory sprite for Magma Block in Minecraft as shown in-game linking to Magma Block with description: Magma Block
Any Thruster Block

1

Plasma thrusters have a lower top speed but provide efficient acceleration. These are typically not used on most ships because of their poor overall stats.

The redstone lamp can be any thruster block.

Calculation

The speed and acceleration of a given starship is determined by a number of functions and variables. For this reason, most players simply add thrusters by increment while testing the speed and acceleration values, until either of these values starts going down. That said, the discerning shipwright may still be interested in calculating the optimal thruster count beforehand, to save themselves time and energy.

Speed calculation

To begin, let t = the total sum speed of all thrusters on a ship (for example, if a ship has 3 ion thrusters, then t = 12).

THIS IS NOT THE ACTUAL SPEED THE SPACESHIP WILL HAVE. Rather, this value is used in two equations to determine the actual ship speed. Firstly, the weight of each thruster must be considered to get the effective speed s.

s = t * 0.85 w^0.5

Where

t = total speed from all thrusters

w = total weight from all thrusters

The next equation is "calculated speed" c, determined as follows:

c =(s 0.5 )/ (m0.2 * 50)

Where:

s = effective speed

m = mass of the starship

Mass footnote: Different blocks in a starship have different mass values. Concrete blocks have a mass value of 1, while almost all other blocks have a mass equal to their blast resistance times 5, or a mass of 1, whichever is higher. The total mass of the ship is the sum off the mass of all its blocks that make up the ship.


So we can just add thrusters indefinitely to get a super speedy ship, right? WRONG!! The next equation is the max speed equation, and it caps the top speed of your starship. The max speed v is calculated as follows:

v = (r * 0.4) / s

Where:

r = starship energy output (for some reason called reactor output, not to be confused with the reactors used for Tech 2 and Supercapital ships)

Note that the max speed also reduces with each thruster you add. Thus, a careful selection of thrusters must be made for optimal ship performance.

Acceleration calculation

tbd

Source Code

the following code is used to determine the speed and acceleration of ships ingame. The above equations derive from this code.

"effective speed", "calculated speed", and "max speed" are derived from variables totalSpeed, calculatedSpeed, and maxSpeed respectively.

private fun buildThrustData(faceThrusters: List<ThrusterSubsystem>): ThrustData {
        if (faceThrusters.none()) {
            return ThrustData(0.0, 0)
        }

        val baseSpeedFactor = 50.0
        val speedExponent = 0.5
        val massExponent = 0.2
        val reductionBase = 0.85
        val finalSpeedFactor = 1.0

        val mass = this.mass
        val totalAccel = 1.0 + faceThrusters.sumOf { it.type.accel }
        val totalWeight = faceThrusters.sumOf { it.type.weight }.toDouble()
        val reduction = reductionBase.pow(sqrt(totalWeight))
        val totalSpeed = faceThrusters.sumOf { it.type.speed } * reduction

        val calculatedSpeed = totalSpeed.pow(speedExponent) / mass.pow(massExponent) * baseSpeedFactor

        val maxSpeed = if(type.tech2){
            reactor.output * .4 / totalSpeed}
        else (reactor.output * .4 / totalSpeed)*1.1

        val speed = (min(maxSpeed, calculatedSpeed) * finalSpeedFactor).roundToInt()

        val acceleration = if(type.tech2) {
            ln(2.0 + totalAccel) * ln(2.0 + totalWeight) / ln(mass.squared()) * reduction * 30.0 }
        else (ln(2.0 + totalAccel) * ln(2.0 + totalWeight) / ln(mass.squared()) * reduction * 30.0)*1.1
        return ThrustData(acceleration, speed)
    }

The following code sets the parameters for each thruster type

enum class ThrusterType(val accel: Double, val speed: Double, val weight: Int) {
    PLASMA(0.75, 2.5, 1) {
        override fun MultiblockShape.buildStructure() {
            at(0, 0, 0).thrusterBlock()
            at(0, 0, 1).type(Material.REDSTONE_BLOCK)
        }
    },
    ION(0.05, 4.00, 1) {
        override fun MultiblockShape.buildStructure() {
            at(0, 0, 0).thrusterBlock()
            at(0, 0, 1).type(Material.SPONGE)
        }
    },
    AFTERBURNER(3.0, 17.5, 5) {
        override fun MultiblockShape.buildStructure() {
            at(0, 0, 0).thrusterBlock()
            at(0, 0, 1).type(Material.GOLD_BLOCK)
            at(0, 0, 2).type(Material.SPONGE)
            at(0, 0, 3).type(Material.IRON_BLOCK)
        }
    }; 

the following code is where power comes from

class ReactorSubsystem(
    starship: ActiveStarship,
    powerModifier: Double
) : StarshipSubsystem(starship, starship.centerOfMass) {

    companion object {
        const val OVERSIZE_POWER_PENALTY = 0.5
    }

    val output: Double =
        cbrt(starship.initialBlockCount.coerceAtLeast(500).toDouble()) * 3000.0 * (starship.type.powerOverrider) * powerModifier
    val powerDistributor = PowerDistributor()
    val weaponCapacitor = WeaponCapacitor(this)
    val heavyWeaponBooster = HeavyWeaponBooster(this)

TBD

  • code block formatting
  • check that it's actually correct (pretty sure the linked spreadsheet is bad)