==== Refer to the following links for further information ==== http://www.orxonox.net/wiki/HeavyCruiser http://forum.orxonox.net/viewtopic.php?f=1&t=1104 ---=== TODO ===--- - Allow Big Ships to have sub-parts. (- Adapt the HUD to show individual part's health. Edit /trunk/dataoverlays/HUDTemplates3.oxo and corresponding classes in src/modules/overlays/hud/) ---=== PROBLEMS ===--- - When firing weapons mounted at the front of the ship, the aim is incorrect, due to the cursor (target) position being too close to the camera. Fix: Move position of cursor further away. (src/orxonox/controllers/NewHumanController.cc, updateTarget(), line 445) - Turrets cannot be attached to the ship in its template, due to turrets being spaceships by themselves. Fix: Redesign Turret class. -> MovableEntity? ShipPart? - Only Pawns are able to receive hits. However Pawns are dynamic entities, which cannot be attached to another. Fix: Major changes in the code-structure of Pawns/Entities required. There should be destructible not-dynamic entities. ---=== POSSIBLE APPROACHES ===--- - Sub-Parts are Pawns. PRO: - Basic structure of a destructible (and controllable, for turrets) is provided. CON: - Need to build something to hook Pawns together, allowing them to interact with each other. - Create a new class/interface: DestructibleEntity. Create a new class: ShipPart, which is a DestructibleEntity. Create a new class: Turret, which is a ShipPart. PRO: - More 'leightweight' than a Pawn. Can be used for simple things such as Asteroids too. - Parts can easily be attached to each other in XML CON: - Need to copy property of getting damage from hits from pawns - Need to add controllers for Turret again !=== THE FOLLOWING REFERS TO THE LAST APPROACH ===! HOW IT'LL LOOK IN XML ... ... ... ... DETAILS: - BigShip class: - /src/orxonox/worldentities/pawns -> Create BigShip.cc and BigShip.h, inherit from SpaceShip - Damage can be shared with sub-parts. (Implement new HUD, which shows sub-parts health?) ?- How to manage/list sub-parts? Arrays? - Modify damage() as needed, calls damagePart() - Spread damage relative to how much of the overall health a part has. (If a part has 20% of the total health, it gets 20% of the damage) - void damagePart(... , ShipPart part) - Destruction of sub-parts can alter datavalues of the ship (e.g. shield or acceleration) or disable weapons - DestructibleEntity class ?- is a StaticEntity? - defined in XML Parameters: health, animation upon death - receives damage from hits (and from other sources?) - has health - special events on 'destruction' - special animation upon destruction - ShipPart class - is a DestructibleEntity - has a BigShip as *owner - Has own health - Receives damage from direct hits and from parent-part - Triggers events on destruction (e.g. disabling weapons or weakening shields) - Invisible & not collidable? Or actually inexistent? - Turret class ?- is a ShipPart? - has a controller