Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by noep, 11 years ago) (diff)

Big Ships

A BigShip should consist of multiple parts which can be individually destroyed, and the state of the individual parts should alter the behaviour of the entire vessels systems, such as shield, weapons or engines.

Example

The HeavyCruiser spaceship is used to show how a complex big ship could look.

HeavyCruiser is composed of (at least) 9 parts: (the names used to refer to the parts are in gray)

  • Body (body)
    • Front extension L/R (frontL and frontR)
    • Sidebox L/R (partL and partR)
    • Sidearm L/R (sidearmL and sidearmR)
      • Sidearm front L/R (sidearmLfront and sidearmRfront)
Partattached todescription/function
bodyN/AMain part of the ship.
frontL/RbodyFront extensions of the ship. A rapid firing, weak laser is mounted on each of them.
partL/RbodyBoxes on the side of the ship. Provide extra shield-and boost power.
sidearmL/RbodyLarge sidearms of the ship. An engine is mounted on each of them, providing the ship with more acceleration.
sidearmL/RfrontsidearmL/RFront ends of the sidearms. A strong weapon can be mounted on them.
turretsbodyRapid firing autonomous turrets, defending the ship against nearby opponents.

Detailed Specification

There is two kind of objects needed to create a big ship:

  • The main ship body (subsequently referred to as BigShip), which is controlled like any other spaceship by a player or AI.
  • Sub-parts of the ship (subsequently referred to as ShipPart), which are attached to either a BigShip or a ShipPart. They can interact with their parent-part in many ways.

Desired final form

Big ships should easily be assembled in an XML template like any other ship.

Here an example how this could look:

<BigShip [parameters]>

    <engines>
        ...
    </engines>
   
    <attached>   
        <Model [parameters] />
       
        <ShipPart [parameters]>
            <attached>
                <Model [parameters] />
            </attached>
            <collisionShapes>
                ...
            </collisionShapes>
        </ShipPart>
       
        <ShipPart [parameters]>
            ...
        </ShipPart>
    </attached>
   
    <collisionShapes>
        ...
    </collisionShapes>
   
<BigShip>

The parameters of BigShip and ShipPart describe how the parts interact with each other. This requires many different functions, here's a few examples:

  • Damage-sharing

BigShip

The BigShip class could be an extension of the existing SpaceShip class.
Additionally to a normal spaceships functions,

ShipPart

Problems

With the current implementation of Pawns, it is impossible to nicely implement such a big ship into the game. This is due to the only destructible entities being Pawns, which are dynamic entities, which again cannot be attached in XML. Therefore the structure of Pawns needs to be changed, in order to create destructible static entities.

A discussion on this topic can be found on the Forum.

Ticket #356: Big Ships implementation

Current implementation

Currently the HeavyCruiser ship created in the HS13 PPS provides a model for such a large spaceship.
In a demonstration level the vessel can be flown, and all its parts are individually destructible. This was achieved by literally hooking multiple Pawns together using collisionboxes hidden inside the spaceship. However the destruction of parts does not influence the ships systems behaviour at all.