Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Initial Version and Version 1 of ~archive/ADM


Ignore:
Timestamp:
Nov 28, 2007, 1:07:24 AM (17 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ~archive/ADM

    v1 v1  
     1= ADM - Automatic Defense Machanism =
     2[[ArchivePage]]
     3
     4== Author ==
     5[wiki:RetoLüchinger Reto Lüchinger]
     6
     7== Description ==
     8||The goal of the ADM is, to have an fix located enemy for the player. I want to implement an anti-personal Defense Mechanism, meaning a turret (Ticket 212) which will shoot at the player. [[br]] [[br]] * [https://dev.orxonox.net/ticket/210 Ticket #210] [[br]]  * [https://forum.orxonox.net/viewtopic.php?p=853#853 Developers Journal] [[br]] [[br]]  * [https://dev.orxonox.net/ticket/212 Ticket #212: Sebastians Turret], detailed: [wiki:Turret Turret] [[br]]  * [https://dev.orxonox.net/ticket/216 Ticket #216: Michis Moonstation], detailed: [wiki:MoonStation Moonstation] || || [[Image(turret.JPG)]] ||
     9
     10----
     11
     12== Progress ==
     13
     14|| '''Deadline''' || '''Description''' || '''More''' || '''Progress''' ||
     15|| Do, 26. April  || Ideas, plans and understanding || [wiki:archive/ADM#ideas more] || https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/100percent.gif?format=raw ||
     16|| Do, 03. Mai    || UML and Understanding || [wiki:archive/ADM#UML UML] || https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/100percent.gif?format=raw ||
     17|| Do, 07. June    || Coding || [wiki:archive/ADM#CODING CODING] || https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/100percent.gif?format=raw ||
     18
     19[[br]]
     20[[br]]
     21{{{
     22#!html
     23<a name="ideas"></a>
     24}}}
     25
     26=== Ideas and plans ===
     27
     28 * The first idea of the functionality of the turret. It is activated by a space trigger, when the player approaches, but still is out of sight. I`m not sure yet, on how the turret should behave, when activated, but not yet has vision of the player. We were thinking of a vision cone, and a left-right scanning of the surveyed area. When the "enemy" (you, player) is located, it will aim at you and start to shoot (not yet sure about the conditions (how close aimed to the target, reload?)). When loosing sight, it will turn back to active mode, when destroyed, will be inactivated, whitout beeing able to be triggered again.
     29{{{
     30#!html
     31<a name="UML"></a>
     32}}}
     33=== UML ===
     34[[Image(ADM01.jpeg)]]
     35[[br]]
     36[[br]]
     37{{{
     38#!html
     39<a name="CODING"></a>
     40}}}
     41=== CODING ===
     42
     43The code can be found found under [https://dev.orxonox.net/browser/trunk/src/world_entities/npcs root/trunk/src/world_entities/npcs]. Furthermore, there had to be made an extra class called bsp_weapon {cc, h}, which are found under World_entities/weapons/.
     44
     45Explanations to the code:
     46- Since we've experienced troubles with the turret turning left/right and up/down simultaniously, we had to adjust this function, so that the turret can only be placed vertically. This has to be declared in the XML file with the setting (type), which can be `floor` or `ceil`. In the XML file, there must also be the coordinates of the turret, the target, and specifications for the weapon.
     47
     48- It is suggested to just copy/paste the relative coordinates and the models, if the turret is not scaled. Otherwise the relative coordinates and the AddPoint-Values (needed for the "MuzzleFlash") must be adjusted by the scale factor in the XMLfile. The Weapon (Bsp_Weapon) has the values "Range" (if within, the Player is "seen"), "SetDamage" (Life Energy that is taken from Target, if hit), "FireRate" (persec) and a value "AlwaysHit". If "AlwaysHit" is set false, the turret "misses" the target with a probability depending on range and distance between Turret and Target (probability: p[d=range] = 0, p[d=0] = 1).