Index: code/branches/3DPacman_FS18/data/levels/3DPacman.oxw
===================================================================
--- code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	(revision 11930)
+++ code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	(revision 11931)
@@ -34,7 +34,6 @@
     <SpawnPoint team=0 position="0,10,245" lookat="0,0,0" spawnclass=PacmanGelb pawndesign=PacmanGelb />
 
-
-<--! GHOSTS -->
-<PacmanGhost position="0,0,0">
+<!-- GHOSTS -->
+<PacmanGhost position="0,10,15" >
     <attached>
         <Model position="0,0,0" mesh="PacmanGhostRed.mesh" scale="5" />
@@ -42,5 +41,5 @@
 </PacmanGhost>
 
-<PacmanGhost position="0,0,0">
+<PacmanGhost position="0,10,15" >
     <attached>
         <Model position="0,0,0" mesh="PacmanGhostBlue.mesh" scale="5" />
@@ -48,5 +47,5 @@
 </PacmanGhost>
 
-<PacmanGhost position="0,0,0">
+<PacmanGhost position="0,10,15" >
     <attached>
         <Model position="0,0,0" mesh="PacmanGhostOrange.mesh" scale="5" />
@@ -54,5 +53,5 @@
 </PacmanGhost>
 
-<PacmanGhost position="0,0,0">
+<PacmanGhost position="0,10,15" >
     <attached>
         <Model position="0,0,0" mesh="PacmanGhostPink.mesh" scale="5" />
@@ -60,5 +59,5 @@
 </PacmanGhost>
 
-<--! POINTS -->
+<!-- POINTS -->
 <PacmanPointSphere position="0,10,0">
     <attached>
@@ -80,7 +79,5 @@
 
 
-
-
-<--! Map -->
+<!-- Map -->
 <StaticEntity position="0,0,25" direction="0,0,0" collisionType=static mass=100000 friction=0.01 >
     <attached> 
@@ -89,19 +86,15 @@
     <collisionShapes> 
 
-  <--! Edge -->
-	<BoxCollisionShape position="250,10,0" halfExtents="1,15,250" />
-	<BoxCollisionShape position="-250,10,0" halfExtents="1,15,250" />
+  <!-- Edge -->  
+  <BoxCollisionShape position="250,10,0" halfExtents="1,15,250" />
+  <BoxCollisionShape position="-250,10,0" halfExtents="1,15,250" />
   <BoxCollisionShape position="0,10,250" halfExtents="250,15,1" />
   <BoxCollisionShape position="0,10,-250" halfExtents="250,15,1" />
 
-  <--! Shapes in order -->
-  <BoxCollisionShape position="-35,10,-200" halfExtents="40,15,25" />
-  <BoxCollisionShape position="60,10,-200" halfExtents="40,15,25" />
-  <BoxCollisionShape position="-35,10,200" halfExtents="40,15,25" />
-  <BoxCollisionShape position="60,10,200" halfExtents="40,15,25" />
-
-  <BoxCollisionShape position="-175,10,-165" halfExtents="30,15,20" />
-
-
+   <!-- Shapes in order -->    
+  <BoxCollisionShape position="-200,10,-65" halfExtents="55,15,35" />
+  <BoxCollisionShape position="-200,10,30" halfExtents="55,15,35" />
+  <BoxCollisionShape position="200,10,-65" halfExtents="55,15,35" />
+  <BoxCollisionShape position="200,10,30" halfExtents="55,15,35" />
 
     </collisionShapes> 
@@ -112,5 +105,4 @@
 <PortalLink fromID="1" toID="2" />
 <PortalLink fromID="2" toID="1" />
-
   </Scene>
 </Level>
Index: code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt
===================================================================
--- code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt	(revision 11930)
+++ code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt	(revision 11931)
@@ -50,8 +50,5 @@
     </attached>
     <collisionShapes>
-      <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
-      <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
-      <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
-      <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
+      <BoxCollisionShape position="0    ,0 ,  0" halfExtents="1,1,1" />
     </collisionShapes>
 
@@ -74,5 +71,5 @@
    boostfactor    = 1.0
 
-   speedfront     = 50
+   speedfront     = 60
    speedback      = 20
    speedleftright =  1
Index: code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo
===================================================================
--- code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo	(revision 11931)
+++ code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo	(revision 11931)
@@ -0,0 +1,69 @@
+<Template name="pacmanhud">
+  <OverlayGroup name = "pacmanhud" scale = "1, 1">
+  </OverlayGroup>
+</Template>
+<Template name="PacmanHUD">
+  <OverlayGroup name="PacmanHUD" scale = "1, 1">
+   
+    <PacmanHUDinfo
+     position  = "0.02, 0.01"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showpoints     = true
+    />
+
+    <PacmanHUDinfo
+     position  = "0.5, 0.5"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 0.0, 0.0, 1.0"
+     align     = "center"
+
+     showmessage     = true
+     messageID = 0
+
+    />
+
+    <PacmanHUDinfo
+         position  = "0.5, 0.6"
+         pickpoint = "0.0, 0.0"
+         font      = "ShareTechMono"
+         textsize  = 0.04
+         colour    = "1.0, 1.0, 1.0, 1.0"
+         align     = "center"
+
+         showmessage     = true
+         messageID = 1
+    />
+    <PacmanHUDinfo
+     position  = "0.5, 0.65"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+
+     showmessage     = true
+     messageID = 2
+    />
+    <PacmanHUDinfo
+     position  = "0.5, 0.7"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+
+     showmessage     = true
+     messageID = 3
+
+    />
+
+    
+  </OverlayGroup>
+</Template>
Index: code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	(revision 11930)
+++ code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	(revision 11931)
@@ -44,8 +44,11 @@
         RegisterObject(Pacman);
 
+       // firstGame = true;                   //needed for the HUD
         lives = 10;
         point = 0;
         level = 1;
 
+       // setHUDTemplate("PacmanOrxHUD");
+       // scoreboardTemplate_ = "";
     }
 
@@ -97,5 +100,5 @@
 
     bool Pacman::collis(Vector3 one, Vector3 other){
-        if((abs(one.x-other.x)<7) && (abs(one.y-other.y)<7) && (abs(one.z-other.z)<7))
+        if((abs(one.x-other.x)<10) && (abs(one.y-other.y)<10) && (abs(one.z-other.z)<10))
             return true;
         return false;
@@ -146,4 +149,21 @@
     void Pacman::end()
     {
+        /*
+        firstGame = false;
+        
+        //Set randomized deathmessages
+        if(point<7)         sDeathMessage = DeathMessage7[rand()%(DeathMessage7.size())];
+        else if(point<20)   sDeathMessage = DeathMessage20[rand()%(DeathMessage20.size())];
+        else if(point<30)   sDeathMessage = DeathMessage30[rand()%(DeathMessage30.size())];
+        else                sDeathMessage = DeathMessageover30[rand()%(DeathMessageover30.size())];
+        
+        //Update Highscore
+        if (Highscore::exists())
+        {
+            int score = this->getPoints();
+            Highscore::getInstance().storeScore("Pacman", score, this->getPlayer()->getPlayer());
+        }
+
+
         if (Highscore::exists())
         {
@@ -151,4 +171,5 @@
             //Highscore::getInstance().storeScore("3DPacman", score, this->playerInfo_);
         }
+        */
         GSLevel::startMainMenu();
     }
Index: code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h	(revision 11930)
+++ code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h	(revision 11931)
@@ -94,4 +94,5 @@
             Vector3 startposplayer = Vector3(0,10,245);
             int totallevelpoint = 3;
+            //bool firstGame;
             
        private:
@@ -107,29 +108,30 @@
             Timer showLevelTimer;
 
-
-         /*
-
-            //void spawnEnemy();
-
-
-
-
-
-
-
-
-
-
-
-
-        private:
-
-
-
-
-            //Context* context;
-            */
+/*
+std::string sDeathMessage;
+const std::vector<std::string> DeathMessage7 = {
+                "You should really try that again",
+                "You can do better, can you?",
+                "Hey, maybe you get a participation award, that's good isn't it?",
+                "Congratulations, you get a medal, a wooden one",
+                "That was flappin bad!",
+                "Well, that was a waste of time",
+                "You suck!",
+                "Maybe try SuperOrxoBros. That game is not as hard.",
+                "Here's a tip: Try not to fly into these grey thingies.",
+                "We won't comment on that."};
+            const std::vector<std::string> DeathMessage20 = {
+                "Getting better!",
+                "Training has paid off, huh?",
+                "Good average!",
+                "That was somehow enjoyable to watch",
+                "Flappin average",
+                "Getting closer to something",
+                "That wasn't crap, not bad",
+                "Surprisingly not bad."};
+  */      
+        
     };
 }
 
-#endif /* _DodgeRace_H__ */
+#endif /* _Pacman_H__ */
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc	(revision 11930)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc	(revision 11931)
@@ -49,6 +49,4 @@
 
         this->setCollisionType(CollisionType::Dynamic);
-
-        this->resetposition = this->getPosition(); //Set Default start position
         
         this->actuelposition = this->getPosition();
@@ -325,4 +323,7 @@
                 setnewTarget(56,64);
             }
+            else if(findpos(actuelposition,possibleposition[66])){
+                setnewTarget(47,48);
+            }
 
             else{
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.h	(revision 11930)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.h	(revision 11931)
@@ -67,5 +67,5 @@
             Vector3 actuelposition;
             Vector3 velocity;
-            Vector3 resetposition;
+            Vector3 resetposition = Vector3(0,10,15);
     };
 
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc	(revision 11931)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc	(revision 11931)
@@ -0,0 +1,132 @@
+/*
+ *   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:
+ *      Leo Merholz
+ *      Pascal Schärli
+ *
+ *      Co-authors:
+ *      ...
+ */
+
+#include "PacmanHUDinfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+
+namespace orxonox
+{
+    RegisterClass(PacmanHUDinfo);
+
+    PacmanHUDinfo::PacmanHUDinfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(PacmanHUDinfo);
+
+        this->PacmanGame = nullptr;
+        this->bShowPoints_ = false;
+        this->bShowMessage_ = false;
+        this->messageID = 0;
+    }
+
+    void PacmanHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PacmanHUDinfo, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PacmanHUDinfo, "showpoints",    setShowPoints,    getShowPoints,    xmlelement, mode).defaultValues(false);
+        XMLPortParam(PacmanHUDinfo, "showmessage",   setShowMessage,   getShowMessage,   xmlelement, mode).defaultValues(false);
+        XMLPortParam(PacmanHUDinfo, "messageID",     setMessageID,     getMessageID,     xmlelement, mode).defaultValues(0);
+       
+    
+    }
+
+    void PacmanHUDinfo::tick(float dt)
+    {
+        SUPER(PacmanHUDinfo, tick, dt);
+
+        if (this->PacmanGame)
+        {
+            if(not this->PacmanGame->isDead()){
+                if(this->bShowPoints_){
+                    const std::string& points = "Score: "+multi_cast<std::string>(this->PacmanGame->getPoints());
+                    setTextSize(0.04);
+                    this->setCaption(points);
+                }
+                else if(this->bShowMessage_){
+                    setTextSize(0);
+                }
+            }
+            else{
+                if(this->bShowPoints_){
+                    setTextSize(0);
+                }
+                else if(this->bShowMessage_){
+                    if(this->PacmanGame->firstGame){
+                        if(messageID==3){
+                            setTextSize(0.05);
+                            this->setCaption("First click, then press space to start");
+                        }
+                    }
+                    else{
+                        std::string message;
+                        setTextSize(0.05);
+                        switch(messageID){
+                            case 0:
+                                message = "Game Over";
+                                setTextSize(0.1);
+                                this->setCaption(message);
+                            break;
+                            case 1:
+                                message = this->PacmanGame->sDeathMessage;
+                            break;
+                            case 2:
+                                message = "Your Score: "+multi_cast<std::string>(this->PacmanGame->getPoints())+
+                                                        "  Local High Score: "+multi_cast<std::string>(Highscore::getInstance().getHighestScoreOfGame("Flappy Orx"));
+                            break;
+                            case 3:
+                                time_t time = this->PacmanGame->getPlayer()->timeUntilRespawn();
+                                if(time<=0)
+                                    message = "Press space to restart.";
+                                else
+                                    message = "Please wait "+multi_cast<std::string>(time)+" seconds.";
+                            break;
+                        }
+                        this->setCaption(message);
+                    }
+                }
+            }   
+        }
+    }
+
+    void PacmanHUDinfo::changedOwner()
+    {
+        SUPER(PacmanHUDinfo, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->PacmanGame = orxonox_cast<Pacman*>(this->getOwner()->getGametype());
+        }
+        else
+        {
+            this->PacmanGame = nullptr;
+        }
+    }
+}
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h	(revision 11931)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h	(revision 11931)
@@ -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:
+ *      Florian Zinggeler
+ *
+ */
+
+#ifndef _PacmanHUDinfo_H__
+#define _PacmanHUDinfo_H__
+
+#include "PacmanPrereqs.h"
+#include "Pacman.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+#include <cstring>
+
+namespace orxonox
+{
+    class _PacmanExport PacmanHUDinfo : public OverlayText, public Tickable
+    {
+        public:
+            PacmanHUDinfo(Context* context);
+
+            virtual void tick(float dt) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void changedOwner() override;
+
+            inline void setShowPoints(bool value)
+                { this->bShowPoints_ = value; }
+            inline bool getShowPoints() const
+                { return this->bShowPoints_; }
+
+            inline void setShowMessage(bool value){
+                bShowMessage_ = value;
+            }
+            inline bool getShowMessage() const
+                { return this->bShowMessage_; }
+
+            inline void setMessageID(int value){
+                messageID = value;
+            }
+            inline int getMessageID() const
+                { return messageID; }
+
+        private:
+            Pacman* PacmanGame;
+            bool bShowPoints_;
+            bool bShowMessage_;
+            int messageID;
+    };
+}
+#endif /* _PacmanHUDinfo_H__ */
