Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc	(revision 11608)
@@ -35,5 +35,5 @@
 #include "Asteroids2DShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
 #include "core/CoreIncludes.h"
-
+#include "Highscore.h"
 
 namespace orxonox
@@ -44,11 +44,48 @@
     {
         RegisterObject(Asteroids2D);
-        this->bEndGame = false;
 
+        bEndGame = false;
+        lives = 1;
+        level = 1;
+        point = 0;
+        bShowLevel = false;
+        multiplier = 1;
+        b_combo = false;
+        counter = 5000;
+        pattern = 1;
+        lastPosition = 0;
+        // spawn enemy every 3.5 seconds
+        //enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&Asteroids2D::spawnEnemy, this)));
+        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
+        this->center_ = nullptr;
+        this->setHUDTemplate("Asteroids2DHUD");
+    }
+
+    void Asteroids2D::levelUp()
+    {
+        level++;
+        if (getPlayer() != nullptr)
+        {
+            for (int i = 0; i < 7; i++)
+            {
+                WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext());
+                chunk5->setPosition(Vector3(600, 0, 100.f * i - 300));
+                chunk5->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
+                chunk5->setScale(10);
+                chunk5->setEffect1("Orxonox/explosion2b");
+                chunk5->setEffect2("Orxonox/smoke6");
+                chunk5->Explode();
+
+            }
+        }
+        addPoints(multiplier * 42);
+        multiplier *= 2;
+        toggleShowLevel();
+        showLevelTimer.setTimer(1.0f, false, createExecutor(createFunctor(&Asteroids2D::toggleShowLevel, this)));
     }
 
     void Asteroids2D::tick(float dt)
     {
-
+        
         SUPER(Asteroids2D, tick, dt);
     }
@@ -66,8 +103,14 @@
     }
 
+    void Asteroids2D::costLife()
+    {
+        //endGameTimer.setTimer(8.0f, false, createExecutor(createFunctor(&Asteroids2D::end, this)));
+        lives = 0;
+    };
+
     void Asteroids2D::start()
     {
         orxout() << "start" << endl;
-        
+
         // Set variable to temporarily force the player to spawn.
         this->bForceSpawn_ = false;
@@ -83,4 +126,21 @@
     }
 
+    void Asteroids2D::playerPreSpawn(PlayerInfo* player)
+    {
+        if(lives <= 0)
+        {
+            this->end();
+        }
+    }
+
+    void Asteroids2D::addPoints(int numPoints)
+    {
+        if (!bEndGame)
+        {
+            point += numPoints * multiplier;
+            b_combo = true;
+        }
+    }
+
     void Asteroids2D::end()
     {
@@ -89,5 +149,10 @@
         // It will misteriously crash the game!
         // Instead startMainMenu, this won't crash.
-        orxout() << "Asteroids2D Game has ended" << endl;
+        if (Highscore::exists()){
+                    int score = this->getPoints();
+                    if(score > Highscore::getInstance().getHighestScoreOfGame("Dodge Race")) 
+                        Highscore::getInstance().storeHighscore("Dodge Race",score);
+
+          }
         GSLevel::startMainMenu();
     }
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.h
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.h	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.h	(revision 11608)
@@ -50,5 +50,5 @@
 #include "gamestates/GSLevel.h"
 #include "chat/ChatManager.h"
-
+#include <vector>
 
 // ! HACK
@@ -58,4 +58,5 @@
 
 #include "gametypes/Deathmatch.h"
+#include "tools/Timer.h"
 
 namespace orxonox
@@ -69,18 +70,49 @@
             virtual void start() override;
             virtual void end() override;
+
             virtual void tick(float dt) override;
+
+            virtual void playerPreSpawn(PlayerInfo* player) override;
+
+            void levelUp();
+
+            int getLives(){return this->lives;}
+            int getLevel(){return this->level;}
+            int getPoints(){return this->point;}
+            int getMultiplier(){return this->multiplier;}
 
             void setCenterpoint(Asteroids2DCenterPoint* center)
                        { this->center_ = center; }
+            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
 
-            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
+            // checks if multiplier should be reset.
+            void costLife();
+
             bool bEndGame;
+            bool bShowLevel;
+            int lives;
+            int multiplier;
+            float counter;
+            int pattern;
+            float currentPosition;
+            float lastPosition;
 
        private:
-
+            Timer endGameTimer;
 
             Asteroids2DShip* getPlayer();
             WeakPtr<Asteroids2DShip> player;
+            std::vector<Asteroids2DCube*> cubeList;
+            void toggleShowLevel(){bShowLevel = !bShowLevel;}
+            void addPoints(int numPoints);
+
             WeakPtr<Asteroids2DCenterPoint> center_;
+            int level;
+            int point;
+            bool b_combo;
+
+            Timer enemySpawnTimer;
+            Timer comboTimer;
+            Timer showLevelTimer;
 
 
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.cc
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.cc	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.cc	(revision 11608)
@@ -35,4 +35,5 @@
 
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 #include "Asteroids2D.h"
@@ -47,6 +48,17 @@
 
         this->checkGametype();
+        this->width_ = 200;
+        this->height_ = 120;
     }
+    /**
+    @brief
+        Method to create a Asteroids2DCenterpoint through XML.
+    */
+    void Asteroids2DCenterPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Asteroids2DCenterPoint, XMLPort, xmlelement, mode);
 
+        XMLPortParam(Asteroids2DCenterPoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
+    }
     void Asteroids2DCenterPoint::checkGametype()
     {
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.h
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.h	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.h	(revision 11608)
@@ -49,7 +49,21 @@
         public:
             Asteroids2DCenterPoint(Context* context); //checks whether the gametype is actually Asteroids2D.
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a PongCenterpoint through XML.
+            /**
+            @brief Set the dimensions of the playing field.
+            @param dimension A vector with the width of the playing field as first component and the height as second.
+            */
+            void setFieldDimension(const Vector2& dimension)
+                { this->width_ = dimension.x; this->height_ = dimension.y; }
+            /**
+            @brief Get the dimensions of the playing field.
+            @return Returns a vector with the width of the playing field as first component and the height as second.
+            */
+            Vector2 getFieldDimension() const
+                { return Vector2(this->width_, this->height_); }
 
         private:
             void checkGametype();
+            float width_, height_;
 
     };
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc	(revision 11608)
@@ -25,39 +25,39 @@
  */
 
-#include "DodgeRaceHUDinfo.h"
+#include "Asteroids2DHUDinfo.h"
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "util/Convert.h"
-//#include "DodgeRace.h"
+//#include "Asteroids2D.h"
 
 namespace orxonox
 {
-    RegisterClass(DodgeRaceHUDinfo);
+    RegisterClass(Asteroids2DHUDinfo);
 
-    DodgeRaceHUDinfo::DodgeRaceHUDinfo(Context* context) : OverlayText(context)
+    Asteroids2DHUDinfo::Asteroids2DHUDinfo(Context* context) : OverlayText(context)
     {
-        RegisterObject(DodgeRaceHUDinfo);
+        RegisterObject(Asteroids2DHUDinfo);
 
-        this->DodgeRaceGame = nullptr;
+        this->Asteroids2DGame = nullptr;
         this->bShowPoints_ = true;
     }
 
-    void DodgeRaceHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    void Asteroids2DHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
-        SUPER(DodgeRaceHUDinfo, XMLPort, xmlelement, mode);
+        SUPER(Asteroids2DHUDinfo, XMLPort, xmlelement, mode);
 
-        XMLPortParam(DodgeRaceHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
+        XMLPortParam(Asteroids2DHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
     }
 
-    void DodgeRaceHUDinfo::tick(float dt)
+    void Asteroids2DHUDinfo::tick(float dt)
     {
-        SUPER(DodgeRaceHUDinfo, tick, dt);
+        SUPER(Asteroids2DHUDinfo, tick, dt);
 
 
         if(this->bShowPoints_)
         {
-            const std::string& points = multi_cast<std::string>(this->DodgeRaceGame->getPoints());
-            if (this->DodgeRaceGame->lives <= 0)
+            const std::string& points = multi_cast<std::string>(this->Asteroids2DGame->getPoints());
+            if (this->Asteroids2DGame->lives <= 0)
             {
                 setTextSize(0.2);
@@ -76,15 +76,15 @@
     }
 
-    void DodgeRaceHUDinfo::changedOwner()
+    void Asteroids2DHUDinfo::changedOwner()
     {
-        SUPER(DodgeRaceHUDinfo, changedOwner);
+        SUPER(Asteroids2DHUDinfo, changedOwner);
 
         if (this->getOwner() && this->getOwner()->getGametype())
         {
-            this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());
+            this->Asteroids2DGame = orxonox_cast<Asteroids2D*>(this->getOwner()->getGametype());
         }
         else
         {
-            this->DodgeRaceGame = nullptr;
+            this->Asteroids2DGame = nullptr;
         }
     }
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc	(revision 11608)
@@ -55,61 +55,30 @@
     void Asteroids2DShip::tick(float dt)
     {
-        Vector3 pos = getPosition();
-
-        //Movement calculation
-        lastTimeFront += dt * damping;
-        lastTimeLeft += dt * damping;
-        lastTime += dt;
-
-        velocity.x = interpolate(clamp(lastTimeLeft, 0.0f, 1.0f), desiredVelocity.x, 0.0f);
-        velocity.y = interpolate(clamp(lastTimeFront, 0.0f, 1.0f), desiredVelocity.y, 0.0f);
-
-        //Execute movement
-        if (this->hasLocalController())
-        {
-            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;
-                // restart if game ended
-/*
-                if (getGame())
-                    if (getGame()->bEndGame)
-                    {
-                        getGame()->start();
-                        return;
-                    }*/
-            }
-
-            pos += Vector3(1000 + velocity.y, 0, velocity.x) * dt;
-        }
-
-        // bring back on track!
-        if(pos.y != 0)
-        {
-            pos.y = 0;
-        }
-
-        setPosition(pos);
-        setOrientation(Vector3::UNIT_Y, Degree(270));
-
         SUPER(Asteroids2DShip, tick, dt);
     }
 
-    void Asteroids2DShip::moveFrontBack(const Vector2& value)
+    void Asteroids2DShip::updateLevel()
+    {
+        lastTime = 0;
+        if (getGame())
+            getGame()->levelUp();
+    }
+
+/*    void Asteroids2DShip::moveFrontBack(const Vector2& value)
     {
         //lastTimeFront = 0;
         //desiredVelocity.y = value.y * speed * 42;
-
+        orxout() << "FrontBack" << endl;
+        SUPER(Asteroids2DShip, moveFrontBack, value);
     }
 
     void Asteroids2DShip::moveRightLeft(const Vector2& value)
     {
-        lastTimeLeft = 0;
-        desiredVelocity.x = value.x * speed;
+        //lastTimeLeft = 0;
+        //desiredVelocity.x = value.x * speed;
+        orxout() << "RightLeft" << endl;
+        SUPER(Asteroids2DShip, moveFrontBack, value);       
     }
+ */
     void Asteroids2DShip::boost(bool bBoost)
     {
@@ -139,5 +108,5 @@
     void Asteroids2DShip::death()
     {
-        //getGame()->costLife();
+        getGame()->costLife();
         SpaceShip::death();
     }
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h	(revision 11608)
@@ -55,6 +55,6 @@
 
             // overwrite for 2d movement
-            virtual void moveFrontBack(const Vector2& value) override;
-            virtual void moveRightLeft(const Vector2& value) override;
+            //virtual void moveFrontBack(const Vector2& value) override;
+            //virtual void moveRightLeft(const Vector2& value) override;
 
             // Starts or stops fireing
@@ -62,8 +62,11 @@
 
             //no rotation!
+            virtual void rotateYaw(const Vector2& value) override{};
             virtual void rotatePitch(const Vector2& value) override{};
 
             //return to main menu if game has ended.
             virtual void rotateRoll(const Vector2& value) override{if (getGame()) if (getGame()->bEndGame) getGame()->end();};
+
+            virtual void updateLevel();
 
             virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
Index: code/branches/Asteroid_HS17/src/modules/asteroids2D/CMakeLists.txt
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids2D/CMakeLists.txt	(revision 11593)
+++ code/branches/Asteroid_HS17/src/modules/asteroids2D/CMakeLists.txt	(revision 11608)
@@ -1,6 +1,8 @@
-SET_SOURCE_FILES(Asteroids2D_SRC_FILES
+SET_SOURCE_FILES(MINIGAMESTEST_SRC_FILES
 Asteroids2D.cc
 Asteroids2DCenterPoint.cc
 Asteroids2DShip.cc
+Asteroids2DCube.cc
+Asteroids2DHUDinfo.cc
 )
 
@@ -11,4 +13,4 @@
     orxonox
     overlays
-  SOURCE_FILES ${ASTEROIDS2D_SRC_FILES}
+  SOURCE_FILES ${MINIGAMESTEST_SRC_FILES}
 )
