[9794] | 1 | ==== Refer to the following links for further information ==== |
---|
| 2 | http://www.orxonox.net/wiki/HeavyCruiser |
---|
| 3 | http://forum.orxonox.net/viewtopic.php?f=1&t=1104 |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | ---=== TODO ===--- |
---|
[9783] | 7 | |
---|
[9794] | 8 | - Allow Big Ships to have sub-parts. |
---|
[9783] | 9 | |
---|
| 10 | (- Adapt the HUD to show individual part's health. |
---|
| 11 | Edit /trunk/dataoverlays/HUDTemplates3.oxo and corresponding classes in src/modules/overlays/hud/) |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | |
---|
[9794] | 15 | ---=== PROBLEMS ===--- |
---|
| 16 | |
---|
[9783] | 17 | - When firing weapons mounted at the front of the ship, the aim is incorrect, |
---|
| 18 | due to the cursor (target) position being too close to the camera. |
---|
| 19 | Fix: Move position of cursor further away. (src/orxonox/controllers/NewHumanController.cc, updateTarget(), line 445) |
---|
| 20 | |
---|
| 21 | - Turrets cannot be attached to the ship in its template, due to turrets being spaceships by themselves. |
---|
| 22 | Fix: Redesign Turret class. -> MovableEntity? ShipPart? |
---|
| 23 | |
---|
[9794] | 24 | - Only Pawns are able to receive hits. However Pawns require every object to have their own weapons, shields etc. |
---|
| 25 | Fix: Create an entirelly new class/interface(?), DestructibleEntity. It can be used for ShipParts, Asteroids, Turrets etc. |
---|
[9783] | 26 | |
---|
| 27 | |
---|
[9794] | 28 | |
---|
| 29 | ---=== POSSIBLE APPROACHES ===--- |
---|
| 30 | |
---|
| 31 | - Sub-Parts are Pawns. |
---|
| 32 | PRO: - Basic structure of a destructible (and controllable, for turrets) is provided. |
---|
| 33 | CON: - Need to build something to hook Pawns together, allowing them to interact with each other. |
---|
| 34 | |
---|
| 35 | - Create a new class/interface: DestructibleEntity. |
---|
| 36 | Create a new class: ShipPart, which is a DestructibleEntity. |
---|
| 37 | Create a new class: Turret, which is a ShipPart. |
---|
| 38 | PRO: - More 'leightweight' than a Pawn. Can be used for simple things such as Asteroids too. |
---|
| 39 | - Parts can easily be attached to each other in XML |
---|
| 40 | CON: - Need to copy property of getting damage from hits from pawns |
---|
| 41 | - Need to add controllers for Turret again |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | !=== THE FOLLOWING REFERS TO THE LAST APPROACH ===! |
---|
| 45 | |
---|
| 46 | HOW IT'LL LOOK IN XML |
---|
| 47 | |
---|
| 48 | <BigShip [parameters]> |
---|
| 49 | |
---|
| 50 | <engines> |
---|
| 51 | ... |
---|
| 52 | </engines> |
---|
| 53 | |
---|
| 54 | <attached> |
---|
| 55 | <Model [parameters] /> |
---|
| 56 | |
---|
| 57 | <ShipPart [parameters]> |
---|
| 58 | <attached> |
---|
| 59 | <Model [parameters] /> |
---|
| 60 | </attached> |
---|
| 61 | <collisionShapes> |
---|
| 62 | ... |
---|
| 63 | </collisionShapes> |
---|
| 64 | </ShipPart> |
---|
| 65 | |
---|
| 66 | <ShipPart [parameters]> |
---|
| 67 | ... |
---|
| 68 | </ShipPart> |
---|
| 69 | </attached> |
---|
| 70 | |
---|
| 71 | <collisionShapes> |
---|
| 72 | ... |
---|
| 73 | </collisionShapes> |
---|
| 74 | |
---|
| 75 | <BigShip> |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | DETAILS: |
---|
| 80 | |
---|
[9783] | 81 | - BigShip class: |
---|
| 82 | - /src/orxonox/worldentities/pawns -> Create BigShip.cc and BigShip.h, inherit from SpaceShip |
---|
[9794] | 83 | - Damage can be shared with sub-parts. (Implement new HUD, which shows sub-parts health?) |
---|
| 84 | ?- How to mange/list sub-parts? Arrays? |
---|
| 85 | - Modify damage() as needed, calls damagePart() |
---|
[9783] | 86 | - Spread damage relative to how much of the overall health a part has. |
---|
| 87 | (If a part has 20% of the total health, it gets 20% of the damage) |
---|
| 88 | - void damagePart(... , ShipPart part) |
---|
| 89 | - Destruction of sub-parts can alter datavalues of the ship (e.g. shield or acceleration) |
---|
[9794] | 90 | or disable weapons |
---|
| 91 | |
---|
| 92 | - DestructibleEntity class |
---|
| 93 | ?- is a StaticEntity? |
---|
| 94 | - defined in XML Parameters: health, animation upon death |
---|
| 95 | - receives damage from hits (and from other sources?) |
---|
| 96 | - has health |
---|
| 97 | - special events on 'destruction' |
---|
| 98 | - special animation upon destruction |
---|
| 99 | |
---|
[9783] | 100 | - ShipPart class |
---|
[9794] | 101 | - is a DestructibleEntity |
---|
| 102 | - has a BigShip as *owner |
---|
[9783] | 103 | - Has own health |
---|
| 104 | - Receives damage from direct hits and from parent-part |
---|
[9794] | 105 | - Triggers events on destruction (e.g. disabling weapons or weakening shields) |
---|
| 106 | - Invisible & not collidable? Or actually inexistent? |
---|
| 107 | |
---|
| 108 | - Turret class |
---|
| 109 | ?- is a ShipPart? |
---|
| 110 | - has a controller |
---|
| 111 | |
---|