Index: code/branches/invaders/data/levels/Invaders.oxw
===================================================================
--- code/branches/invaders/data/levels/Invaders.oxw	(revision 9827)
+++ code/branches/invaders/data/levels/Invaders.oxw	(revision 9828)
@@ -5,8 +5,7 @@
  screenshot = "emptylevel.png"
 />
-
+<!-- include("HUDTemplates3.oxo") -->
 <?lua
   include("stats.oxo")
-  include("HUDTemplates3.oxo")
   include("templates/lodInformation.oxt")
 ?>
@@ -17,4 +16,5 @@
   include("templates/spaceshipInvader.oxt")
   include("templates/enemyInvader.oxt")
+  include("overlays/InvaderHUD.oxo")
 ?>
 
@@ -61,5 +61,5 @@
 
     <MovableEntity
-      position = "<?lua print(math.random()* 30000 - 1000) ?>,-1000,<?lua print(math.random() * 4000 - 2000) ?>"
+      position = "<?lua print(math.random()* 40000 + 1000) ?>,-1000,<?lua print(math.random() * 4000 - 2000) ?>"
       collisionType = dynamic
       linearDamping = 0.8
Index: code/branches/invaders/data/levels/templates/enemyInvader.oxt
===================================================================
--- code/branches/invaders/data/levels/templates/enemyInvader.oxt	(revision 9827)
+++ code/branches/invaders/data/levels/templates/enemyInvader.oxt	(revision 9828)
@@ -34,5 +34,5 @@
 
    collisionType     = "dynamic"
-   mass              = 5
+   mass              = 0.00001
    linearDamping     = 0
    angularDamping    = 0
Index: code/branches/invaders/data/levels/templates/spaceshipInvader.oxt
===================================================================
--- code/branches/invaders/data/levels/templates/spaceshipInvader.oxt	(revision 9827)
+++ code/branches/invaders/data/levels/templates/spaceshipInvader.oxt	(revision 9828)
@@ -34,7 +34,10 @@
 
    collisionType     = "dynamic"
-   mass              = 80
+   mass              = 4200000
    linearDamping     = 0.7
    angularDamping    = 0.9999999
+
+    collisiondamage = 100
+    enablecollisiondamage = true
   >
     <engines>
Index: code/branches/invaders/data/overlays/InvaderHUD.oxo
===================================================================
--- code/branches/invaders/data/overlays/InvaderHUD.oxo	(revision 9828)
+++ code/branches/invaders/data/overlays/InvaderHUD.oxo	(revision 9828)
@@ -0,0 +1,97 @@
+<Template name="InvaderHUD">
+  <OverlayGroup name="InvaderHUD" scale = "1, 1">
+    <InvaderHUDinfo
+     position  = "0.14, 0.02"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showlives     = true
+     showlevel     = false
+     showpoints     = false
+    />
+    <OverlayText
+     position  = "0.02, 0.02"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Lives:   "
+    />
+
+    <OverlayText
+     position  = "0.02, 0.055"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Players: "
+    />
+
+    <InvaderHUDinfo
+     position  = "0.14, 0.055"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showlives     = false
+     showlevel     = true
+     showpoints     = false
+    />
+
+    <OverlayText
+     position  = "0.02, 0.1"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Points: "
+    />
+
+    <InvaderHUDinfo
+     position  = "0.14, 0.1"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showlives     = false
+     showlevel     = false
+     showpoints     = true
+    />
+  </OverlayGroup>
+</Template>
+
+
+<Template name="spaceshiphud">
+  <OverlayGroup name = "spaceshiphud" scale = "1, 1">
+    <HUDHealthBar
+     name              = "HealthBar1"
+     background        = "Orxonox/HealthBarBackground"
+     size              = "0.35, 0.0875"
+     position          = "0.0 , 0.9 "
+     pickpoint         = "0, 1"
+     bartexture        = "healthbar_bar.png"
+     textfont          = "VeraMono"
+     textusebarcolour  = true
+     textsize          = 0.039
+     textoffset        = "0.315, 0.05"
+     textpickpoint     = "0, 0"
+     textalign         = "right"
+     correctaspect     = false
+     textcorrectaspect = false
+    >
+      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+    </HUDHealthBar>
+ </OverlayGroup>
+</Template>
Index: code/branches/invaders/src/modules/invader/CMakeLists.txt
===================================================================
--- code/branches/invaders/src/modules/invader/CMakeLists.txt	(revision 9827)
+++ code/branches/invaders/src/modules/invader/CMakeLists.txt	(revision 9828)
@@ -6,4 +6,5 @@
   InvaderEnemy.cc
   InvaderWeapon.cc
+  InvaderHUDinfo.cc
 END_BUILD_UNIT
 )
Index: code/branches/invaders/src/modules/invader/Invader.cc
===================================================================
--- code/branches/invaders/src/modules/invader/Invader.cc	(revision 9827)
+++ code/branches/invaders/src/modules/invader/Invader.cc	(revision 9828)
@@ -62,4 +62,5 @@
         this->console_addEnemy = createConsoleCommand( "spawnEnemy", createExecutor( createFunctor(&Invader::spawnEnemy, this) ) );
         //this->context = context;
+        this->setHUDTemplate("InvaderHUD");
 
         enemySpawnTimer.setTimer(2.0f, true, createExecutor(createFunctor(&Invader::spawnEnemy, this)));
@@ -83,5 +84,5 @@
         newPawn->addTemplate("enemyinvader");
 
-        newPawn->setPosition(player->getPosition() + Vector3(1000, 0, 0));
+        newPawn->setPosition(player->getPosition() + Vector3(1000, 0, 0)); // BUG: 
     }
 
Index: code/branches/invaders/src/modules/invader/Invader.h
===================================================================
--- code/branches/invaders/src/modules/invader/Invader.h	(revision 9827)
+++ code/branches/invaders/src/modules/invader/Invader.h	(revision 9828)
@@ -62,12 +62,18 @@
             void setCenterpoint(InvaderCenterPoint* center)
             { this->center_ = center; }
+
+            int getLives(){return this->lives;}
+            int getLevel(){return this->level;}
+            int getPoints(){return this->point;}
         private:
             WeakPtr<InvaderCenterPoint> center_;
-            InvaderShip * player;
+            WeakPtr<InvaderShip> player;
 
             ConsoleCommand* console_addEnemy;
-
             Timer enemySpawnTimer;
             //Context* context;
+            int lives;
+            int level;
+            int point;
     };
 }
Index: code/branches/invaders/src/modules/invader/InvaderEnemy.cc
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderEnemy.cc	(revision 9827)
+++ code/branches/invaders/src/modules/invader/InvaderEnemy.cc	(revision 9828)
@@ -43,4 +43,5 @@
     {
         RegisterObject(InvaderEnemy);
+        enableCollisionCallback();
     }
 
@@ -49,3 +50,11 @@
         SUPER(InvaderEnemy, tick, dt);
     }
+
+    inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    {
+        orxout() << "sadsadasfasf" << endl;
+        removeHealth(2000);
+        setVelocity(Vector3(0,0,1000));
+        return false;
+    }
 }
Index: code/branches/invaders/src/modules/invader/InvaderEnemy.h
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderEnemy.h	(revision 9827)
+++ code/branches/invaders/src/modules/invader/InvaderEnemy.h	(revision 9828)
@@ -48,4 +48,5 @@
 
             virtual void tick(float dt);
+            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
 
         private:
Index: code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc	(revision 9828)
+++ code/branches/invaders/src/modules/invader/InvaderHUDinfo.cc	(revision 9828)
@@ -0,0 +1,98 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Florian Zinggeler
+ *
+ */
+
+#include "InvaderHUDinfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+// #include "Invader.h"
+
+namespace orxonox
+{
+    RegisterClass(InvaderHUDinfo);
+
+    InvaderHUDinfo::InvaderHUDinfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(InvaderHUDinfo);
+
+        this->InvaderGame = 0;
+        this->bShowLives_ = false;
+        this->bShowLevel_ = false;
+        this->bShowPoints_ = false;
+    }
+
+    InvaderHUDinfo::~InvaderHUDinfo()
+    {
+    }
+
+    void InvaderHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(InvaderHUDinfo, XMLPort, xmlelement, mode);
+
+        XMLPortParam(InvaderHUDinfo, "showlives",     setShowLives,     getShowLives,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(InvaderHUDinfo, "showPoints",     setShowPoints,     getShowPoints,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(InvaderHUDinfo, "showLevel",     setShowLevel,     getShowLevel,     xmlelement, mode).defaultValues(false);
+    }
+
+    void InvaderHUDinfo::tick(float dt)
+    {
+        SUPER(InvaderHUDinfo, tick, dt);
+
+        if (this->InvaderGame)
+        {
+            if (this->bShowLives_)
+            {
+                const std::string& lives = multi_cast<std::string>(this->InvaderGame->getLives());
+                this->setCaption(lives);
+            }
+            else if(this->bShowLevel_)
+            {
+                const std::string& Level = multi_cast<std::string>(this->InvaderGame->getLevel());
+                this->setCaption(Level);
+            }
+            else if(this->bShowPoints_)
+            {
+                const std::string& points = multi_cast<std::string>(this->InvaderGame->getPoints());
+                this->setCaption(points);
+            }
+        }
+    }
+
+    void InvaderHUDinfo::changedOwner()
+    {
+        SUPER(InvaderHUDinfo, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype().get());
+        }
+        else
+        {
+            this->InvaderGame = 0;
+        }
+    }
+}
Index: code/branches/invaders/src/modules/invader/InvaderHUDinfo.h
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderHUDinfo.h	(revision 9828)
+++ code/branches/invaders/src/modules/invader/InvaderHUDinfo.h	(revision 9828)
@@ -0,0 +1,69 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Florian Zinggeler
+ *
+ */
+
+#ifndef _InvaderHUDinfo_H__
+#define _InvaderHUDinfo_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport InvaderHUDinfo : public OverlayText, public Tickable
+    {
+        public:
+            InvaderHUDinfo(Context* context);
+            virtual ~InvaderHUDinfo();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setShowLives(bool value)
+                { this->bShowLives_ = value; }
+            inline bool getShowLives() const
+                { return this->bShowLives_; }
+
+            inline void setShowLevel(bool value)
+                { this->bShowLevel_ = value; }
+            inline bool getShowLevel() const
+                { return this->bShowLevel_; }
+
+            inline void setShowPoints(bool value)
+                { this->bShowPoints_ = value; }
+            inline bool getShowPoints() const
+                { return this->bShowPoints_; }
+
+        private:
+            Invader* InvaderGame;
+            bool bShowLives_;
+            bool bShowLevel_;
+            bool bShowPoints_;
+    };
+}
+#endif /* _InvaderHUDinfo_H__ */
Index: code/branches/invaders/src/modules/invader/InvaderPrereqs.h
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderPrereqs.h	(revision 9827)
+++ code/branches/invaders/src/modules/invader/InvaderPrereqs.h	(revision 9828)
@@ -73,4 +73,5 @@
     class InvaderEnemy;
     class InvaderWeapon;
+    class InvaderHUDinfo;
 }
 
Index: code/branches/invaders/src/modules/invader/InvaderShip.cc
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderShip.cc	(revision 9827)
+++ code/branches/invaders/src/modules/invader/InvaderShip.cc	(revision 9828)
@@ -70,8 +70,11 @@
         {
             float dist_y = velocity.y * dt;
+            float dist_x = velocity.x * dt;
             if(dist_y + posforeward > -42*3 && dist_y + posforeward < 42*6)
                 posforeward += dist_y;
             else
                 velocity.y = 0;
+            if (pos.z + dist_x > 42*2.5 || pos.z + dist_x < -42*3)
+                velocity.x = 0;
             // this->setVelocity(Vector3(1000 + velocity.y, 0, velocity.x));
             pos += Vector3(1000 + velocity.y, 0, velocity.x) * dt;
@@ -93,19 +96,10 @@
 
         // bring back on track!
-        if (pos.z > 42*2.5)
-            pos.z = 42*2.5;
-        else if (pos.z < -42*3)
-            pos.z = -42*3;
+        // if (pos.z > 42*2.5)
+        //     pos.z = 42*2.5;
+        // else if (pos.z < -42*3)
+        //     pos.z = -42*3;
         if(pos.y != 0)
             pos.y = 0;
-        // if (camera != NULL)
-        // {
-        //     float x = camera->getWorldPosition().x;
-        //     if (pos.x > x + 20)
-        //         pos.x = x + 20;
-        //     else if (pos.x < x - 20)
-        //         pos.x = x - 20;
-        // }
-        // if (abs(posforeward) < 20)
             
 
@@ -114,8 +108,8 @@
 
         // Level up!
-        if (pos.x > 30000)
+        if (pos.x > 42000)
         {
             updateLevel();
-            setPosition(Vector3(0, 0, 0)); // pos - Vector3(30000, 0, 0)
+            setPosition(Vector3(0, 0, pos.z)); // pos - Vector3(30000, 0, 0)
         }
 
@@ -144,3 +138,22 @@
         isFireing = bBoost;
     }
+    inline bool InvaderShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    {
+        // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
+
+        WeakPtr<InvaderEnemy> enemy = orxonox_cast<InvaderEnemy*>(otherObject);
+        if (enemy != NULL && lastEnemy != enemy)
+        {
+            lastEnemy = enemy;
+            orxout() << "Enemy!!!! " << endl;
+            removeHealth(20);
+            if (getHealth() <= 0)
+            {
+                orxout() << "DIED!!!! " << endl;
+            }
+            return false;
+        }
+        return false;
+        // SUPER(InvaderShip, collidesAgainst, otherObject, contactPoint);
+    }
 }
Index: code/branches/invaders/src/modules/invader/InvaderShip.h
===================================================================
--- code/branches/invaders/src/modules/invader/InvaderShip.h	(revision 9827)
+++ code/branches/invaders/src/modules/invader/InvaderShip.h	(revision 9828)
@@ -63,4 +63,5 @@
 
             // *InvaderShip getShip(){return this;}
+            virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
         private:
             Camera* camera;
@@ -74,4 +75,6 @@
             } velocity, desiredVelocity;
 
+            WeakPtr<InvaderEnemy> lastEnemy;
+
     };
 }
