Index: code/branches/HUD_HS16/src/modules/CMakeLists.txt
===================================================================
--- code/branches/HUD_HS16/src/modules/CMakeLists.txt	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/CMakeLists.txt	(revision 11502)
@@ -26,4 +26,5 @@
 ################ Sub Directories ################
 
+ADD_SUBDIRECTORY(dialogue)
 ADD_SUBDIRECTORY(designtools)
 ADD_SUBDIRECTORY(gametypes)
@@ -44,2 +45,3 @@
 ADD_SUBDIRECTORY(dodgerace)
 ADD_SUBDIRECTORY(hover)
+ADD_SUBDIRECTORY(superorxobros)
Index: code/branches/HUD_HS16/src/modules/dialogue/CMakeLists.txt
===================================================================
--- code/branches/HUD_HS16/src/modules/dialogue/CMakeLists.txt	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/dialogue/CMakeLists.txt	(revision 11502)
@@ -0,0 +1,15 @@
+SET_SOURCE_FILES(DIALOGUE_SRC_FILES
+  DialogueManager.cc
+  NextQuestion.cc
+ 
+)
+
+ORXONOX_ADD_LIBRARY(dialogue
+  MODULE
+  FIND_HEADER_FILES
+   TOLUA_FILES
+    DialogueManager.h
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${DIALOGUE_SRC_FILES}
+)
Index: code/branches/HUD_HS16/src/modules/dialogue/DialogueManager.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/dialogue/DialogueManager.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/dialogue/DialogueManager.cc	(revision 11502)
@@ -0,0 +1,92 @@
+#include "core/CoreIncludes.h"
+#include "core/LuaState.h"
+#include "core/GUIManager.h"
+#include "core/class/Identifier.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+#include "network/Host.h"
+#include "network/NetworkFunctionIncludes.h"
+#include "DialogueManager.h"
+#include <vector>
+#include <string>
+#include "core/XMLPort.h"
+#include "NextQuestion.h"
+
+
+
+namespace orxonox {
+	ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false);
+	
+
+	
+	DialogueManager::DialogueManager(){}
+	
+
+	
+    
+
+	void DialogueManager::registerquestion(NextQuestion* nq){
+		if(allQuestions.size()==0) {
+			orxout(internal_info) << "At least one NextQuestion has to be set." << endl;
+		} 
+		allQuestions.push_back(nq);
+			orxout(internal_info) << "qsize " << allQuestions.size();
+
+	}	
+
+    void DialogueManager::setquestion(std::string q){
+		question=q;
+		
+	}
+	void DialogueManager::setCurrentQuestion(NextQuestion* nq){
+		currentQuestion=nq;
+		
+	}
+
+	std::string DialogueManager::getquestion(void){
+		return question;
+	}
+
+	void DialogueManager::setanswers1(std::string a1){
+		this->a1=a1;
+				}
+
+	void DialogueManager::setanswers2(std::string a2){
+		this->a2=a2;
+				}
+
+	
+
+	std::string DialogueManager::getanswers1(void){
+		return a1;
+	}
+
+	std::string DialogueManager::getanswers2(void){
+		return a2;
+	}
+
+	void DialogueManager::a1clicked(void){
+		
+		currentQuestion = currentQuestion->possibleQuestions[0];
+		update(currentQuestion);
+
+		
+	}
+	void DialogueManager::a2clicked(void){
+		
+		currentQuestion = currentQuestion->possibleQuestions[1];
+		update(currentQuestion);
+	}
+
+	 void DialogueManager::update(NextQuestion* nq){
+	 	this->setquestion(nq->getquestion());
+	 	this->setanswers1(nq->getanswers1());
+	 	this->setanswers2(nq->getanswers2());
+	 }
+
+	bool DialogueManager::theEnd(){
+	if((currentQuestion->possibleQuestions).empty()) {
+		return true;}
+	else return false;
+	}
+
+}
Index: code/branches/HUD_HS16/src/modules/dialogue/DialogueManager.h
===================================================================
--- code/branches/HUD_HS16/src/modules/dialogue/DialogueManager.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/dialogue/DialogueManager.h	(revision 11502)
@@ -0,0 +1,74 @@
+#ifndef _DialogueManager_H__
+#define _DialogueManager_H__
+
+#include "core/CoreIncludes.h"
+#include "core/LuaState.h"
+#include "core/GUIManager.h"
+#include "core/class/Identifier.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+#include "network/Host.h"
+#include "network/NetworkFunctionIncludes.h"
+#include "util/Singleton.h"
+#include <string>
+#include <vector>
+#include "core/config/Configurable.h"
+#include "core/XMLPort.h"
+#include "core/EventIncludes.h"
+#include "DialoguePrereqs.h"
+#include "NextQuestion.h"
+
+
+
+
+namespace orxonox //tolua_export
+
+{//tolua_export
+	class _OrxonoxExport DialogueManager //tolua_export
+	: public Singleton<DialogueManager>
+	{//tolua_export
+		friend class Singleton<DialogueManager>;
+	
+		public:
+		
+		DialogueManager(); 
+		
+
+		static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } //tolua_export
+		
+
+		void setquestion(std::string question); //tolua_export
+		std::string getquestion(void); //tolua_export
+		
+		
+		void setanswers1(std::string a1); //tolua_export
+		std::string getanswers1(void); //tolua_export
+		
+		void setanswers2(std::string a2); //tolua_export
+		std::string getanswers2(void); //tolua_export
+		
+		void setCurrentQuestion(NextQuestion* q);
+
+		//Sets the current Question to the question corresponding to the first/second answer  
+		void a1clicked(void); //tolua_export
+		void a2clicked(void); //tolua_export
+		
+		//Checks whether there are any more Questions to come
+		bool theEnd(); //tolua_export 
+
+		//Sets question and a1, a2 for new currentQuestion
+		void update(NextQuestion* nq);
+
+		//Is executed whenever a NextQuestion is created and pushes all NextQuestion into the allQuestion vector.
+		void registerquestion(NextQuestion* nq);
+
+private:
+	NextQuestion* currentQuestion; //The Question which is currently displayed
+	std::vector<NextQuestion*> allQuestions;
+	std::string a1; //answer on first button
+	std::string a2; //answer on second button
+	std::string question;
+	static DialogueManager* singletonPtr_s;
+
+	};//tolua_export
+}//tolua_export
+#endif
Index: code/branches/HUD_HS16/src/modules/dialogue/DialoguePrereqs.h
===================================================================
--- code/branches/HUD_HS16/src/modules/dialogue/DialoguePrereqs.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/dialogue/DialoguePrereqs.h	(revision 11502)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _DialoguePrereqs_H__
+#define _DialoguePrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Dialogue_STATIC_BUILD)
+#  ifdef Dialogue_SHARED_BUILD
+#    define _DialogueExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _DialogueExport
+#    else
+#      define _DialogueExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _DialoguePrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _DialogueExport  __attribute__ ((visibility("default")))
+#  define _DialoguePrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _DialogueExport
+#  define _DialoguePrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+    class DialogueManager;
+    class NextQuestion;
+   
+}
+
+#endif /* _DialoguePrereqs_H__ */
Index: code/branches/HUD_HS16/src/modules/dialogue/NextQuestion.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/dialogue/NextQuestion.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/dialogue/NextQuestion.cc	(revision 11502)
@@ -0,0 +1,111 @@
+//#include <vector>
+#include <string>
+#include "core/CoreIncludes.h"
+#include "core/GUIManager.h"
+#include "overlays/OrxonoxOverlay.h"
+
+
+#include "NextQuestion.h"
+#include "core/XMLPort.h"
+#include "DialogueManager.h"
+
+namespace orxonox{
+
+	RegisterClass(NextQuestion);
+
+	NextQuestion::NextQuestion(Context* context) : BaseObject(context)
+    {
+        RegisterObject(NextQuestion);
+
+        DialogueManager& m = DialogueManager::getInstance();
+        m.registerquestion(this);
+       
+        
+    }
+
+	void NextQuestion::setquestion(std::string question){
+		this->question=question;
+	}
+
+	std::string NextQuestion::getquestion(void){
+		return question;
+	}
+
+	
+	bool NextQuestion::addposQuestion(NextQuestion* nq){
+		
+		possibleQuestions.push_back(nq);
+		return true;
+	}
+
+	const NextQuestion* NextQuestion::getposQuestion(unsigned int i) const
+    {
+        for (NextQuestion* effect : this->possibleQuestions)
+        {
+            if(i == 0)
+               return effect;
+            i--;
+        }
+        return nullptr;
+         }
+	
+	
+	void NextQuestion::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(NextQuestion, XMLPort, xmlelement, mode);
+
+        XMLPortParam(NextQuestion, "question", setquestion, getquestion, xmlelement, mode);
+        XMLPortParam(NextQuestion, "a1", setanswers1, getanswers1, xmlelement, mode);
+        XMLPortParam(NextQuestion, "a2", setanswers2, getanswers2, xmlelement, mode);
+        XMLPortObject(NextQuestion, NextQuestion, "possibleQuestions", addposQuestion, getposQuestion, xmlelement, mode);
+       
+    }
+	bool NextQuestion::execute(bool bTriggered, BaseObject* trigger)
+    {  
+        
+    	DialogueManager& m = DialogueManager::getInstance();
+        	
+        m.setquestion(question);
+        m.setCurrentQuestion(this);
+        m.setanswers1(a1);
+        m.setanswers2(a2);
+       
+
+       
+        OrxonoxOverlay::showOverlay("Dialogue");
+
+        return false;
+    }
+
+    void NextQuestion::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(NextQuestion, XMLEventPort, xmlelement, mode);
+
+        XMLPortEventSink(NextQuestion, BaseObject, "execute", execute, xmlelement, mode); 
+    }
+
+
+	void NextQuestion::setanswers1(std::string a1){
+		this->a1=a1;
+				}
+
+	void NextQuestion::setanswers2(std::string a2){
+		this->a2=a2;
+				}
+
+	
+
+	std::string NextQuestion::getanswers1(void){
+		return a1;
+	}
+
+	std::string NextQuestion::getanswers2(void){
+		return a2;
+	}
+
+	
+
+
+
+
+}
Index: code/branches/HUD_HS16/src/modules/dialogue/NextQuestion.h
===================================================================
--- code/branches/HUD_HS16/src/modules/dialogue/NextQuestion.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/dialogue/NextQuestion.h	(revision 11502)
@@ -0,0 +1,61 @@
+#ifndef _NextQuestion_H__
+#define _NextQuestion_H__
+
+
+
+#include <string>
+#include "core/class/Identifier.h"
+#include "OrxonoxPrereqs.h"
+#include "core/XMLPort.h"
+#include "core/EventIncludes.h"
+#include "DialoguePrereqs.h"
+
+
+namespace orxonox{
+	class _OrxonoxExport NextQuestion : public BaseObject
+	{
+		
+		//tolua_begin
+		public:
+
+		NextQuestion (Context* context); // tolua_export
+		
+
+		void setquestion(std::string question);
+		std::string getquestion(void);
+
+		void setanswers1(std::string a1);
+		void setanswers2(std::string a2);
+		std::string getanswers1(void);
+		std::string getanswers2(void);
+
+		
+		
+
+		//XMLEventPort for Event that first triggers the Dialogue
+		virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+
+		//XMLPort for setting questions and answers and the vector possibleQuestions
+		virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+		bool addposQuestion(NextQuestion* nq);
+		const NextQuestion* getposQuestion(unsigned int index) const;
+
+		//Sets very first currentQuestion in the DialogueManager when the event is triggered
+		bool execute(bool bTriggered, BaseObject* trigger);
+
+		std::vector<NextQuestion*> possibleQuestions;
+	
+	private:
+		std::string a1;
+		std::string a2;
+	
+
+
+		std::string question;
+		DialogueManager* m;
+
+	};
+	
+}
+#endif
Index: code/branches/HUD_HS16/src/modules/dodgerace/DodgeRace.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/dodgerace/DodgeRace.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/dodgerace/DodgeRace.cc	(revision 11502)
@@ -36,4 +36,5 @@
 #include "DodgeRaceCube.h"
 #include "core/CoreIncludes.h"
+#include "Highscore.h"
 
 namespace orxonox
@@ -224,4 +225,10 @@
         // It will misteriously crash the game!
         // Instead startMainMenu, this won't crash.
+        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/HUD_HS16/src/modules/gametypes/CMakeLists.txt
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/CMakeLists.txt	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/gametypes/CMakeLists.txt	(revision 11502)
@@ -3,6 +3,5 @@
   RaceCheckPoint.cc
   SpaceRaceManager.cc
-  OldSpaceRace.cc
-  OldRaceCheckPoint.cc
+
   SpaceRaceBot.cc
   SpaceRaceController.cc
Index: code/branches/HUD_HS16/src/modules/gametypes/OldRaceCheckPoint.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/OldRaceCheckPoint.cc	(revision 11501)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/*
- *   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:
- *      Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OldRaceCheckPoint.h"
-
-#include "util/Convert.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "chat/ChatManager.h"
-
-#include "OldSpaceRace.h"
-
-namespace orxonox
-{
-    RegisterClass(OldRaceCheckPoint);
-
-    OldRaceCheckPoint::OldRaceCheckPoint(Context* context): DistanceTrigger(context), RadarViewable(this, static_cast<WorldEntity*>(this))
-    {
-        RegisterObject(OldRaceCheckPoint);
-
-        this->bCheckpointIndex_ = 0;
-        this->bIsLast_ = false;
-        this->bTimeLimit_ = 0;
-
-        this->setRadarObjectColour(ColourValue::Blue);
-        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
-        this->setRadarVisibility(false);
-    }
-
-    OldRaceCheckPoint::~OldRaceCheckPoint()
-    {
-    }
-
-    void OldRaceCheckPoint::tick(float dt)
-    {
-        SUPER(OldRaceCheckPoint, tick, dt);
-
-        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
-        assert(gametype);
-        if (this->getCheckpointIndex() == gametype->getCheckpointsReached())
-            this->setRadarVisibility(true);
-        else
-            this->setRadarVisibility(false);
-    }
-
-    void OldRaceCheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(OldRaceCheckPoint, XMLPort, xmlelement, mode);
-
-        XMLPortParam(OldRaceCheckPoint, "checkpointindex", setCheckpointIndex, getCheckpointIndex, xmlelement, mode).defaultValues(0);
-        XMLPortParam(OldRaceCheckPoint, "islast", setLast, getLast, xmlelement, mode).defaultValues(false);
-        XMLPortParam(OldRaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0);
-    }
-
-    void OldRaceCheckPoint::triggered(bool bIsTriggered)
-    {
-        DistanceTrigger::triggered(bIsTriggered);
-
-        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
-        if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered)
-        {
-            gametype->clock_.capture();
-            float time = gametype->clock_.getSecondsPrecise();
-            if (this->bTimeLimit_!=0 && time > this->bTimeLimit_)
-            {
-                gametype->timeIsUp();
-                gametype->end();
-            }
-            else if (this->getLast())
-                gametype->end();
-            else
-            {
-                gametype->newCheckpointReached();
-                this->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
-            }
-        }
-    }
-
-    void OldRaceCheckPoint::setTimelimit(float timeLimit)
-    {
-        this->bTimeLimit_ = timeLimit;
-        if (this->bTimeLimit_ != 0)
-        {
-            OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
-            if (gametype)
-            {
-                const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
-                            + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1);
-                gametype->getGametypeInfo()->sendAnnounceMessage(message);
-                ChatManager::message(message);
-            }
-        }
-    }
-
-}
Index: code/branches/HUD_HS16/src/modules/gametypes/OldRaceCheckPoint.h
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/OldRaceCheckPoint.h	(revision 11501)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
- *   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:
- *      Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _OldRaceCheckPoint_H__
-#define _OldRaceCheckPoint_H__
-
-#include "gametypes/GametypesPrereqs.h"
-
-#include "objects/triggers/DistanceTrigger.h"
-#include "interfaces/RadarViewable.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        The OldRaceCheckPoint class enables the creation of a check point to use in a OldSpaceRace level.
-        !!! Don't forget to control the indexes of your check points and to set one last check point!!!
-    */
-    class _GametypesExport OldRaceCheckPoint : public DistanceTrigger, public RadarViewable
-    {
-        public:
-            OldRaceCheckPoint(Context* context);
-            virtual ~OldRaceCheckPoint();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-            virtual void tick(float dt) override;
-
-            protected:
-            virtual void triggered(bool bIsTriggered) override;
-            inline void setLast(bool isLast)
-                { this->bIsLast_ = isLast; }
-            inline bool getLast()
-                { return this->bIsLast_; }
-            inline void setCheckpointIndex(int checkpointIndex)
-                { this->bCheckpointIndex_ = checkpointIndex; }
-            inline int getCheckpointIndex()
-                { return this->bCheckpointIndex_; }
-            virtual void setTimelimit(float timeLimit);
-            inline float getTimeLimit()
-                { return this->bTimeLimit_;}
-            virtual inline const WorldEntity* getWorldEntity() const override
-                { return this; }
-
-        private:
-            int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes.
-            bool bIsLast_; //True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level.
-            float bTimeLimit_; //The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses.
-      
-    };
-}
-
-#endif /* _OldRaceCheckPoint_H__ */
Index: code/branches/HUD_HS16/src/modules/gametypes/OldSpaceRace.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/OldSpaceRace.cc	(revision 11501)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/*
- *   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:
- *     Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OldSpaceRace.h"
-
-#include "core/CoreIncludes.h"
-#include "chat/ChatManager.h"
-#include "util/Convert.h"
-#include "util/Math.h"
-
-namespace orxonox
-{
-    RegisterUnloadableClass(OldSpaceRace);
-
-    OldSpaceRace::OldSpaceRace(Context* context) : Gametype(context)
-    {
-        RegisterObject(OldSpaceRace);
-        this->checkpointsReached_ = 0;
-        this->bTimeIsUp_ = false;
-        this->numberOfBots_ = 0;
-    }
-
-    void OldSpaceRace::end()
-    {
-        this->Gametype::end();
-
-        if (this->bTimeIsUp_)
-        {
-            this->clock_.capture();
-            int s = this->clock_.getSeconds();
-            int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
-            const std::string& message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
-                        + "You didn't reach the check point " + multi_cast<std::string>(this->checkpointsReached_+1)
-                        + " before the time limit. You lose!";
-            this->getGametypeInfo()->sendAnnounceMessage(message);
-            ChatManager::message(message);
-        }
-        else
-        {
-            this->clock_.capture();
-            int s = this->clock_.getSeconds();
-            int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
-            const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
-                        + "." + multi_cast<std::string>(ms) + " seconds.";
-            this->getGametypeInfo()->sendAnnounceMessage(message);
-            ChatManager::message(message);
-/*
-            float time = this->clock_.getSecondsPrecise();
-            this->scores_.insert(time);
-            std::set<float>::iterator it;
-            for (it=this->scores_.begin(); it!=this->scores_.end(); it++)
-                orxout(level::message) << multi_cast<std::string>(*it) << endl;
-*/
-        }
-    }
-
-    void OldSpaceRace::start()
-    {
-        Gametype::start();
-
-        std::string message("The match has started! Reach the check points as quickly as possible!");
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
-    }
-
-    void OldSpaceRace::newCheckpointReached()
-    {
-        this->checkpointsReached_++;
-        this->clock_.capture();
-        int s = this->clock_.getSeconds();
-        int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
-        const std::string& message = "Checkpoint " + multi_cast<std::string>(this->getCheckpointsReached())
-                        + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
-                        + " seconds.";
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
-    }
-
-}
Index: code/branches/HUD_HS16/src/modules/gametypes/OldSpaceRace.h
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/OldSpaceRace.h	(revision 11501)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- *   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:
- *      Mauro Salomon
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _OldSpaceRace_H__
-#define _OldSpaceRace_H__
-
-#include "gametypes/GametypesPrereqs.h"
-
-#include <set>
-#include <string>
-
-#include <util/Clock.h>
-
-#include "gametypes/Gametype.h"
-
-#include "OldRaceCheckPoint.h"
-
-namespace orxonox
-{
-  /**
-  @brief
-    The OldSpaceRace class enables the creation of a space race level, where the player has to reach check points in a given order.
-  */
-    class _GametypesExport OldSpaceRace : public Gametype
-    {
-        friend class OldRaceCheckPoint;
-
-        public:
-            OldSpaceRace(Context* context);
-            virtual ~OldSpaceRace() {}
-
-            virtual void start() override;
-            virtual void end() override;
-
-            virtual void newCheckpointReached();
-            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command.
-                                                        //<! This is only a temporary solution. Better: create racingBots.
-
-            inline void setCheckpointsReached(int n)
-                { this->checkpointsReached_ = n;}
-            inline int getCheckpointsReached()
-                { return this->checkpointsReached_; }
-            inline void timeIsUp()
-                { this->bTimeIsUp_ = true;}
-
-        protected:
-
-        private:
-            int checkpointsReached_; //The current number of check points reached by the player.
-            std::set<float> scores_; //The times of the players are saved in a set.
-            bool bTimeIsUp_; //True if one of the check points is reached too late.
-            Clock clock_; //The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late.
-    };
-}
-
-#endif /* _OldSpaceRace_H__ */
Index: code/branches/HUD_HS16/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/SpaceRace.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/gametypes/SpaceRace.cc	(revision 11502)
@@ -23,10 +23,42 @@
  *     Mauro Salomon
  *   Co-authors:
- *      Celine Egger
- *
- */
+ *      Celine Egger*/
+        
+
+
+
+/*
+Edited, Renewed and Revised by 
+        Berkay Berabi
+        Louis Meile
+ 
+ 
+To-do- list by Louis Meile and Berkay Berabi for future projects :
+- improve AI (SpaceRaceController): 
+i) so far bots arent able to evade obstacles. fix that!
+ii) bots should be able to use pickups
+- game crashes when bot wins the game(this is a huge problem you should work with the log file to find out what the errors are )
+- bots rotate while waiting for the countdown to end. make it stop!
+- add elements to level file to make it even more fun to play. be creative!
+*/
+
 
 #include "SpaceRace.h"
 
+#include "core/CoreIncludes.h"
+#include "chat/ChatManager.h"
+#include "util/Convert.h"
+#include "util/Math.h"
+#include "infos/Bot.h"
+#include "items/Engine.h"
+#include "controllers/HumanController.h"
+
+#include "core/CoreIncludes.h"
+#include "chat/ChatManager.h"
+#include "infos/PlayerInfo.h"
+#include "worldentities/pawns/Pawn.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "infos/Bot.h"
+#include "SpaceRaceBot.h"
 #include "items/Engine.h"
 
@@ -37,4 +69,6 @@
 #include "SpaceRaceBot.h"
 #include "items/Engine.h"
+#include <vector>
+
 
 namespace orxonox
@@ -46,10 +80,87 @@
         RegisterObject(SpaceRace);
 
-        this->botclass_ = Class(SpaceRaceBot);//ClassByString("")
+        this->botclass_ = Class(SpaceRaceBot); //ClassByString("")
         this->cantMove_ = false;
         this->bTimeIsUp_ = false;
-        this->numberOfBots_ = 0; // quick fix: don't allow default-bots to enter the race
-                                 // remove this line, if a raceBot has been created.
-    }
+        this->setConfigValues();
+
+        this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race 
+        //we fixed the number of bots in order to have the same starting position all the time ! 
+    }
+
+  void SpaceRace::setConfigValues()
+    {
+       
+    
+    }
+
+    void SpaceRace::start()
+    {
+    // define spawn positions of the 5 bots
+
+        int startpos[15];
+        
+        startpos[0] =100;
+        startpos[1] =-40;
+        startpos[2] =0;
+        
+        startpos[3] =100;
+        startpos[4] =-40;
+        startpos[5] =100;
+        
+        startpos[6] =100;
+        startpos[7] =-40;
+        startpos[8] =-100;
+        
+        startpos[9] =0;
+        startpos[10] =-40;
+        startpos[11] =-80;
+        
+        startpos[12] =0;
+        startpos[13] =-40;
+        startpos[14] =80;
+        
+
+
+
+        Gametype::start();
+   if (true)
+        {
+            this->spawnPlayersIfRequested();
+            this->cantMove_ = true;
+            //players are unable to move while countdown is running
+            for (Engine* engine : ObjectList<Engine>()){
+                engine->setActive(false);
+                
+
+            }
+           //append spawn positions to bots
+           int a,b,c;
+            a=0;
+            b=1;
+            c=2;
+              for (SpaceRaceBot* bot : ObjectList<SpaceRaceBot>()){
+                bot->getControllableEntity()->setPosition(startpos[a],startpos[b],startpos[c]);
+               a= a+3;
+               b = b+3; 
+               c+= 3;
+            }
+
+
+        }
+
+                                                
+
+        std::string message("Use headphones to hear the countdown!");
+        this->getGametypeInfo()->sendAnnounceMessage(message);
+        ChatManager::message(message);
+
+//after 11 seconds , countdownFinished function is called to activate bots` engines
+Timer* countdownTimer = new Timer();
+        countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));
+    }
+
+
+
 
     void SpaceRace::end()
@@ -63,9 +174,9 @@
         {
             message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
-                        + "You didn't reach the check point  before the time limit. You lose!";
+                        + "You lose!";
         }
         else
         {
-            message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
+            message = "You win!! Final check point reached after "+ multi_cast<std::string>(s)
                         + "." + multi_cast<std::string>(ms) + " seconds.";
         }
@@ -78,31 +189,9 @@
     }
 
-    void SpaceRace::tick(float dt)
+
+void SpaceRace::tick(float dt)
     {
         SUPER(SpaceRace,tick,dt);
-
-        // spawn the players already when the countdown starts, but deactivate their engines
-        if (this->isStartCountdownRunning() && !this->cantMove_)
-        {
-            this->spawnPlayersIfRequested();
-            this->cantMove_ = true;
-
-            for (Engine* engine : ObjectList<Engine>())
-                engine->setActive(false);
-        }
-
-        // activate the engines again if the countdown ends
-        if (!this->isStartCountdownRunning() && this->cantMove_)
-        {
-            for (Engine* engine : ObjectList<Engine>())
-                engine->setActive(true);
-
-            this->cantMove_= false;
-
-            std::string message = "The match has started! Reach the check points as quickly as possible!";
-            this->getGametypeInfo()->sendAnnounceMessage(message);
-            ChatManager::message(message);
-        }
-    }
+}
 
     void SpaceRace::newCheckpointReached(RaceCheckPoint* checkpoint, PlayerInfo* player)
@@ -114,23 +203,60 @@
         int ms = this->clock_.getMilliseconds() % 1000;
 
-        const std::string& message = "Checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
-            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
+       
+    
+        const std::string& message = player->getName() + " reached the checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1) 
+        + "after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
+ this->getGametypeInfo()->sendAnnounceMessage(message);
+        ChatManager::message(message);
+
+    }
+
+ void SpaceRace::countdownFinished()//activates the engines of all players 
+    {
+
+        std::string message("RACE STARTED ");
         this->getGametypeInfo()->sendAnnounceMessage(message);
         ChatManager::message(message);
-    }
-
+
+
+    for (Engine* engine : ObjectList<Engine>())
+                engine->setActive(true);
+
+
+    
+}
+
+ void SpaceRace::playerEntered(PlayerInfo* player)
+    {
+        Gametype::playerEntered(player);
+
+        const std::string& message = player->getName() + " entered the game";
+        ChatManager::message(message);
+    }
+
+
+ void SpaceRace::addBots(unsigned int amount) //function that add the bots to the game 
+    {
+        for (unsigned int i = 1; i <= amount; ++i){
+            this->botclass_.fabricate(this->getContext());
+        }
+    }
+
+
+//set bot configurations
     bool SpaceRace::allowPawnHit(Pawn* victim, Pawn* originator)
     {
+        return true;
+    }
+
+    bool SpaceRace::allowPawnDamage(Pawn* victim, Pawn* originator)
+    {
+        return true;
+    }
+
+    bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)// false because the bots can not recognize the objects and die to early 
+                                                                    //if they can 
+    {
         return false;
     }
-
-    bool SpaceRace::allowPawnDamage(Pawn* victim, Pawn* originator)
-    {
-        return false;
-    }
-
-    bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)
-    {
-        return false;
-    }
 }
Index: code/branches/HUD_HS16/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/SpaceRace.h	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/gametypes/SpaceRace.h	(revision 11502)
@@ -57,9 +57,22 @@
             virtual ~SpaceRace() {}
 
+             void setConfigValues();
+
             virtual void tick(float dt) override;
+            virtual void start() override;
+            virtual void end() override;
+ virtual void countdownFinished();
+             virtual void addBots(unsigned int amount) override; //<! overwrite function in order to bypass the addbots command.
 
-            virtual void end() override;
+
+
+             virtual void playerEntered(PlayerInfo* player) override;
+
+            //virtual void newCheckpointReached();
 
             void newCheckpointReached(RaceCheckPoint* checkpoint, PlayerInfo* player);
+            
+
+
             inline RaceCheckPoint* getCheckpointReached(PlayerInfo* player)
                 { return this->checkpointReached_[player]; }
Index: code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceBot.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceBot.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceBot.cc	(revision 11502)
@@ -23,7 +23,16 @@
  *      Author: purgham
  */
+#include <vector>
 
 #include "SpaceRaceBot.h"
+#include "core/GameMode.h"
 #include "core/CoreIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "gametypes/Gametype.h"
+#include "controllers/AIController.h"
+#include "gametypes/SpaceRaceController.h"
+
+
+
 
 namespace orxonox
@@ -35,4 +44,23 @@
         this->defaultController_ = Class(SpaceRaceController);// ClassByString("")
         this->createController();
+
+    }
+
+SpaceRaceBot::~SpaceRaceBot(){
+
+}
+
+void SpaceRaceBot::setConfigValues()
+    {
+        static const std::string names[] =
+        {
+            "Dr. Julius No",
+            "Berkay Berabi",
+            "Louis Meile"         
+            "Yo mama"
+        };
+        static std::vector<std::string> defaultnames(names, names + sizeof(names) / sizeof(std::string));
+
+        SetConfigValue(names_, defaultnames);
     }
 }
Index: code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceBot.h
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceBot.h	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceBot.h	(revision 11502)
@@ -30,4 +30,5 @@
 #include "gametypes/GametypesPrereqs.h"
 #include "gametypes/SpaceRaceController.h"
+#include <vector>
 
 
@@ -35,12 +36,26 @@
 {
 
-    /**
-
-    */
     class _GametypesExport SpaceRaceBot: public Bot
     {
         public:
-        SpaceRaceBot(Context* context);
-            virtual ~SpaceRaceBot() {}
+        	SpaceRaceBot(Context* context);
+            virtual ~SpaceRaceBot();
+    
+            void setConfigValues();
+
+
+
+ virtual inline bool isInitialized() const override
+                { return true; }
+            virtual inline float getPing() const override
+                { return 0; }
+            virtual inline float getPacketLossRatio() const override
+                { return 0; }
+
+
+  private:
+            std::vector<std::string> names_;
+
+
     };
 }
Index: code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceController.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceController.cc	(revision 11502)
@@ -16,5 +16,5 @@
  *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU General Public License
+ *   You should have     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.
@@ -58,59 +58,4 @@
         OrxAssert(!checkpoints.empty(), "No Checkpoints in Level");
         checkpoints_ = checkpoints;
-        /*orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;
-        for(std::vector<RaceCheckPoint*>::iterator it=checkpoints_.begin(); it!=checkpoints_.end(); it++)
-        {
-            orxout()<<"Checkpoint "<<(*it)->getCheckpointIndex()<<"; NExtReal: ";
-            std::set<int> temp =(*it)->getNextCheckpoints();
-            for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++)
-            {
-                orxout()<<(*ii)<<", ";
-            }
-
-            orxout()<<" NextVirtual: ";
-            temp=(*it)->getVirtualNextCheckpoints();
-            for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++)
-            {
-                orxout()<<(*ii)<<", ";
-            }
-            orxout()<<endl<<endl;
-
-        }//ausgabe*/
-        /*
-        for (std::vector<RaceCheckPoint*>::iterator it = checkpoints.begin(); it != checkpoints.end(); ++it)
-        {
-            std::set<int> nextCheckPoints = ((*it)->getNextCheckpoints());
-            if(!nextCheckPoints.empty())
-            {
-                for (std::set<int>::iterator numb = nextCheckPoints.begin(); numb!=nextCheckPoints.end(); numb++)
-                {
-                    RaceCheckPoint* point2 = findCheckpoint((*numb));
-
-                    //if(point2 != nullptr)
-                    //placeVirtualCheckpoints((*it), point2);
-                }
-            }
-        }
-        */
-        /*
-        for(std::vector<RaceCheckPoint*>::iterator it=checkpoints_.begin(); it!=checkpoints_.end(); it++)
-        {
-            orxout()<<"Checkpoint "<<(*it)->getCheckpointIndex()<<"; NExtReal: ";
-            std::set<int> temp =(*it)->getNextCheckpoints();
-            for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++)
-            {
-                orxout()<<(*ii)<<", ";
-            }
-
-            orxout()<<" NextVirtual: ";
-            temp=(*it)->getVirtualNextCheckpoints();
-            for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++)
-            {
-                orxout()<<(*ii)<<", ";
-            }
-            orxout()<<endl;
-
-        }//ausgabe
-        orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;*/
         staticRacePoints_ = findStaticCheckpoints(nextRaceCheckpoint_, checkpoints);
         // initialisation of currentRaceCheckpoint_
@@ -122,5 +67,4 @@
             continue;
         }
-        //orxout()<<"Die ANzahl der virtuellen CP betraegt: "<< (-i)-2<<endl;
 
     }
@@ -225,4 +169,5 @@
                 minNextRaceCheckPoint = nextRaceCheckPoint;
             }
+
         }
 
@@ -363,4 +308,5 @@
             //orxout()<< "CP "<< currentRaceCheckpoint_->getCheckpointIndex()<<" chanched to: "<< nextRaceCheckpoint_->getCheckpointIndex()<<endl;
         }
+
         else if ((lastPositionSpaceship-this->getControllableEntity()->getPosition()).length()/dt > ADJUSTDISTANCE)
         {
@@ -380,5 +326,8 @@
         //orxout(user_status) << "dt= " << dt << ";  distance= " << (lastPositionSpaceship-this->getControllableEntity()->getPosition()).length() <<std::endl;
         lastPositionSpaceship = this->getControllableEntity()->getPosition();
+       
+this->boostControl();
         this->moveToPosition(nextRaceCheckpoint_->getPosition());
+        this->boostControl();
     }
 
Index: code/branches/HUD_HS16/src/modules/invader/Invader.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/invader/Invader.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/invader/Invader.cc	(revision 11502)
@@ -33,5 +33,5 @@
 
 #include "Invader.h"
-
+#include "Highscore.h"
 #include "core/CoreIncludes.h"
 #include "core/EventIncludes.h"
@@ -189,4 +189,10 @@
         // It will misteriously crash the game!
         // Instead startMainMenu, this won't crash.
+        if (Highscore::exists()){
+                    int score = this->getPoints();
+                    if(score > Highscore::getInstance().getHighestScoreOfGame("Orxonox Arcade")) 
+                        Highscore::getInstance().storeHighscore("Orxonox Arcade",score);
+
+          }
         GSLevel::startMainMenu();
     }
Index: code/branches/HUD_HS16/src/modules/jump/Jump.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/jump/Jump.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/jump/Jump.cc	(revision 11502)
@@ -34,4 +34,5 @@
 #include "Jump.h"
 #include "core/CoreIncludes.h"
+#include "Highscore.h"
 
 #include "JumpCenterpoint.h"
@@ -311,5 +312,10 @@
         cleanup();
         GSLevel::startMainMenu();
-
+        if (Highscore::exists()){
+                    int score = this->getScore(this->getPlayer());
+                    if(score > Highscore::getInstance().getHighestScoreOfGame("Jump")) 
+                        Highscore::getInstance().storeHighscore("Jump",score);
+
+          }
         Deathmatch::end();
     }
Index: code/branches/HUD_HS16/src/modules/superorxobros/CMakeLists.txt
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/CMakeLists.txt	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/CMakeLists.txt	(revision 11502)
@@ -0,0 +1,24 @@
+SET_SOURCE_FILES(SOB_SRC_FILES
+
+  SOBCenterpoint.cc
+  SOB.cc
+  SOBFigure.cc
+  SOBItem.cc
+  SOBQBlock.cc
+  SOBMushroom.cc
+  SOBHUDInfo.cc
+  SOBGumba.cc
+  SOBFlagstone.cc
+  SOBCastlestone.cc
+  SOBCoin.cc
+
+)
+
+ORXONOX_ADD_LIBRARY(superorxobros
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${SOB_SRC_FILES}
+)
Index: code/branches/HUD_HS16/src/modules/superorxobros/Orxo.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/Orxo.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/Orxo.cc	(revision 11502)
@@ -0,0 +1,196 @@
+/*
+ *   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
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file InvaderShip.cc
+    @brief Implementation of the InvaderShip class.
+*/
+
+#include "Orxo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+//#include "Invader.h"
+//#include "InvaderEnemy.h"
+#include "graphics/Camera.h"
+//#include "weapons/projectiles/Projectile.h"
+
+namespace orxonox
+{
+    RegisterClass(Orxo);
+
+    Orxo::Orxo(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(Orxo);
+
+        speed = 500;
+        damping = 10;
+    }
+
+    void Orxo::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;
+                    }
+            }
+            if (pos.z + dist_x > 42*2.5 || pos.z + dist_x < -42*3)
+                velocity.x = 0;
+            pos += Vector3(1000 + velocity.y, 0, velocity.x) * dt;
+        }
+
+    
+        // Camera
+        Camera* camera = this->getCamera();
+        if (camera != nullptr)
+        {
+            camera->setPosition(Vector3(-pos.z, -posforeward, 0));
+            camera->setOrientation(Vector3::UNIT_Z, Degree(90));
+        }
+
+
+
+        // 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(Orxo, tick, dt);
+    }
+
+    void Orxo::updateLevel()
+    {
+        lastTime = 0;
+        /*if (getGame())
+            getGame()->levelUp();*/
+    }
+
+    void Orxo::moveFrontBack(const Vector2& value)
+    {
+        Pawn::moveFrontBack(value);
+        lastTimeLeft = 0;
+        desiredVelocity.x = -value.x * speed;
+    }
+
+    void Orxo::moveRightLeft(const Vector2& value)
+    {
+        lastTimeFront = 0;
+        desiredVelocity.y = value.y * speed * 42;
+    }
+    void Orxo::boost(bool bBoost)
+    {
+       // isFireing = bBoost;
+    }
+    void Orxo::rotateRoll(const Vector2& value)
+    {/*
+        if (getGame())
+            if (getGame()->bEndGame)
+                getGame()->end();
+    */}
+    inline bool Orxo::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        /*// orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
+        InvaderEnemy* enemy = orxonox_cast<InvaderEnemy*>(otherObject);
+        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
+        // ensure that this gets only called once per enemy.
+        if (enemy != nullptr && lastEnemy != enemy)
+        {
+            lastEnemy = enemy;
+
+            removeHealth(20);
+            if (getGame())
+            {
+                getGame()->multiplier = 1;                   
+            }
+        }
+        // was shot, decrease multiplier
+        else if (shot != nullptr  && lastShot != shot)
+        {
+            if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != nullptr)
+            {
+                if (getGame()->multiplier > 1)
+                {
+                    lastShot = shot;
+                    getGame()->multiplier -= 1;     
+                }
+            }
+        }
+        return false;
+        // SUPER(InvaderShip, collidesAgainst, otherObject, contactPoint);
+        */
+        return false;
+    }
+
+    /*SOB* Orxo::getGame()
+    {
+        if (game == nullptr)
+        {
+            for (SOB* sob : ObjectList<SOB>())
+                game = sob;
+        }
+        return game;
+    }*/
+
+    void Orxo::death()
+    {
+        //getGame()->costLife();
+        Pawn::death();
+    }
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/Orxo.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/Orxo.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/Orxo.h	(revision 11502)
@@ -0,0 +1,95 @@
+/*
+ *   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
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file InvaderShip.h
+    @brief Declaration of the InvaderShip class.
+*/
+
+#ifndef _Orxo_H__
+#define _Orxo_H__
+
+//#include "invader/InvaderPrereqs.h"
+
+//#include "weapons/WeaponsPrereqs.h"
+#include "worldentities/pawns/SpaceShip.h"
+
+namespace orxonox
+{
+    class Orxo : public SpaceShip
+    {
+    public:
+        Orxo(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;
+
+        virtual void updateLevel();
+
+        virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+
+
+
+
+      
+
+
+    protected:
+        virtual void death() override;
+    private:
+            //SOB* getGame();
+            //WeakPtr<SOB> game;
+        Camera* camera;
+        float speed, damping, posforeward;
+        float lastTimeFront, lastTimeLeft, lastTime;
+        struct Velocity
+        {
+            float x;
+            float y;
+        } velocity, desiredVelocity;
+
+           // WeakPtr<InvaderEnemy> lastEnemy;
+            //WeakPtr<Projectile> lastShot;
+
+    };
+}
+
+#endif /* _InvaderShip_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOB.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOB.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOB.cc	(revision 11502)
@@ -0,0 +1,187 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOB.cc
+    @brief Implementation of the SOB class.
+*/
+
+#include "SOB.h"
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/Game.h"
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+#include "infos/PlayerInfo.h"
+#include "SOBCenterpoint.h"
+#include "SOBFigure.h"
+#include "graphics/Camera.h"
+
+
+
+namespace orxonox
+{
+
+    RegisterUnloadableClass(SOB);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    SOB::SOB(Context* context) : Deathmatch(context)
+    {
+        RegisterObject(SOB);
+        camera = nullptr;
+
+        this->center_ = nullptr;
+        figure_ = nullptr;
+        setHUDTemplate("SOBHUD");
+        coins_=0;
+        points_=0;
+        timeLeft_=400.0;
+        done_ = true;
+        lvl_ = 1;
+
+    }
+
+    /**
+    @brief
+        Destructor. Cleans up, if initialized.
+    */
+    SOB::~SOB()
+    {
+        if (this->isInitialized())
+            this->cleanup();
+    }
+
+    void SOB::cleanup()
+    {
+        camera = nullptr;
+    }
+
+
+
+    void SOB::start()
+    {
+        if (center_ != nullptr) // There needs to be a SOBCenterpoint, i.e. the area the game takes place.
+        {
+            if (figure_ == nullptr)
+            {
+                figure_ = new SOBFigure(center_->getContext());     //add a new instance of a player to the game
+                figure_->addTemplate(center_->getFigureTemplate());
+            }
+
+            center_->attach(figure_);
+            figure_->setPosition(0, 0, 0);
+        }
+        else // If no centerpoint was specified, an error is thrown and the level is exited.
+        {
+            orxout(internal_error) << "SOB: No Centerpoint specified." << endl;
+            GSLevel::startMainMenu();
+            return;
+        }
+
+        // Call start for the parent class.
+        Gametype::start();
+
+        if (figure_ != nullptr)
+        {
+            camera = figure_->getCamera();
+        }
+
+    }
+
+    void SOB::end()
+    {
+        cleanup();
+        GSLevel::startMainMenu();
+        Deathmatch::end();
+    }
+
+    void SOB::restart() {
+        cleanup();
+
+        // HACK - only method I found to simply reload the level
+        Game::getInstance().popState();
+        Game::getInstance().popState();
+        Game::getInstance().requestStates("standalone, level");
+
+        
+    }
+    void SOB::spawnPlayer(PlayerInfo* player)
+    {
+        assert(player);
+
+        if (figure_->getPlayer() == nullptr)
+        {
+            player->startControl(figure_); //Give the control of the instance player to the real person
+            players_[player].state_ = PlayerState::Alive;
+            done_ = false;
+        }
+    }
+
+    PlayerInfo* SOB::getPlayer() const
+    {
+        if (this->figure_ != nullptr)
+        {
+            return this->figure_->getPlayer();
+        }
+        else
+        {
+            return nullptr;
+        }
+    }
+
+    void SOB::tick(float dt)
+    {
+        SUPER(SOB, tick, dt);
+
+        //If player has reached end of level
+        if (this->figure_ != nullptr && figure_->lvlEnded_) {
+            std::stringstream a;
+            a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
+            info_ =a.str();
+
+        //If player has died
+        } else if (this->figure_ != nullptr && figure_->dead_) {
+            info_ = "Game over. Press <Space> to restart";
+        }
+        
+
+        //Kill the player if time is up
+        if (this->figure_ != nullptr && timeLeft_ <= 0)
+            this->figure_->dead_ = true;
+        //The time on the HUD
+        if (!done_)
+            timeLeft_-=dt*2.5;
+    }
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOB.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOB.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOB.h	(revision 11502)
@@ -0,0 +1,123 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOB.h
+    @brief Declaration of the SOB class.
+*/
+
+#ifndef _SOB_H__
+#define _SOB_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "gametypes/Deathmatch.h"
+#include "SOBCenterpoint.h"
+
+namespace orxonox
+{
+
+    class _SOBExport SOB : public Deathmatch
+    {
+    public:
+            SOB(Context* context); //!< Constructor. Registers and initializes the object.
+            virtual ~SOB(); //!< Destructor. Cleans up, if initialized.
+            virtual void tick(float dt) override;
+
+
+            void setCenterpoint(SOBCenterpoint* center)
+            { this->center_ = center; }
+            virtual void start() override;
+            virtual void end() override;
+            virtual void spawnPlayer(PlayerInfo* player) override;
+            PlayerInfo* getPlayer() const;
+
+            void restart();
+
+            //Functions for points and coins
+            int getPoints() {
+                return points_;
+            }
+            int getCoins() {
+                return coins_;
+            }
+            void addCoin() {
+                ++coins_;
+                points_+=200;
+            }
+            void addMushroom() {
+                points_+=1000;
+            }
+            void addGumba() {
+                points_+=100;
+            }
+            void addPoints(int poi) {
+                points_+=poi;
+            }
+            int getTimeLeft() {
+                return timeLeft_;
+            }
+            std::string getInfoText() {
+                return info_;
+            }    
+            void setDone(bool tr) {
+                done_ = tr;
+            }
+
+
+            //Not used yet - placed if somebody wants to develop lvl 1-2 etc
+            void setLvl(int lvl) {
+                lvl_ = lvl;
+            }
+            int getLvl() {
+                return lvl_;
+            }
+            virtual void playerEntered(PlayerInfo* player) override
+            {
+                Gametype::playerEntered(player);
+            }  
+
+            WeakPtr<SOBCenterpoint> center_;
+
+        protected:
+
+
+            void cleanup(); //!< Cleans up the Gametype 
+            WeakPtr<SOBFigure> figure_;
+            WeakPtr<Camera> camera;
+            int points_;
+            int coins_;
+            float timeLeft_;
+            bool done_;
+            int lvl_;
+            std::string info_;
+
+
+        };
+    }
+
+#endif /* _SOB_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBCastlestone.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBCastlestone.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBCastlestone.cc	(revision 11502)
@@ -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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBCastlestone.cc
+    @brief Mainly used to guide the player into the castle after he has touched the flag and the control goes to the game
+*/
+
+#include "SOBCastlestone.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+
+
+namespace orxonox
+{
+    RegisterClass(SOBCastlestone);
+
+    SOBCastlestone::SOBCastlestone(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(SOBCastlestone);
+        setAngularFactor(0.0);
+        this->enableCollisionCallback();
+        hasCollided_=false;
+    
+    }
+
+    bool SOBCastlestone::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+        return true;
+    }
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBCastlestone.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBCastlestone.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBCastlestone.h	(revision 11502)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBCastlestone.h
+    @brief Declaration of the SOBCastlestone class.
+*/
+
+#ifndef _SOBCastlestone_H__
+#define _SOBCastlestone_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/StaticEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBCastlestone : public StaticEntity
+    {
+    public:
+        SOBCastlestone(Context* context);
+        virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+        bool hasCollided_;
+        
+    };
+}
+
+#endif /* _SOBCastlestone_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBCenterpoint.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBCenterpoint.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBCenterpoint.cc	(revision 11502)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBCenterpoint.cc
+    @brief The SOBCenterpoint is a StaticEntity which represents the level of the minigame. 
+*/
+
+#include "SOBCenterpoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOB.h"
+
+namespace orxonox
+{
+    RegisterClass(SOBCenterpoint);
+
+    SOBCenterpoint::SOBCenterpoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(SOBCenterpoint);
+        checkGametype();
+    }
+
+    void SOBCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBCenterpoint, XMLPort, xmlelement, mode);
+
+      
+        
+        XMLPortParam(SOBCenterpoint, "cameraOffset", setCameraOffset, getCameraOffset, xmlelement, mode);
+        
+        XMLPortParam(SOBCenterpoint, "figureTemplate", setFigureTemplate, getFigureTemplate, xmlelement, mode);
+        
+    }
+
+    void SOBCenterpoint::checkGametype()
+    {
+        if (getGametype() != nullptr && this->getGametype()->isA(Class(SOB)))
+        {
+            SOB* SOBGametype = orxonox_cast<SOB*>(this->getGametype());
+            SOBGametype->setCenterpoint(this);
+        }
+    }
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBCenterpoint.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBCenterpoint.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBCenterpoint.h	(revision 11502)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+#ifndef _SOBCenterpoint_H__
+#define _SOBCenterpoint_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    
+    /**
+    @brief
+        @brief The SOBCenterpoint is a StaticEntity which represents the level of the minigame. Everybody used it so I used it too, do not ask my why..
+    */
+    class _SOBExport SOBCenterpoint : public StaticEntity
+    {
+        public:
+            SOBCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually SOB.
+            virtual ~SOBCenterpoint() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a SOBCenterpoint through XML.
+            
+            void setFigureTemplate(const std::string& newTemplate)
+                { this->figureTemplate_ = newTemplate;
+                }
+            const std::string& getFigureTemplate() const
+                { return this->figureTemplate_; }
+            
+
+            void setCameraOffset(const float cameraOffset)
+                { this->cameraOffset_ = cameraOffset; }
+            float getCameraOffset() const
+                { return cameraOffset_; }
+
+
+        private:
+            void checkGametype();
+           
+            std::string figureTemplate_;
+    
+       
+            float cameraOffset_;
+    };
+}
+
+#endif /* _SOBCenterpoint_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBCoin.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBCoin.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBCoin.cc	(revision 11502)
@@ -0,0 +1,83 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBCoin.cc
+    @brief This is the object that appears when player hits a QBlock with type coin - it should be a coin floating ontop of the QBlock
+*/
+
+#include "SOBCoin.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+
+
+namespace orxonox
+{
+    RegisterClass(SOBCoin);
+
+    SOBCoin::SOBCoin(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(SOBCoin);
+        setAngularFactor(0.0);
+
+    }
+
+    
+    void SOBCoin::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBCoin, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBCoin, "lifetime", setLifetime, getLifetime, xmlelement, mode);
+        XMLPortParam(SOBCoin, "speed", setSpeed, getSpeed, xmlelement, mode);
+
+    }
+
+
+    void SOBCoin::tick(float dt)
+    {
+        SUPER(SOBCoin, tick, dt);
+
+        lifetime_-=dt;
+
+        if (lifetime_ <+ 0) {
+            destroyLater();
+        }
+
+        Vector3 velocity = getVelocity();
+        velocity.z = speed_;
+        setOrientation(Vector3::UNIT_Z, getOrientation().getRoll() + 2*dt*Radian(6));
+        setVelocity(velocity);
+
+
+
+    }
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBCoin.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBCoin.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBCoin.h	(revision 11502)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBCoin.h
+    @brief Declaration of the SOBCoin class.
+    @ingroup SOB
+*/
+
+#ifndef _SOBCoin_H__
+#define _SOBCoin_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBCoin : public MovableEntity
+    {
+    public:
+        SOBCoin(Context* context);
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+        virtual void tick(float dt) override;
+
+
+        bool attachedToFigure_;
+
+        void setLifetime(const float lt)
+        { this->lifetime_ = lt; }
+        float getLifetime() const
+        { return lifetime_; }
+        void setSpeed(const float lt)
+        { this->speed_ = lt; }
+        float getSpeed() const
+        { return speed_; }
+
+
+    protected:
+
+        float lifetime_;
+        float speed_;
+
+    };
+}
+
+#endif /* _SOBCoin_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBFigure.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBFigure.cc	(revision 11502)
@@ -0,0 +1,366 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBFigure.cc
+    @brief This class represents your figure when you play the minigame. Here the movement of the figure, activating items, ... are handled.
+*/
+
+#include "SOBFigure.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "graphics/Model.h"
+#include "graphics/Camera.h"
+#include "graphics/ParticleSpawner.h"
+
+#include "SOBMushroom.h"
+#include "SOBGumba.h"
+#include "SOB.h"
+#include "SOBFlagstone.h"
+#include "SOBCastlestone.h"
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+
+namespace orxonox
+{
+    RegisterClass(SOBFigure);
+
+    SOBFigure::SOBFigure(Context* context) : ControllableEntity(context)
+    {
+        RegisterObject(SOBFigure);
+
+        // initialize variables
+        gravityAcceleration_ = 350.0;
+
+        //Vars for movement of player
+        moveUpPressed_ = false;
+        moveDownPressed_ = false;
+        moveLeftPressed_ = false;
+        moveDownPressed_ = false;
+        firePressed_ = false;
+        collDisZ_ = 0;
+        //Times and turning
+        timeSinceLastFire_ = 0.0;
+        lastSpeed_z = 0.0;
+        pitch_ = 0.0;
+        timeCounter_ = 0;
+
+        //Properties of player
+        gotPowerUp_ = false;
+        isColliding_ = true;
+        particlespawner_ = NULL;
+
+        //Properties of players life
+        predead_ = false;
+        dead_ = false;
+        lvlEnded_ = false;
+        reachedLvlEndState_ = 0;
+
+        
+        setAngularFactor(0.0); //Means player doesn't turn on collision, so he doesn't fall over while walking over the ground
+        this->enableCollisionCallback(); // Turns on that on every collision function collidesAgainst is executed
+    }
+
+
+
+    bool SOBFigure::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+        //Inform tick fct that player is colliding and tell him how far away the collision point is from player middle point in z dir
+        isColliding_ = true;
+        collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
+
+
+        //Orxocast returns object with casted type if otherObject has that class, and if not a nullptr
+        SOBMushroom* mush = orxonox_cast<SOBMushroom*>(otherObject);
+        SOBGumba* gumba = orxonox_cast<SOBGumba*>(otherObject);
+        SOBFlagstone* flagstone = orxonox_cast<SOBFlagstone*>(otherObject);
+        SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*>(otherObject);
+
+        //Check if otherObject is a powerup
+        if (mush != nullptr && !(mush->hasCollided_)) {
+            otherObject->destroyLater();
+            gotPowerUp_ = true;
+            SOB* SOBGame = orxonox_cast<SOB*>(getGametype()); //Get the Gametype
+            SOBGame->addMushroom(); // Tell the gametype to increase points
+            mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
+
+        //Check if otherObject is a Gumba (that walking enemies)
+        } else if (gumba != nullptr && !(gumba->hasCollided_)) {
+
+            //If player jumps on its head, kill it, else, kill the player
+            if (getVelocity().z >= -20) {
+              Vector3 vel = getVelocity();
+              vel.y = -80;
+              vel.z = 200;
+              setVelocity(vel);
+              predead_=true; 
+              SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+              SOBGame->setDone(true);
+
+          } else {
+            gumba->destroyLater();
+            gumba->hasCollided_ = true;
+            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+            SOBGame->addGumba();
+
+
+        }
+    }
+
+    //Purpose is that if player hits the flag, he should walk into the castle at the end of the level. For that we use SOBCastlestone
+    if (reachedLvlEndState_ == 0 && flagstone != nullptr && !(flagstone->hasCollided_)) {
+        flagstone->hasCollided_ = true;
+        reachedLvlEndState_ = 1;
+        SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+        SOBGame->setDone(true);
+        SOBGame->addPoints(flagstone->getPoints());
+        
+
+    }
+    if (castlestone != nullptr && !(castlestone->hasCollided_)) {
+        castlestone->hasCollided_ = true;
+        reachedLvlEndState_++;
+
+    }
+
+    return true;
+}
+
+
+//Self implemented sign function that returns either 1 or -1 (and never 0)
+int SOBFigure::sgn(float x) {
+    if (x < 0.0) return -1;
+    return 1;
+}
+
+//For those of you who don't have an idea: the tick function is called about 50 times/sec
+void SOBFigure::tick(float dt)
+{
+    SUPER(SOBFigure, tick, dt);
+
+
+    bool inputAllowed = true;
+
+    //the particle spawner that generates the fire from the backpack when pressed
+    if (particlespawner_ == NULL) {
+        for (WorldEntity* object : this->getAttachedObjects())
+        {
+           if (object->isA(Class(ParticleSpawner)))
+            particlespawner_ = object;
+        }
+    }
+
+
+    //Behavior on level end - this is like described above for the movement from the player when hit the flag. He moves then into the castle
+    if (reachedLvlEndState_ != 0) {
+        timeCounter_+= dt;
+        inputAllowed = false;
+    }
+    if (reachedLvlEndState_ == 1 && timeCounter_ >= 1.5) {
+        timeCounter_ = 0;
+        reachedLvlEndState_ = 2;
+    }
+
+
+    //if input blocked, then cancel every movement operation
+    if (!inputAllowed) {
+        moveUpPressed_ = false;
+        moveDownPressed_ = false;
+        moveLeftPressed_ = false;
+        moveRightPressed_ = false;
+    }
+
+    //set the gravityto standard 350
+    if (firePressed_ == false) {
+        gravityAcceleration_ = 350.0;
+
+    }
+
+    if (hasLocalController())
+    {
+        Vector3 velocity = getVelocity();
+        Vector3 position = getPosition();
+
+        if (!predead_)
+            velocity.y = 0;
+        //If player falls in a hole
+        if (position.z < -100) {
+            dead_ = true;
+            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+            SOBGame->setDone(true);
+        }
+
+
+        if (dead_) {
+            velocity.x = 0;
+            velocity.z = 0;
+            setVelocity(velocity);
+            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+            if (firePressed_)
+                SOBGame->restart();
+            return;
+        }
+
+
+        int maxvelocity_x = 100;
+        int speedAddedPerTick = 5;
+        int camMaxOffset = 25;
+
+        timeSinceLastFire_ += dt;
+        lastSpeed_z = velocity.z;
+
+
+
+        //Handle the rocket fire from the jetpack
+        if (velocity.z > 40)
+            particlespawner_->setVisible(true); 
+        else
+            particlespawner_->setVisible(false); 
+
+
+        //If player hits space and collides against an object under him then jump
+        if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 7.75 && collDisZ_ <+ 8.25)) {
+            gravityAcceleration_ = 100.0;
+            velocity.z = 110; 
+        }
+
+
+        //Left-right movement with acceleration and rotation
+        float rot = getOrientation().getRoll().valueDegrees();
+        if (moveRightPressed_) {
+            if (!(rot < 5.0 && -5.0 < rot))
+                setOrientation(Vector3::UNIT_Z, getOrientation().getRoll() - sgn(rot)*dt*Radian(6));
+
+            if (std::abs(velocity.x) < maxvelocity_x) {
+                velocity.x += speedAddedPerTick;
+
+            }
+        } else if (moveLeftPressed_) {
+            if (!(abs(rot) > 175.0 ))
+                setOrientation(Vector3::UNIT_Z, getOrientation().getRoll() + sgn(rot)*dt*Radian(6));
+
+
+
+            if (std::abs(velocity.x) < maxvelocity_x) {
+                velocity.x -= speedAddedPerTick;
+            }
+        } else {
+            velocity.x /= 1.1;
+        }
+
+
+        //Again another EndOfLevel behavior
+        if (reachedLvlEndState_ == 1)
+            velocity.x = -2;
+        if (reachedLvlEndState_ == 2)
+            velocity.x = 30;
+        if (reachedLvlEndState_ == 3) {
+            velocity.x = 0;
+            velocity.y = 20;
+        }
+        if (reachedLvlEndState_ == 4) {
+            lvlEnded_ = true;
+            dead_ = true;
+        }
+
+        //velocity = acc. * time
+        velocity.z -= gravityAcceleration_*dt;
+        setVelocity(velocity);
+
+
+        //Camera operation - the camera should always follow the player in a specific region
+        Camera* cam = getCamera();
+        Vector3 campos = cam->getPosition();
+
+        if (campos.x + camMaxOffset < position.x) {
+            campos.x = position.x - camMaxOffset;
+            cam->setPosition(campos);
+        }
+        if (campos.x - camMaxOffset > position.x) {
+            campos.x = position.x + camMaxOffset;
+            cam->setPosition(campos);
+        }
+
+
+
+
+    }
+
+
+
+    // Reset key variables
+    moveUpPressed_ = false;
+    moveDownPressed_ = false;
+    moveLeftPressed_ = false;
+    moveRightPressed_ = false;
+
+    isColliding_ = false;
+    collDisZ_ = 0;
+
+}
+
+
+
+
+
+//The following functions read the input of the player and then set the bools for the movement
+void SOBFigure::moveFrontBack(const Vector2& value)
+{
+    if (value.x > 0)
+    {
+        moveUpPressed_ = true;
+        moveDownPressed_ = false;
+    }
+    else
+    {
+        moveUpPressed_ = false;
+        moveDownPressed_ = true;
+    }
+}
+
+void SOBFigure::moveRightLeft(const Vector2& value)
+{
+    if (value.x > 0)
+    {
+        moveLeftPressed_ = false;
+        moveRightPressed_ = true;
+    }
+    else
+    {
+        moveLeftPressed_ = true;
+        moveRightPressed_ = false;
+    }
+}
+
+void SOBFigure::boost(bool boost)
+{
+    firePressed_ = boost;
+}
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBFigure.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBFigure.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBFigure.h	(revision 11502)
@@ -0,0 +1,80 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+#ifndef _SOBFigure_H__
+#define _SOBFigure_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/ControllableEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBFigure : public ControllableEntity
+    {
+    public:
+            SOBFigure(Context* context); //!< Constructor. Registers and initializes the object.
+            virtual ~SOBFigure() {}
+            virtual void tick(float dt) override;
+            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down.
+            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down.
+            virtual void boost(bool boost) override;
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+
+            bool dead_;
+            bool predead_;
+            bool lvlEnded_;
+
+        private:
+
+            //Soooo many declarations
+            bool gotPowerUp_;
+            bool moveUpPressed_;
+            bool moveDownPressed_;
+            bool moveLeftPressed_;
+            bool moveRightPressed_;
+            bool firePressed_;
+            float gravityAcceleration_;
+            float timeSinceLastFire_;
+            float lastSpeed_z;
+            SOBCenterpoint* sobcenterpoint;
+            float pitch_;
+            bool isColliding_;
+            WorldEntity* particlespawner_;
+            int sgn(float x);
+            int reachedLvlEndState_;
+            float timeCounter_;
+            float collDisZ_;
+
+
+            
+
+        };
+    }
+
+#endif /* _SOBFigure_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBFlagstone.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBFlagstone.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBFlagstone.cc	(revision 11502)
@@ -0,0 +1,79 @@
+/*
+ *   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:
+ *      Julien
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBFlagstone.cc
+    @brief The flagstone, as described in the h file
+*/
+
+#include "SOBFlagstone.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+
+
+namespace orxonox
+{
+    RegisterClass(SOBFlagstone);
+
+    SOBFlagstone::SOBFlagstone(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(SOBFlagstone);
+
+        setAngularFactor(0.0);
+        this->enableCollisionCallback();
+        
+        hasCollided_=false;
+        
+        
+    }
+
+    
+
+    void SOBFlagstone::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBFlagstone, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBFlagstone, "points", setPoints, getPoints, xmlelement, mode);
+
+
+    }
+
+    
+    bool SOBFlagstone::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+        return true;
+    }
+
+
+    
+
+
+    
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBFlagstone.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBFlagstone.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBFlagstone.h	(revision 11502)
@@ -0,0 +1,65 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBFlagstone.h
+    @brief Declaration of the SOBFlagstone class. This class is used for the flag - for everz 10x10x10 stone we added a flagstone with different points. The higher you touch the flag, the more points you get.
+    @ingroup SOB
+*/
+
+#ifndef _SOBFlagstone_H__
+#define _SOBFlagstone_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/StaticEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBFlagstone : public StaticEntity
+    {
+        public:
+            SOBFlagstone(Context* context);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+
+            void setPoints(int points) {
+                points_ = points;
+            }
+            int getPoints() {
+                return points_;
+            }
+
+      
+            bool hasCollided_;
+        protected:
+            int points_;
+    };
+}
+
+#endif /* _SOBFlagstone_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBGumba.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBGumba.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBGumba.cc	(revision 11502)
@@ -0,0 +1,123 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBGumba.cc
+    @brief All items in this minigame inherit from this class. Items can move around like platforms and enemies.
+*/
+
+#include "SOBGumba.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+
+
+namespace orxonox
+{
+    RegisterClass(SOBGumba);
+
+    SOBGumba::SOBGumba(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(SOBGumba);
+
+        attachedToFigure_ = false;
+        setAngularFactor(0.0);
+        figure_ = nullptr;
+        this->enableCollisionCallback();
+        gravityAcceleration_ = 350.0;
+        speed_ = 0.0;
+        hasCollided_=false;
+        goesRight_ = true;
+        lastPos_ = getPosition();
+        lastPos_.x -= 20;
+        changeAllowed_ = true;
+        changedOn_ = 0.0;
+        
+    }
+
+    
+
+    void SOBGumba::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBGumba, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBGumba, "speed", setSpeed, getSpeed, xmlelement, mode);
+
+
+    }
+
+    
+    bool SOBGumba::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+        //Every object with mass -1 does not change the direction of the Gumba. For example the ground floor! The other objects switch the direction of the gumba.
+        if (changeAllowed_ && otherObject->getMass() != -1) {
+            goesRight_ = !goesRight_;
+            changeAllowed_ = false;
+        }
+
+        return true;
+    }
+
+
+    void SOBGumba::setFigure(SOBFigure* newFigure)
+    {
+        figure_ = newFigure;
+    }
+
+
+
+    void SOBGumba::tick(float dt)
+    {
+        SUPER(SOBGumba, tick, dt);
+
+        if (!changeAllowed_) {
+            changedOn_+= dt;
+            // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
+            if (changedOn_> 0.200) {
+                changeAllowed_ = true;
+                changedOn_ = 0.0;
+
+            }
+        }
+        
+
+        int dir = 1;
+        if (!goesRight_)
+            dir = -1;
+
+        Vector3 velocity = getVelocity();
+        velocity.z -= gravityAcceleration_*dt;
+        velocity.x = dir*speed_;
+        setVelocity(velocity);
+
+        lastPos_ = getPosition();
+    }
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBGumba.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBGumba.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBGumba.h	(revision 11502)
@@ -0,0 +1,74 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBGumba.h
+    @brief Declaration of the SOBGumba class. Gumbas are the enemie mushrooms - pretty sure it's written Goomba but, naaah
+    @ingroup SOB
+*/
+
+#ifndef _SOBGumba_H__
+#define _SOBGumba_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBGumba : public MovableEntity
+    {
+        public:
+            SOBGumba(Context* context);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void setFigure(SOBFigure* newFigure);
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void tick(float dt) override;
+
+          
+            bool attachedToFigure_;
+
+            void setSpeed(const float speed)
+                { this->speed_ = speed; }
+            float getSpeed() const
+                { return speed_; }
+
+            bool hasCollided_;
+        protected:
+            float gravityAcceleration_;
+            float speed_;
+            WeakPtr<SOBFigure> figure_;
+            bool goesRight_;
+            Vector3 lastPos_;
+            bool changeAllowed_;
+            float changedOn_;
+           
+    };
+}
+
+#endif /* _SOBGumba_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBHUDInfo.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBHUDInfo.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBHUDInfo.cc	(revision 11502)
@@ -0,0 +1,113 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *
+ */
+
+#include "SOBHUDInfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "SOB.h"
+#include <sstream>
+#include <iomanip>
+
+
+
+namespace orxonox
+{
+    RegisterClass(SOBHUDInfo);
+
+    SOBHUDInfo::SOBHUDInfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(SOBHUDInfo);
+
+        this->SOBGame = nullptr;
+        
+    }
+
+    void SOBHUDInfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBHUDInfo, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBHUDInfo, "type",     setType,     getType,     xmlelement, mode).defaultValues(false);
+
+
+    }
+
+    void SOBHUDInfo::tick(float dt)
+    {
+        SUPER(SOBHUDInfo, tick, dt);
+
+        //If you have a look at the HUD xml file, you can see there are several elements with different types.
+        if (this->SOBGame)
+        {
+          
+          if (this->type_ == "Coins") {            
+            
+            std::stringstream ss;
+            ss << "cc x " << std::setw(2) << std::setfill('0') << SOBGame->getCoins();
+            std::string s = ss.str();
+
+            this->setCaption(s);
+            
+        }
+        if (this->type_ == "Points") {
+            std::stringstream ss;
+            ss << std::setw(6) << std::setfill('0') << SOBGame->getPoints();
+            std::string s = ss.str();
+            this->setCaption(s);
+        }
+        if (this->type_ == "Time") {
+            std::stringstream ss;
+            ss << SOBGame->getTimeLeft();
+            std::string s = ss.str();
+            this->setCaption(s);
+        }
+        if (this->type_ == "Info") {
+            std::stringstream ss;
+            ss << SOBGame->getInfoText();
+            std::string s = ss.str();
+            this->setCaption(s);
+        }
+        
+
+        
+    }
+}
+
+//No idea why, just implement this method
+void SOBHUDInfo::changedOwner()
+{
+    SUPER(SOBHUDInfo, changedOwner);
+
+    if (this->getOwner() && this->getOwner()->getGametype())
+    {
+        this->SOBGame = orxonox_cast<SOB*>(this->getOwner()->getGametype());
+    }
+    else
+    {
+        this->SOBGame = nullptr;
+    }
+}
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBHUDInfo.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBHUDInfo.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBHUDInfo.h	(revision 11502)
@@ -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:
+ *      Julien Kindle
+ *
+ */
+
+#ifndef _SOBHUDInfo_H__
+#define _SOBHUDInfo_H__
+
+#include "superorxobros/SOBPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _SOBExport SOBHUDInfo : public OverlayText, public Tickable
+    {
+        public:
+            SOBHUDInfo(Context* context);
+
+            virtual void tick(float dt) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void changedOwner() override;
+
+            inline void setType(std::string type)
+                { this->type_ = type; }
+            inline std::string getType() const
+                { return this->type_; }
+        
+
+        private:
+            SOB* SOBGame;
+            std::string type_;
+      
+    };
+}
+#endif /* _SOBHUDInfo_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBItem.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBItem.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBItem.cc	(revision 11502)
@@ -0,0 +1,79 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBItem.cc
+    @brief Not sure if ever used
+*/
+
+#include "SOBItem.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+
+
+namespace orxonox
+{
+    RegisterClass(SOBItem);
+
+    SOBItem::SOBItem(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(SOBItem);
+
+        attachedToFigure_ = false;
+
+        figure_ = nullptr;
+     this->enableCollisionCallback();
+       
+    }
+
+    
+
+    void SOBItem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBItem, XMLPort, xmlelement, mode);
+
+
+     }
+
+   
+    bool SOBItem::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+        return true;
+    }
+
+
+    void SOBItem::setFigure(SOBFigure* newFigure)
+    {
+        figure_ = newFigure;
+    }
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBItem.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBItem.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBItem.h	(revision 11502)
@@ -0,0 +1,62 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBItem.h
+    @brief Declaration of the SOBItem class.
+    @ingroup SOB
+*/
+
+#ifndef _SOBItem_H__
+#define _SOBItem_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/StaticEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBItem : public StaticEntity
+    {
+        public:
+            SOBItem(Context* context);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void setFigure(SOBFigure* newFigure);
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+
+          
+            bool attachedToFigure_;
+
+        protected:
+          
+            WeakPtr<SOBFigure> figure_;
+           
+    };
+}
+
+#endif /* _SOBItem_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBMushroom.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBMushroom.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBMushroom.cc	(revision 11502)
@@ -0,0 +1,125 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBMushroom.cc
+    @brief This is the class for the powerup mushroom
+*/
+
+#include "SOBMushroom.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "util/Output.h"
+
+
+namespace orxonox
+{
+    RegisterClass(SOBMushroom);
+
+    SOBMushroom::SOBMushroom(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(SOBMushroom);
+
+        attachedToFigure_ = false;
+        setAngularFactor(0.0);
+        figure_ = nullptr;
+        this->enableCollisionCallback();
+        gravityAcceleration_ = 350.0;
+        speed_ = 0.0;
+        hasCollided_=false;
+        goesRight_ = true;
+        lastPos_ = getPosition();
+        lastPos_.x -= 20;
+        changeAllowed_ = true;
+        changedOn_ = 0.0;
+       
+    }
+
+    
+
+    void SOBMushroom::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBMushroom, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBMushroom, "speed", setSpeed, getSpeed, xmlelement, mode);
+
+
+     }
+
+   
+    bool SOBMushroom::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+
+        if (changeAllowed_ && otherObject->getMass() != -1) {
+                goesRight_ = !goesRight_;
+                changeAllowed_ = false;
+        }
+
+        return true;
+    }
+
+
+    void SOBMushroom::setFigure(SOBFigure* newFigure)
+    {
+        figure_ = newFigure;
+    }
+
+
+
+    void SOBMushroom::tick(float dt)
+    {
+        SUPER(SOBMushroom, tick, dt);
+
+        //Exactly like the Gumba class, if collided, turn direction of Mushroom and wait 200ms so we don't get two collisions from the same wall
+        if (!changeAllowed_) {
+            changedOn_+= dt;
+            if (changedOn_> 0.200) {
+                changeAllowed_ = true;
+                changedOn_ = 0.0;
+
+        }
+    }
+        
+
+        int dir = 1;
+        if (!goesRight_)
+            dir = -1;
+
+        Vector3 velocity = getVelocity();
+        velocity.z -= gravityAcceleration_*dt;
+        velocity.x = dir*speed_;
+        setVelocity(velocity);
+
+
+    
+        lastPos_ = getPosition();
+            }
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBMushroom.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBMushroom.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBMushroom.h	(revision 11502)
@@ -0,0 +1,74 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file SOBMushroom.h
+    @brief Declaration of the SOBMushroom class.
+    @ingroup SOB
+*/
+
+#ifndef _SOBMushroom_H__
+#define _SOBMushroom_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBMushroom : public MovableEntity
+    {
+        public:
+            SOBMushroom(Context* context);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void setFigure(SOBFigure* newFigure);
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void tick(float dt) override;
+
+          
+            bool attachedToFigure_;
+
+            void setSpeed(const float speed)
+                { this->speed_ = speed; }
+            float getSpeed() const
+                { return speed_; }
+
+            bool hasCollided_;
+        protected:
+            float gravityAcceleration_;
+            float speed_;
+            WeakPtr<SOBFigure> figure_;
+            bool goesRight_;
+            Vector3 lastPos_;
+            bool changeAllowed_;
+            float changedOn_;
+           
+    };
+}
+
+#endif /* _SOBMushroom_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBPrereqs.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBPrereqs.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBPrereqs.h	(revision 11502)
@@ -0,0 +1,84 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the SOB module
+*/
+
+#ifndef _SOBPrereqs_H__
+#define _SOBPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(SOB_STATIC_BUILD)
+#  ifdef SOB_SHARED_BUILD
+#    define _SOBExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _SOBExport
+#    else
+#      define _SOBExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _SOBPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _SOBExport  __attribute__ ((visibility("default")))
+#  define _SOBPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _SOBExport
+#  define _SOBPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class SOBCenterpoint;
+    class SOB;
+    class SOBFigure;
+    class SOBItem;
+    class SOBQBlock;
+    class SOBMushroom;
+    class SOBHUDInfo;
+    class SOBGumba;
+    class SOBFlagstone;
+    class SOBCastlestone;
+    class SOBCoin;
+
+}
+
+#endif /* _SOBPrereqs_H__ */
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBQBlock.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBQBlock.cc	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBQBlock.cc	(revision 11502)
@@ -0,0 +1,128 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBQBlock.cc
+    @brief If this QBlock is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure starts flying fast until the fuel is reduced to zero.
+*/
+
+#include "SOBQBlock.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOB.h"
+#include "SOBMushroom.h"
+#include "SOBCoin.h"
+
+namespace orxonox
+{
+    RegisterClass(SOBQBlock);
+
+    SOBQBlock::SOBQBlock(Context* context) : SOBItem(context)
+    {
+        RegisterObject(SOBQBlock);
+        used_ = false;
+
+    }
+
+    SOBQBlock::~SOBQBlock()
+    {
+
+    }
+
+   
+    bool SOBQBlock::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+
+        //If you hit the QBlock, the visibility of all attached objects get inverted! Pretty easy way to create changing blocks :)
+        float v_z = otherObject->getVelocity().z;
+        if (!used_ && v_z > 50.0) {
+            used_ = true;
+
+            for (WorldEntity* object : this->getAttachedObjects())
+                object->setVisible(!object->isVisible());            
+
+            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+
+            //Spawn either a powerup mushroom or a coin animation (also just an object, have a look at the SOBCoin class)
+            //The spawn methods are declared at the bottom of this file
+            if (type_ == "Coin") {
+                SOBGame->addCoin();
+                spawnCoin();
+            }
+            if (type_ == "Mushroom") {
+                spawnMushroom();
+            }
+
+        }
+        return true;
+    }
+
+
+    void SOBQBlock::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBQBlock, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBQBlock, "type",     setType,     getType,     xmlelement, mode).defaultValues(false);
+
+
+     }
+
+
+     //The spawnmethods from above
+     void SOBQBlock::spawnMushroom() {
+        SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
+
+         SOBMushroom* mush = new SOBMushroom(center_->getContext());
+         Vector3 spawnpos = this->getWorldPosition();
+         spawnpos.z += 0;
+
+        if (mush != nullptr && center_ != nullptr)
+        {
+            mush->addTemplate("mushroom");
+            mush->setPosition(spawnpos);
+            
+        }
+     }
+
+          void SOBQBlock::spawnCoin() {
+        SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
+
+         SOBCoin* mush = new SOBCoin(center_->getContext());
+         Vector3 spawnpos = this->getWorldPosition();
+         spawnpos.z += 0;
+
+        if (mush != nullptr && center_ != nullptr)
+        {
+            mush->addTemplate("coin");
+            mush->setPosition(spawnpos);
+       
+        }
+     }
+
+
+}
Index: code/branches/HUD_HS16/src/modules/superorxobros/SOBQBlock.h
===================================================================
--- code/branches/HUD_HS16/src/modules/superorxobros/SOBQBlock.h	(revision 11502)
+++ code/branches/HUD_HS16/src/modules/superorxobros/SOBQBlock.h	(revision 11502)
@@ -0,0 +1,60 @@
+/*
+ *   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:
+ *      Julien Kindle
+ *   Co-authors:
+ *      
+ *
+ */
+
+#ifndef _SOBQBlock_H__
+#define _SOBQBlock_H__
+
+#include "SOBPrereqs.h"
+#include "SOBItem.h"
+
+namespace orxonox
+{
+    class _SOBExport SOBQBlock : public SOBItem
+    {
+        public:
+            SOBQBlock(Context* context);
+            virtual ~SOBQBlock();
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            void setType(std::string type) {
+                this->type_=type;
+            }
+            std::string getType() {
+                return this->type_;
+            }
+        protected:
+            bool used_;
+            std::string type_;
+            void spawnMushroom();
+            void spawnCoin();
+    };
+           
+}
+
+#endif /* _SOBQBlock_H__ */
Index: code/branches/HUD_HS16/src/modules/tetris/Tetris.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/tetris/Tetris.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/tetris/Tetris.cc	(revision 11502)
@@ -39,4 +39,5 @@
 
 #include "Tetris.h"
+#include "Highscore.h"
 
 #include "core/CoreIncludes.h"
@@ -327,5 +328,10 @@
             this->player_->stopControl();
         }
-
+         if (Highscore::exists()){
+                    int score = this->getScore(this->getPlayer());
+                    if(score > Highscore::getInstance().getHighestScoreOfGame("Tetris")) 
+                        Highscore::getInstance().storeHighscore("Tetris",score);
+
+          }
         this->cleanup();
 
Index: code/branches/HUD_HS16/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/HUD_HS16/src/modules/towerdefense/TowerDefense.cc	(revision 11501)
+++ code/branches/HUD_HS16/src/modules/towerdefense/TowerDefense.cc	(revision 11502)
@@ -81,4 +81,5 @@
 #include "chat/ChatManager.h"
 #include "core/CoreIncludes.h"
+#include "Highscore.h"
 
 namespace orxonox
@@ -197,5 +198,10 @@
     void TowerDefense::end()
     {
-
+        if (Highscore::exists()){
+                    int score = this->getWaveNumber();
+                    if(score > Highscore::getInstance().getHighestScoreOfGame("Tower Defense")) 
+                        Highscore::getInstance().storeHighscore("Tower Defense",score);
+
+          }
         TeamDeathmatch::end();
         ChatManager::message("Match is over! Gameover!");
