= 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. [http://www.orxonox.net/ticket/356 Ticket #356: Big Ships][[br]] [http://www.orxonox.net/ticket/418 Ticket #418: Big Ships implementation] == 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 [[span(style=color: #777777, (body) )]] * Front extension L/R [[span(style=color: #777777, (frontL and frontR) )]] * Sidebox L/R [[span(style=color: #777777, (partL and partR) )]] * Sidearm L/R [[span(style=color: #777777, (sidearmL and sidearmR) )]] * Sidearm front L/R [[span(style=color: #777777, (sidearmLfront and sidearmRfront) )]] ||'''Part'''||'''attached to'''||'''description/function'''|| ||body||N/A||Main part of the ship.|| ||frontL/R||body||Front extensions of the ship. A rapid firing, weak laser is mounted on each of them.|| ||partL/R||body||Boxes on the side of the ship. Provide extra shield-and boost power.|| ||sidearmL/R||body||Large sidearms of the ship. An engine is mounted on each of them, providing the ship with more acceleration.|| ||sidearmL/Rfront||sidearmL/R||Front ends of the sidearms. A strong weapon can be mounted on them.|| ||turrets||body||Rapid firing autonomous turrets, defending the ship against nearby opponents.|| == Detailed Specification == We assume 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: {{{ ... ... ... ... }}} === Possible interactions of parts === The parameters of !BigShip and !ShipPart describe how the parts interact with each other. This requires the objects to support a wide range of functions, here's a few examples: * Damage-sharing: Hits received by a !BigShip or !ShipPart can be shared to other parts attached to it * Variable-modification: Destruction of a part can e.g. reduce shield reload rate * Destruction events: If a part is destroyed, it can destroy objects like weapons or engines === !BigShip === The !BigShip class could be an extension of the existing !SpaceShip class.[[br]] Additionally to a normal spaceships functions, it has a list of !ShipParts which are attached to it. The !BigShips engines, weapons etc. can be modified by its subparts. === !ShipPart === In order to make a !ShipPart attachable, it has to be a static entity. == 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, which Bullet (the physicsengine) can attach to a spaceship. Another problem is how to attach turrets. They need an AI controller and they need to be able to move (rotate), yet they need to be attachable. A discussion on this topic can be found on the [http://orxonox2.vseth.ethz.ch/phpBB3/viewtopic.php?f=1&t=1104 Forum]. == Current implementation == Currently the HeavyCruiser ship created in the HS13 PPS provides a model for such a large spaceship.[[br]] 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. == More Ideas == !BigShips could use an own HUD, to show individual parts health. Systems of the !BigShip could be controlled, e.g. power can be manually directed to engines, shields or weapons.