Index: code/branches/3DPacman_FS18/data/levels/3DPacman.oxw
===================================================================
--- code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	(revision 11979)
+++ code/branches/3DPacman_FS18/data/levels/3DPacman.oxw	(revision 11984)
@@ -2,6 +2,6 @@
  name = "3DPacman"
  description = "A 3DVersion of Pacman."
- tags = "test"
- screenshot = "emptylevel.png"
+ tags = "minigame"
+ screenshot = "Pacman.png"
 />
 
@@ -16,6 +16,4 @@
 ?>
 
-<!-- include("templates/spaceshipEscort.oxt") -->
-
 <Level
   plugins = pacman
@@ -35,6 +33,4 @@
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
     <SpawnPoint team=0 position="0,10,150" lookat="0,0,0" spawnclass=PacmanGelb pawndesign=PacmanGelb />
-
-    <!-- <SpawnPoint team=0 position="0,10,150" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort /> -->
 
 <!-- GHOSTS -->
@@ -1805,5 +1801,5 @@
   <BoxCollisionShape position="155,10,130" halfExtents="10,30,25" />
   <BoxCollisionShape position="-220,10,150" halfExtents="20,30,10" />
-  <BoxCollisionShape position="-220,10,150" halfExtents="20,30,10" /> <!-- 30 -->
+  <BoxCollisionShape position="220,10,150" halfExtents="20,30,10" /> <!-- 30 -->
   <BoxCollisionShape position="0,10,150" halfExtents="60,30,10" />
   <BoxCollisionShape position="0,10,180" halfExtents="10,30,25" />
@@ -1817,6 +1813,15 @@
 </StaticEntity>
 
-<PortalEndPoint position="-240,10,0" id="1" distance="40" target="Pawn"/>
-<PortalEndPoint position="240,10,0" id="2" distance="40" target="Pawn"/>
+
+<Template name=Portal>
+    <PortalEndPoint>
+        <attached>
+            <Model mesh="Spacegate.mesh" yaw="90"/>
+        </attached>
+    </PortalEndPoint>
+</Template>
+
+<PortalEndPoint position="-240,15,5" id="1" distance="40" target="Pawn" design="Portal"/>
+<PortalEndPoint position="240,15,5" id="2" distance="40" target="Pawn" design="Portal"/>
 <PortalLink fromID="1" toID="2" />
 <PortalLink fromID="2" toID="1" />
Index: code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo
===================================================================
--- code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo	(revision 11979)
+++ code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo	(revision 11984)
@@ -59,5 +59,5 @@
 
     <PacmanHUDinfo
-     position  = "0.5, 0.5"
+     position  = "0.85, 0.9"
      pickpoint = "0.0, 0.0"
      font      = "ShareTechMono"
Index: code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	(revision 11979)
+++ code/branches/3DPacman_FS18/src/modules/pacman/Pacman.cc	(revision 11984)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Florian Zinggeler
+ *      Marc Dreher
  *   Co-authors:
  *      ...
@@ -34,5 +34,4 @@
 #include "Pacman.h"
 #include "core/CoreIncludes.h"
-//Test
 
 namespace orxonox
@@ -52,4 +51,5 @@
     void Pacman::levelUp()
     {
+        //Reset each object
         for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){
         	nextsphere->resetPacmanPointSphere();
@@ -60,9 +60,12 @@
         }
 
+        //Level up ghosts
         for(PacmanGhost* nextghost : ObjectList<PacmanGhost>()){
             nextghost->levelupvelo(); 
         }
+        //Reset ghosts and player
         this->posreset();
 
+        //Increase maximum of points and level
         totallevelpoint = ObjectList<PacmanPointSphere>().size() + totallevelpoint;
         level++;
@@ -77,53 +80,55 @@
         SUPER(Pacman, tick, dt);
 
+        //Needed for gameover
         if(deathtime != 0){
             dead(dt);
         }
 
+        //ingame loop
         else{
 
-        if(afraid){
-        timer = timer - dt;
-            if(timer<=0){
-                setNormal();
-            }
-        }
-
-
-        int i = 0;
-        for(PacmanGhost* nextghost : ObjectList<PacmanGhost>()){
-            ghosts[i] = nextghost;
-            i++;
-        }
-
-        player = this->getPlayer();
-        if (player != nullptr)
-        {
-            currentPosition = player->getWorldPosition();
-        }
-
-
-        bcolli = false;
-        for(int nrghost = 0; (nrghost<8) && (!bcolli); ++nrghost){
-            bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition);
-            //orxout() << "GHOST" << nrghost << ghosts[nrghost]->getPosition() << endl;
-        }
-
-        if(bcolli){
-          this->catched(dt);
-        }
-
-        i = 0;
-        for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){
-            if(collis(nextsphere->getPosition(), currentPosition)){
-                takePoint(nextsphere);
-            }
-        }
-
-        for(PacmanPointAfraid* next : ObjectList<PacmanPointAfraid>()){
-            if(next->taken(currentPosition)){
-                setAfraid();
-            }
-        }
+            //Register ghosts
+            int i = 0;
+            for(PacmanGhost* nextghost : ObjectList<PacmanGhost>()){
+                ghosts[i] = nextghost;
+                i++;
+            }
+
+            //Switch ghost to not-catchable, if timer is zero
+            if(afraid){
+                timer = timer - dt;
+                if(timer<=0){
+                    setNormal();
+                }
+            }
+
+            //Get position of player
+            player = this->getPlayer();
+            if (player != nullptr)
+            {
+                currentPosition = player->getWorldPosition();
+            }
+
+            //Check for collision with ghosts
+            bcolli = false;
+            for(int nrghost = 0; (nrghost<8) && (!bcolli); ++nrghost){
+                bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition);
+            }
+
+            if(bcolli){
+                this->catched(dt);
+            }
+
+            //Check for collision with PointSpheres and PacmanPointAfraid
+            i = 0;
+            for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){
+                if(collis(nextsphere->getPosition(), currentPosition))
+                 takePoint(nextsphere);
+            }
+
+            for(PacmanPointAfraid* next : ObjectList<PacmanPointAfraid>()){
+                if(next->taken(currentPosition))
+                  setAfraid();
+            }
 
         } 
@@ -131,5 +136,5 @@
     }
 
-
+    //Check for collisions between to objects (compare float numbers)
     bool Pacman::collis(Vector3 one, Vector3 other){
         if((abs(one.x-other.x)<10) && (abs(one.y-other.y)<10) && (abs(one.z-other.z)<10))
@@ -138,8 +143,9 @@
     }
 
+    //Decrease live or resetghost
     void Pacman::catched(float dt){
 
-    if(!afraid) {
-        if(!lives){
+    if(!this->afraid) {
+        if(!this->lives){
           deathtime = 5;
           this->dead(dt);  
@@ -150,11 +156,12 @@
     else{
         for(int nrghost = 0; nrghost<8; ++nrghost){
-        bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition);
-        if(bcolli) ghosts[nrghost]->resetGhost();
-        bcolli = false;
+            bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition);
+            if(bcolli) ghosts[nrghost]->resetGhost();
+                bcolli = false;
         }
       }
     }
 
+    //Change ghost design (to afraid)
     void Pacman::setAfraid(){
 
@@ -172,4 +179,5 @@
     } 
 
+    //Change ghost design (to not afraid)
     void Pacman::setNormal(){
 
@@ -185,16 +193,5 @@
     } 
 
-    bool Pacman::getAfraid(){
-        return afraid;
-    }
-
-    int Pacman::getTimer(){
-        return timer;
-    }
-
-    int Pacman::getLevel(){
-        return level;
-    }
-
+    //Reset ghosts and plazer
     void Pacman::posreset(){
         for(int i = 0; i<4; ++i){
@@ -204,4 +201,5 @@
     }
 
+    //Collision with PointSphere
     void Pacman::takePoint(PacmanPointSphere* taken){
         ++point;
@@ -210,4 +208,5 @@
             return;
         }
+        //Set PointSphere under map
         Vector3 postaken = taken->getPosition();
         postaken.y = -50;
@@ -225,11 +224,28 @@
     }
 
+    //Getter
+    bool Pacman::getAfraid(){
+        return afraid;
+    }
+    //Getter
+    int Pacman::getTimer(){
+        return timer;
+    }
+    //Getter
+    int Pacman::getLevel(){
+        return level;
+    }
+    //Getter
     int Pacman::getPoints(){
         return point;
     }
-
+    //Getter
     int Pacman::getLives(){
         return lives;
     }
+    //Getter
+    bool Pacman::isdead(){
+        return death;
+    }
 
 
@@ -238,4 +254,5 @@
         Deathmatch::start();
 
+        //Hide afraided ghosts under map
         int i = 0;
         for(PacmanGhost* nextghost : ObjectList<PacmanGhost>()){
@@ -247,10 +264,7 @@
         }
 
+        //Set maximum of points of first level
         totallevelpoint = ObjectList<PacmanPointSphere>().size();
 
-    }
-
-    bool Pacman::isdead(){
-        return death;
     }
 
@@ -258,4 +272,7 @@
         death = true;
 
+        //if (Highscore::exists())
+          //  Highscore::getInstance().storeScore("3DPacman", this->getPoints(), this->playerInfo_);
+
         deathtime = deathtime-dt;
 
@@ -266,12 +283,4 @@
     void Pacman::end()
     {
-
-    	/*
-        if (Highscore::exists())
-        {
-            //int score = this->getPoints();
-            //Highscore::getInstance().storeScore("3DPacman", score, this->playerInfo_);
-        }
-        */
         GSLevel::startMainMenu();
     }
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.cc	(revision 11979)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.cc	(revision 11984)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Florian Zinggeler
+ *      Marc Dreher
  *   Co-authors:
  *      ...
@@ -47,11 +47,7 @@
     {
     	SUPER(PacmanGelb, tick, dt);
-        //bring player back to ground
-        actuelposition = this->getPosition();
+        actuelposition = this->getPosition(); //bring player back to ground
         actuelposition.y = 10;
         this->setPosition(actuelposition);
-        this->rotatePitch(Vector2(0, 0));
-
-        
     }
 }
Index: code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.h	(revision 11979)
+++ code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.h	(revision 11984)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Florian Zinggeler
+ *      Marc Dreher
  *   Co-authors:
  *      ...
@@ -52,19 +52,15 @@
             virtual void tick(float dt);
 
-            //no rotation
+            //allow rotation in horizontal manner
             virtual void rotateYaw(const Vector2& value) override{
                 this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
-
                 Pawn::rotateYaw(value);
-
-                // This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
-                //if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_)
-                //this->moveRightLeft(-lift_ / 5.0f * value * sqrt(std::abs(this->getLocalVelocity().y)));
             };
+            
+            //forbid rotation in the vertical (doesn't work totally proper, see documentation)
             virtual void rotatePitch(const Vector2& value) override{};
 
         private:
             Vector3 actuelposition;
-            Quaternion actuelorient;
        
     };
