Index: code/branches/mergeFS18/src/modules/CMakeLists.txt
===================================================================
--- code/branches/mergeFS18/src/modules/CMakeLists.txt	(revision 12029)
+++ code/branches/mergeFS18/src/modules/CMakeLists.txt	(revision 12030)
@@ -49,2 +49,3 @@
 ADD_SUBDIRECTORY(asteroids2D)
 ADD_SUBDIRECTORY(flappyorx)
+ADD_SUBDIRECTORY(orxyroad)
Index: code/branches/mergeFS18/src/modules/orxyroad/CMakeLists.txt
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/CMakeLists.txt	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/CMakeLists.txt	(revision 12030)
@@ -0,0 +1,17 @@
+SET_SOURCE_FILES(Orxyroad_SRC_FILES
+OrxyRoad.cc
+OrxyRoadCenterPoint.cc
+OrxyRoadShip.cc
+OrxyRoadCube.cc
+OrxyRoadHUDinfo.cc
+)
+
+
+ORXONOX_ADD_LIBRARY(orxyroad
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${Orxyroad_SRC_FILES}
+)
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoad.cc
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoad.cc	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoad.cc	(revision 12030)
@@ -0,0 +1,316 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoad.cc
+    @brief Implementation of the OrxyRoad class.
+*/
+
+#include "OrxyRoad.h"
+#include "OrxyRoadShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
+#include "OrxyRoadCube.h"
+#include "core/CoreIncludes.h"
+#include "Highscore.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    RegisterUnloadableClass(OrxyRoad);
+
+    OrxyRoad::OrxyRoad(Context* context) : Deathmatch(context)
+    {
+        RegisterObject(OrxyRoad);
+
+        bEndGame = false;
+        lives = 1;
+        level = 1;
+        point = 0;
+        bShowLevel = false;
+        multiplier = 1;
+        b_combo = false;
+        counter = 5000;
+        pattern = 3;
+        lastPosition = 0;
+        roadWidth = 3000;
+
+        
+
+
+
+        // spawn enemy every 3.5 seconds
+        //enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&OrxyRoad::spawnEnemy, this)));
+        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&OrxyRoad::comboControll, this)));
+        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
+        this->center_ = nullptr;
+
+        this->setHUDTemplate("OrxyRoadHUD");
+    }
+
+    void OrxyRoad::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(&OrxyRoad::toggleShowLevel, this)));
+    }
+    int OrxyRoad::generateStreet(int type, OrxyRoadShip* player){
+        int trafficVelocities[]= {200,1400,500, 300};
+        int velocityVariation[] = {40,80,100,20};
+        int numObjects[] = {30,30,30,30}; // default, spaceship, satellite, asteroid per track
+        int streetSize[] = {3 , 1, 2, 4};
+        int trackWidth = 700;
+      
+        for(int j = 0; j < streetSize[type]; j++)//width of Street
+            {
+                int sign = rand()%2;
+
+                //orxout(internal_error) << sign<< endl;
+                
+                
+
+                for(int i = -numObjects[type]/2; i<numObjects[type]/2; i++)
+                {
+                        OrxyRoadCube* cube = new OrxyRoadCube(this->center_->getContext());
+                        cubeList.push_back(cube);
+                        int templateType = rand()%2;
+
+                        switch(type)
+                        {
+                        case 0 :
+                            if(templateType >=1){
+                                cube->addTemplate("asteroid1");//default
+                            }else {
+                                cube->addTemplate("satellite");//default
+                            }
+                        break;
+                        case 1:
+                         if(templateType >=1){
+                                cube->addTemplate("spaceshuttle");//spaceship1
+                            }else {
+                                cube->addTemplate("spaceshuttle");//spaceship2
+                            }                        
+                            
+
+                        break;
+                        case 2: 
+                            if(templateType >=1){
+                                cube->addTemplate("satellite");//satellite
+                            }else {
+                                cube->addTemplate("satellite");//satellite
+                            }                    
+
+                            
+                        break;
+                        case 3: 
+                            if(templateType >=1){
+                                cube->addTemplate("asteroid1");//asteroid
+                            }else {
+                                cube->addTemplate("asteroid2");//asteroid
+                            }                      
+
+
+                        }
+
+                        int posVar = rand()%2;
+                        int distance = trafficVelocities[type]*3 +posVar*trafficVelocities[type]/10; //Todo better calculation of distance between objects
+                       
+                        cube->setPosition(player->getWorldPosition() + Vector3(2000.0f+j*trackWidth, 0.0f, i*distance));
+                        
+                        /* experimental */
+                        
+
+                        if(sign>=1){
+                            cube->setVelocity(0,0,trafficVelocities[type]*level+velocityVariation[j%3]);
+                        } else{
+                             cube->setVelocity(0,0,-trafficVelocities[type]*level+velocityVariation[j%3]);
+                        }
+                        
+
+                        
+
+                        /* experimental */
+
+
+                        //stEntity->setScale3D(50,50,50);                    
+                }
+            }
+            return streetSize[type] * trackWidth;
+    }
+        
+
+
+
+    void OrxyRoad::tick(float dt)
+    {
+        SUPER(OrxyRoad, tick, dt);
+        
+        OrxyRoadShip* player = this->getPlayer();
+        if (player != nullptr)
+        {
+            currentPosition = player->getWorldPosition().x;
+            counter = counter + (currentPosition - lastPosition);
+            lastPosition = currentPosition;
+            point = (int) currentPosition;
+            player->speed = 830.0f - (point / 1000);
+
+            for(unsigned int i=0; i < cubeList.size();i++)
+            {
+                if(cubeList.at(i)->getPosition().x < currentPosition-500)
+                {
+                    cubeList.at(i)->destroy();
+                    cubeList.erase(cubeList.begin()+i);
+                }
+            }
+
+            
+
+
+            if(counter >= roadWidth-200)
+            {
+                int type  = rand() % 4;
+                //orxout(user_info) << "Random : "<<type<< endl;
+
+                roadWidth = generateStreet(type,player);//Generate street to specific type type = 0 default, type = 1 space ship type  = 2 statellite/cubes, type = 3 asteroids 
+                counter = 0;                
+
+                //pattern %= 2;
+                //pattern ++;
+
+            }
+
+        }
+    }
+
+    OrxyRoadShip* OrxyRoad::getPlayer()
+    {
+        for (OrxyRoadShip* ship : ObjectList<OrxyRoadShip>())
+        {
+            return ship;
+        }
+        return nullptr;
+    }
+
+    void OrxyRoad::costLife()
+    {
+        //endGameTimer.setTimer(8.0f, false, createExecutor(createFunctor(&OrxyRoad::end, this)));
+        lives = 0;
+    };
+
+    void OrxyRoad::comboControll()
+    {
+        if (b_combo)
+            multiplier++;
+        // if no combo was performed before, reset multiplier
+        else
+            multiplier = 1;
+        b_combo = false;
+    }
+
+    void OrxyRoad::start()
+    {
+        orxout() << "start" << endl;
+        for(unsigned int i=0; i< cubeList.size();i++)
+        {
+            cubeList.at(i)->destroy();
+            cubeList.erase(cubeList.begin()+i);
+
+        }
+        cubeList.clear();
+        // Set variable to temporarily force the player to spawn.
+        this->bForceSpawn_ = false;
+
+        if (this->center_ == nullptr)  // abandon mission!
+        {
+            orxout(internal_error) << "OrxyRoad: No Centerpoint specified." << endl;
+            GSLevel::startMainMenu();
+            return;
+        }
+        Deathmatch::start();
+    }
+
+    void OrxyRoad::playerPreSpawn(PlayerInfo* player)
+    {
+        this->playerInfo_ = player;
+        if(lives <= 0)
+        {
+            this->end();
+        }
+
+        // Reset all the cubes
+        /*
+        orxout() << "prespawn" << endl;
+        for(int i=0; i< cubeList.size();i++)
+        {
+            cubeList.at(i)->destroy();
+            cubeList.erase(cubeList.begin()+i);
+        }
+        cubeList.clear();
+        lives = 1;
+        point = 0;
+        lastPosition = 0;
+        */
+    }
+
+    void OrxyRoad::addPoints(int numPoints)
+    {
+        if (!bEndGame)
+        {
+            point += numPoints * multiplier;
+            b_combo = true;
+        }
+    }
+
+    void OrxyRoad::end()
+    {
+        // DON'T CALL THIS!
+        //      Deathmatch::end();
+        // It will misteriously crash the game!
+        // Instead startMainMenu, this won't crash.
+        if (Highscore::exists())
+        {
+            int score = this->getPoints();
+            Highscore::getInstance().storeScore("Orxy Road ", score, this->playerInfo_);
+        }
+        GSLevel::startMainMenu();
+    }
+}
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoad.h
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoad.h	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoad.h	(revision 12030)
@@ -0,0 +1,152 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoad.h
+    @brief Gametype.
+    @ingroup OrxyRoad
+*/
+
+#ifndef _OrxyRoad_H__
+#define _OrxyRoad_H__
+
+#include "OrxyRoadPrereqs.h"
+
+#include "OrxyRoadCenterPoint.h" // Necessary for WeakPointer??
+//#include "OrxyRoadShip.h"        DO NOT include in Header. Will cause forward declaration issues
+
+//#include "OrxyRoadHUDinfo.h"
+
+
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+#include <vector>
+
+// ! HACK
+#include "infos/PlayerInfo.h"
+
+#include "core/command/ConsoleCommand.h"
+
+#include "gametypes/Deathmatch.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+
+    class _OrxyRoadExport OrxyRoad : public Deathmatch
+    {
+       public:
+            OrxyRoad(Context* context);
+
+            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(OrxyRoadCenterPoint* center)
+                       { this->center_ = center; }
+            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
+
+            // checks if multiplier should be reset.
+            void comboControll();
+            void costLife();
+
+            bool bEndGame;
+            bool bShowLevel;
+            int lives;
+            int multiplier;
+            float counter;
+            int pattern;
+            float currentPosition;
+            float lastPosition;
+
+       private:
+            Timer endGameTimer;
+
+            OrxyRoadShip* getPlayer();
+            WeakPtr<PlayerInfo> playerInfo_;
+            std::vector<OrxyRoadCube*> cubeList;
+            void toggleShowLevel(){bShowLevel = !bShowLevel;}
+            void addPoints(int numPoints);
+
+            WeakPtr<OrxyRoadCenterPoint> center_;
+            int level;
+            int point;
+            bool b_combo;
+
+            Timer enemySpawnTimer;
+            Timer comboTimer;
+            Timer showLevelTimer;
+
+
+            int generateStreet(int type, OrxyRoadShip* player);
+            int roadWidth;
+            //int trafficVelocities[4];
+            //int numObjects[4];
+            //int streetSize[4];
+
+
+         /*
+
+            //void spawnEnemy();
+
+
+
+
+
+
+
+
+
+
+
+
+        private:
+
+
+
+
+            //Context* context;
+            */
+    };
+}
+
+#endif /* _OrxyRoad_H__ */
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCenterPoint.cc
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCenterPoint.cc	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCenterPoint.cc	(revision 12030)
@@ -0,0 +1,59 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoadCenterPoint.cc
+    @brief Implementation of the OrxyRoadCenterPoint class.
+*/
+
+#include "OrxyRoadCenterPoint.h"
+
+#include "core/CoreIncludes.h"
+
+#include "OrxyRoad.h"
+
+namespace orxonox
+{
+    RegisterClass(OrxyRoadCenterPoint);
+
+    OrxyRoadCenterPoint::OrxyRoadCenterPoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(OrxyRoadCenterPoint);
+
+        this->checkGametype();
+    }
+
+    void OrxyRoadCenterPoint::checkGametype()
+    {
+        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(OrxyRoad)))
+        {
+            OrxyRoad* OrxyRoadGametype = orxonox_cast<OrxyRoad*>(this->getGametype());
+            OrxyRoadGametype->setCenterpoint(this);
+        }
+    }
+}
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCenterPoint.h
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCenterPoint.h	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCenterPoint.h	(revision 12030)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoadCenterPoint.h
+    @brief Declaration of the OrxyRoadCenterPoint class.
+    @ingroup OrxyRoad
+*/
+
+#ifndef _OrxyRoadCenterPoint_H__
+#define _OrxyRoadCenterPoint_H__
+
+#include "OrxyRoadPrereqs.h"
+
+//#include "OrxyRoad.h"
+//#include "OrxyRoadHUDinfo.h"
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _OrxyRoadExport OrxyRoadCenterPoint : public StaticEntity
+    {
+        public:
+            OrxyRoadCenterPoint(Context* context); //checks whether the gametype is actually OrxyRoad.
+
+        private:
+            void checkGametype();
+
+    };
+}
+
+#endif /* _OrxyRoadCenterPoint_H__ */
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCube.cc
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCube.cc	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCube.cc	(revision 12030)
@@ -0,0 +1,48 @@
+
+/*   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoad.cc
+    @brief Implementation of the OrxyRoad class.
+*/
+
+#include "OrxyRoadCube.h"
+#include "OrxyRoad.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(OrxyRoadCube);
+
+    OrxyRoadCube::OrxyRoadCube(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(OrxyRoadCube);
+    }
+
+
+}
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCube.h
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCube.h	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadCube.h	(revision 12030)
@@ -0,0 +1,54 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoad.h
+    @brief Gametype.
+    @ingroup OrxyRoad
+*/
+
+#ifndef _OrxyRoadCube_H__
+#define _OrxyRoadCube_H__
+
+#include "OrxyRoadPrereqs.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _OrxyRoadExport OrxyRoadCube : public MovableEntity
+    {
+       public:
+            OrxyRoadCube(Context* context);
+
+       private:
+    };
+}
+
+#endif /* _OrxyRoadCube_H__ */
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadHUDinfo.cc
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadHUDinfo.cc	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadHUDinfo.cc	(revision 12030)
@@ -0,0 +1,93 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+#include "OrxyRoadHUDinfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+//#include "OrxyRoad.h"
+
+namespace orxonox
+{
+    RegisterClass(OrxyRoadHUDinfo);
+
+    OrxyRoadHUDinfo::OrxyRoadHUDinfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(OrxyRoadHUDinfo);
+
+        this->OrxyRoadGame = nullptr;
+        this->bShowPoints_ = true;
+    }
+
+    void OrxyRoadHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(OrxyRoadHUDinfo, XMLPort, xmlelement, mode);
+
+        XMLPortParam(OrxyRoadHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
+    }
+
+    void OrxyRoadHUDinfo::tick(float dt)
+    {
+        SUPER(OrxyRoadHUDinfo, tick, dt);
+
+
+        if(this->bShowPoints_)
+        {
+            const std::string& points = multi_cast<std::string>(this->OrxyRoadGame->getPoints());
+            if (this->OrxyRoadGame->lives <= 0)
+            {
+                setTextSize(0.2);
+                setPosition(Vector2(0.1, 0.02));
+                this->setCaption("Final score:\n" + points);
+                this->setColour(ColourValue(1, 0, 0, 1));
+            }
+            else
+            {
+                setTextSize(0.04);
+                setPosition(Vector2(0.14, 0.02));
+                this->setColour(ColourValue(1, 1, 1, 1));
+                this->setCaption(points);
+            }
+        }
+    }
+
+    void OrxyRoadHUDinfo::changedOwner()
+    {
+        SUPER(OrxyRoadHUDinfo, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->OrxyRoadGame = orxonox_cast<OrxyRoad*>(this->getOwner()->getGametype());
+        }
+        else
+        {
+            this->OrxyRoadGame = nullptr;
+        }
+    }
+}
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadHUDinfo.h
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadHUDinfo.h	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadHUDinfo.h	(revision 12030)
@@ -0,0 +1,63 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+#ifndef _OrxyRoadHUDinfo_H__
+#define _OrxyRoadHUDinfo_H__
+
+//#include "OrxyRoadShip.h"
+#include "OrxyRoad.h"
+//#include "OrxyRoadCenterPoint.h"
+
+#include "OrxyRoadPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OrxyRoadExport OrxyRoadHUDinfo : public OverlayText, public Tickable
+    {
+     public:
+            OrxyRoadHUDinfo(Context* context);
+
+            virtual void tick(float dt) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void changedOwner() override;
+
+            inline void setShowPoints(bool value)
+                { this->bShowPoints_ = value; }
+            inline bool getShowPoints() const
+                { return this->bShowPoints_; }
+
+
+        private:
+            OrxyRoad* OrxyRoadGame;
+            bool bShowPoints_;
+    };
+}
+#endif /* _OrxyRoadHUDinfo_H__ */
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadPrereqs.h
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadPrereqs.h	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadPrereqs.h	(revision 12030)
@@ -0,0 +1,81 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the OrxyRoad module
+*/
+
+#ifndef _OrxyRoadPrereqs_H__
+#define _OrxyRoadPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXYROAD_STATIC_BUILD)
+#  ifdef ORXYROAD_SHARED_BUILD
+#    define _OrxyRoadExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _OrxyRoadExport
+#    else
+#      define _OrxyRoadExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _OrxyRoadPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _OrxyRoadExport  __attribute__ ((visibility("default")))
+#  define _OrxyRoadPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _OrxyRoadExport
+#  define _OrxyRoadPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class OrxyRoad;
+    class OrxyRoadCenterPoint;
+    class OrxyRoadShip;
+    class OrxyRoadCube;
+    //class OrxyRoadEnemy;
+    //class OrxyRoadEnemyShooter;
+    //class OrxyRoadWeapon;
+    //class OrxyRoadWeaponEnemy;
+    //class OrxyRoadHUDinfo;
+}
+
+#endif /* _OrxyRoadPrereqs_H__*/
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadShip.cc
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadShip.cc	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadShip.cc	(revision 12030)
@@ -0,0 +1,254 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoadShip.cc
+    @brief Implementation of the OrxyRoadShip class.
+*/
+
+#include "OrxyRoadShip.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(OrxyRoadShip);
+
+    OrxyRoadShip::OrxyRoadShip(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(OrxyRoadShip);
+
+        speed = 830;
+        isFireing = false;
+        damping = 10;
+
+        // not sure if has to be zero?
+        lastTimeFront = 0;
+        lastTimeLeft = 0;
+        lastTime = 0;
+        steeredLeft = false;
+        steeredRight = false;
+        forward = false;
+        backward = false;
+    }
+
+    void OrxyRoadShip::tick(float dt)
+    {
+        //orxout(user_info) << "This is some cool output!" << endl;
+
+        Vector3 pos = getPosition();
+        //Vector3 pos1 = 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;
+            //forward backwards movement
+            if(forward){
+                if(velocity.y < 300){// Limit for max velocity
+                    velocity.y += 30;
+                    forward = false;
+                }
+                
+
+            }else if(backward){
+                if(velocity.y > 10){
+                     velocity.y -= 30; 
+                }else {
+                    velocity.y = 0; // Prevent players from going backwards
+                }
+                backward = false;
+                          
+            }else {
+                velocity.y = 0.9 * velocity.y;//reduce speed
+            }
+
+
+
+
+            //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;
+                    }*/
+            //}
+
+            //Left right steering
+
+            if(!steeredLeft&&!steeredRight){
+                    velocity.x = velocity.x *0.8;
+            }
+
+            if(steeredLeft){
+                steeredLeft = false;
+                if(velocity.x<100){//if(!forward) Experimental for only allowing steering left and right when
+                    velocity.x += 6;
+                    steeredLeft = false;
+                }              
+
+            }else if(steeredRight) {
+                steeredRight = false;
+                if(velocity.x>-100){
+                    velocity.x += -6;
+                    steeredRight = false;
+                }       
+            }else {
+                if(velocity.x < -2 || velocity.x > 2 ){
+                    velocity.x  = velocity.x *0.9;
+                }else{
+                    velocity.x += 0;
+                }
+                
+            }
+
+            pos += Vector3(velocity.y, 0, velocity.x) * dt;
+            
+        }
+
+
+
+        // Camera
+        Camera* camera = this->getCamera();
+        if (camera != nullptr)
+        {
+           camera->setPosition(Vector3(0 ,50,50)); // try to get side/top view
+            //camera->setOrientation(Vector3(-1,-1,0), Degree(45));
+            //camera->setOrientation(Vector3(-1,-1,-1), Degree(0));
+           camera->setOrientation(Vector3::UNIT_Z, Degree(0));
+        }
+
+
+
+        // bring back on track!
+        if(pos.y != 0)
+        {
+            pos.y = 0;
+        }
+
+        setPosition(pos);
+        setOrientation(Vector3::UNIT_Y, Degree(270));
+
+        // Level up!
+        if (pos.x > 42000)
+        {
+            updateLevel();
+            setPosition(Vector3(0, 0, pos.z)); // pos - Vector3(30000, 0, 0)
+        }
+
+        SUPER(OrxyRoadShip, tick, dt);
+    }
+
+    void OrxyRoadShip::updateLevel()
+    {
+        lastTime = 0;
+        if (getGame())
+            getGame()->levelUp();
+    }
+
+    void OrxyRoadShip::moveFrontBack(const Vector2& value)
+    {
+        this->steering_.z -= value.x ;
+        if(value.x > 0){
+            forward  = true;
+            backward = false;
+        }else if(value.x < 0){
+            forward = false;
+            backward = true;
+        }
+        
+        //lastTimeFront = 0;
+        //desiredVelocity.y = value.y * speed * 42;
+
+    }
+
+    void OrxyRoadShip::moveRightLeft(const Vector2& value)
+    {
+        this->steering_.x += value.x;
+        if(value.x==-1){
+            steeredLeft = false;
+            steeredRight = true;       
+            //orxout(user_info) << "Steering RIGHT "<<steering_.x << endl;
+        }else {
+            steeredRight = false;
+            steeredLeft = true;
+             //orxout(user_info) << "Steering LEFT "<<steering_.x << endl;
+
+        }        
+
+        //lastTimeLeft = 0;
+        //desiredVelocity.x = value.x * speed;
+    }
+    void OrxyRoadShip::boost(bool bBoost)
+    {
+        //bool boosting = bBoost;
+    }
+
+    inline bool OrxyRoadShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+
+        removeHealth(100);
+        this->death();
+        return false;
+    }
+
+    OrxyRoad* OrxyRoadShip::getGame()
+    {
+        if (game == nullptr)
+        {
+            for (OrxyRoad* race : ObjectList<OrxyRoad>())
+            {
+                game = race;
+            }
+        }
+        return game;
+    }
+
+    void OrxyRoadShip::death()
+    {
+        getGame()->costLife();
+        SpaceShip::death();
+    }
+}
Index: code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadShip.h
===================================================================
--- code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadShip.h	(revision 12030)
+++ code/branches/mergeFS18/src/modules/orxyroad/OrxyRoadShip.h	(revision 12030)
@@ -0,0 +1,97 @@
+/*
+ *   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:
+ *      Sebastian Hirsch
+ *      Robin Jacobs
+ *   Co-authors: 
+ *
+ */
+
+/**
+    @file OrxyRoadShip.h
+    @brief Declaration of the OrxyRoadShip class.
+*/
+
+#ifndef _OrxyRoadShip_H__
+#define _OrxyRoadShip_H__
+
+
+#include "OrxyRoadPrereqs.h"
+
+#include "core/XMLPort.h"
+#include "worldentities/pawns/SpaceShip.h"
+#include "graphics/Camera.h"
+
+#include "OrxyRoad.h" // Is necessary for getGame function
+#include "OrxyRoadCenterPoint.h"
+
+namespace orxonox
+{
+    class _OrxyRoadExport OrxyRoadShip : public SpaceShip
+    {
+        public:
+            OrxyRoadShip(Context* context);
+
+            virtual void tick(float dt) override;
+
+            // overwrite for 2d movement
+            virtual void moveFrontBack(const Vector2& value) override;
+            virtual void moveRightLeft(const Vector2& value) override;
+
+            // Starts or stops fireing
+            virtual void boost(bool bBoost) override;
+
+            //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;
+
+            float speed, damping, posforeward;
+            bool isFireing;
+            bool steeredLeft, steeredRight, forward, backward;
+
+        protected:
+            virtual void death() override;
+
+        private:
+            OrxyRoad* getGame();
+            WeakPtr<OrxyRoad> game;
+            WeakPtr<WorldEntity> lastEntity;
+            Camera* camera;
+            float lastTimeFront, lastTimeLeft, lastTime;
+            struct Velocity
+            {
+                float x;
+                float y;
+            } velocity, desiredVelocity;
+           
+
+    };
+}
+
+#endif /* _OrxyRoadShip_H__ */
