Index: code/branches/presentationHS15/src/modules/hover/Hover.cc
===================================================================
--- code/branches/presentationHS15/src/modules/hover/Hover.cc	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/Hover.cc	(revision 11040)
@@ -59,31 +59,34 @@
         SUPER(Hover, tick, dt);
 
-        if(this->firstTick_)
+        if(this->firstTick_ && this->origin_)
         {
             this->firstTick_ = false;
 
-            MazeGenerator generator;
+            int numCells = this->origin_->getNumCells();
+            int cellSize = this->origin_->getCellSize();
+            int cellHeight = this->origin_->getCellHeight();
+
+            MazeGenerator generator(numCells);
             generator.generateMaze();
             generator.renderMaze();
 
-            const int NUM_CELLS = generator.getNumCells();
             int* levelcode = generator.getLevelcode();
 
             //Outer Walls
-            for(int i = 0; i<NUM_CELLS; i++){
-                new HoverWall(origin_->getContext(), 0, i+1, 1);
-                new HoverWall(origin_->getContext(), NUM_CELLS, i+1, 1);
-                new HoverWall(origin_->getContext(), i+1, 0, 2);
-                new HoverWall(origin_->getContext(), i+1, NUM_CELLS, 2);
+            for(int i = 0; i<numCells; i++){
+                new HoverWall(origin_->getContext(), 0,        i+1,      cellSize, cellHeight, 1);
+                new HoverWall(origin_->getContext(), numCells, i+1,      cellSize, cellHeight, 1);
+                new HoverWall(origin_->getContext(), i+1,      0,        cellSize, cellHeight, 2);
+                new HoverWall(origin_->getContext(), i+1,      numCells, cellSize, cellHeight, 2);
             }
 
             //Generate inner Walls according to levelcode
-            for(int y=0; y<NUM_CELLS; y++){
-                for(int x=0; x<NUM_CELLS; x++){
-                    switch(levelcode[ y * NUM_CELLS + x ]){
-                        case 1: new HoverWall(origin_->getContext(), x+1, NUM_CELLS-y, 1);
+            for(int y=0; y<numCells; y++){
+                for(int x=0; x<numCells; x++){
+                    switch(levelcode[ y * numCells + x ]){
+                        case 1: new HoverWall(origin_->getContext(), x+1, numCells-y, cellSize, cellHeight, 1);
                                 break;
-                        case 3: new HoverWall(origin_->getContext(), x+1, NUM_CELLS-y, 1);
-                        case 2: new HoverWall(origin_->getContext(), x+1, NUM_CELLS-y, 0);
+                        case 3: new HoverWall(origin_->getContext(), x+1, numCells-y, cellSize, cellHeight, 1);
+                        case 2: new HoverWall(origin_->getContext(), x+1, numCells-y, cellSize, cellHeight, 0);
                         default: break;
                     }
@@ -93,5 +96,5 @@
             //Generate 5 flags randomly
             for ( int i = 0; i < 5; i++ )
-                flagVector_.push_back(new HoverFlag(origin_->getContext(), rand()%NUM_CELLS, rand()%NUM_CELLS));
+                flagVector_.push_back(new HoverFlag(origin_->getContext(), rand()%numCells, rand()%numCells, cellSize));
 
             flags_ = flagVector_.size();
Index: code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverFlag.cc	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/HoverFlag.cc	(revision 11040)
@@ -64,5 +64,5 @@
         Y-Coordinate of the flage, 0-9, origin is bottom left
     */
-    HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate) : StaticEntity(context)
+    HoverFlag::HoverFlag(Context* context, int xCoordinate, int yCoordinate, int cellSize) : StaticEntity(context)
     {
         RegisterObject(HoverFlag);
@@ -74,5 +74,5 @@
         model_->setMeshSource("ss_flag_eu.mesh");
         model_->setScale3D(Vector3(5, 5, 5));
-        model_->setPosition(Vector3(xCoordinate*100.0f + 50.0f,10.0f,yCoordinate*100.0f + 50.0f));
+        model_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,10.0f,yCoordinate*cellSize*1.0f + cellSize/2));
 
         this->attach(model_);
@@ -84,5 +84,5 @@
         cs_ = new BoxCollisionShape(context);
         cs_->setHalfExtents(Vector3(5, 5, 5));
-        cs_->setPosition(Vector3(xCoordinate*100.0f + 50.0f,0.0f,yCoordinate*100.0f + 50.0f));
+        cs_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,0.0f,yCoordinate*cellSize*1.0f + cellSize/2));
 
         this->attachCollisionShape(cs_);
Index: code/branches/presentationHS15/src/modules/hover/HoverFlag.h
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverFlag.h	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/HoverFlag.h	(revision 11040)
@@ -49,5 +49,5 @@
         public:
             HoverFlag(Context* context);
-            HoverFlag(Context* context, int xCoordinate, int yCoordinate);
+            HoverFlag(Context* context, int xCoordinate, int yCoordinate, int cellSize);
             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint);            
             virtual ~HoverFlag();
Index: code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc	(revision 11040)
@@ -50,4 +50,8 @@
     {
         SUPER(HoverOrigin, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HoverOrigin, "numCells", setNumCells, getNumCells, xmlelement, mode);
+        XMLPortParam(HoverOrigin, "cellSize", setCellSize, getCellSize, xmlelement, mode);
+        XMLPortParam(HoverOrigin, "cellHeight", setCellHeight, getCellHeight, xmlelement, mode);
     }
 
Index: code/branches/presentationHS15/src/modules/hover/HoverOrigin.h
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverOrigin.h	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/HoverOrigin.h	(revision 11040)
@@ -115,7 +115,25 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a HoverOrigin through XML.
             
+            inline void setNumCells(int numCells)
+                { this->numCells_ = numCells; }
+            inline int getNumCells() const
+                { return this->numCells_; }
+
+            inline void setCellSize(int cellSize)
+                { this->cellSize_ = cellSize; }
+            inline int getCellSize() const
+                { return this->cellSize_; }
+
+            inline void setCellHeight(int cellHeight)
+                { this->cellHeight_ = cellHeight; }
+            inline int getCellHeight() const
+                { return this->cellHeight_; }
+
         private:
             void checkGametype();
        
+            int numCells_;
+            int cellSize_;
+            int cellHeight_;
     };
 }
Index: code/branches/presentationHS15/src/modules/hover/HoverWall.cc
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverWall.cc	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/HoverWall.cc	(revision 11040)
@@ -65,5 +65,5 @@
             Wall on the right side (1) or on top (2) of this square, 0-1        
     */
-    HoverWall::HoverWall(Context* context, int x, int y, int orientation) : StaticEntity(context)
+    HoverWall::HoverWall(Context* context, int x, int y, int cellSize, int cellHeight, int orientation) : StaticEntity(context)
     {
         RegisterObject(HoverWall);
@@ -72,14 +72,14 @@
 
         if(orientation == 1){
-            xSize_ = 50;
+            xSize_ = cellSize/2;
             zSize_ = 2;
-            zPos_ = x*100;
-            xPos_ = y*100 -50;
+            zPos_ = x*cellSize;
+            xPos_ = y*cellSize-cellSize/2;
         }
         else{
             xSize_ = 2;
-            zSize_ = 50;
-            zPos_ = x*100-50;
-            xPos_ = y*100;
+            zSize_ = cellSize/2;
+            zPos_ = x*cellSize-cellSize/2;
+            xPos_ = y*cellSize;
         }
 
@@ -87,5 +87,5 @@
         model_ = new Model(context);
         model_->setMeshSource("CuboidBody.mesh");
-        model_->setScale3D(Vector3(xSize_*1.0f, 30.0f, zSize_*1.0f));
+        model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
         model_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
 
@@ -97,5 +97,5 @@
 
         cs_ = new BoxCollisionShape(context);
-        cs_->setHalfExtents(Vector3(xSize_*1.0f, 30.0f, zSize_*1.0f));
+        cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
         cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
 
Index: code/branches/presentationHS15/src/modules/hover/HoverWall.h
===================================================================
--- code/branches/presentationHS15/src/modules/hover/HoverWall.h	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/HoverWall.h	(revision 11040)
@@ -49,5 +49,5 @@
         public:
             HoverWall(Context* context);            
-            HoverWall(Context* context, int x, int y, int orientation);
+            HoverWall(Context* context, int x, int y, int cellSize, int cellHeight, int orientation);
             virtual ~HoverWall();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
Index: code/branches/presentationHS15/src/modules/hover/MazeGenerator.cc
===================================================================
--- code/branches/presentationHS15/src/modules/hover/MazeGenerator.cc	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/MazeGenerator.cc	(revision 11040)
@@ -44,6 +44,8 @@
 namespace orxonox
 {
-    MazeGenerator::MazeGenerator()
-    {
+    MazeGenerator::MazeGenerator(int numCells)
+    {
+        this->numCells_ = numCells;
+
         //levelcode_ represents the pitch: It's a 10x10 field.
         // 1 represents a Wall on the right side of this square
@@ -51,9 +53,9 @@
         // 3 represents 2 and 1 at the same time
         // Note: the levelcode_ is generated from the Maze-Generator functions at the beginning of the game
-        this->levelcode_ = new int[ NUM_CELLS*NUM_CELLS ];;
-        std::fill( levelcode_, levelcode_ + NUM_CELLS*NUM_CELLS, 0 );
-
-        this->maze_ = new unsigned char[ NUM_CELLS*NUM_CELLS ];
-        std::fill( maze_, maze_ + NUM_CELLS*NUM_CELLS, 0 );
+        this->levelcode_ = new int[ numCells_*numCells_ ];;
+        std::fill( levelcode_, levelcode_ + numCells_*numCells_, 0 );
+
+        this->maze_ = new unsigned char[ numCells_*numCells_ ];
+        std::fill( maze_, maze_ + numCells_*numCells_, 0 );
 
         // current traversing position
@@ -91,7 +93,7 @@
         int NewY = ptY_ + headingY_[ Dir ];
 
-        if ( !Dir || NewX < 0 || NewY < 0 || NewX >= NUM_CELLS || NewY >= NUM_CELLS ) return false;
-
-        return !maze_[ NewX + NUM_CELLS * NewY ];
+        if ( !Dir || NewX < 0 || NewY < 0 || NewX >= numCells_ || NewY >= numCells_ ) return false;
+
+        return !maze_[ NewX + numCells_ * NewY ];
     }
 
@@ -150,9 +152,9 @@
     */
     void MazeGenerator::mazeOut(){
-        for ( int y = 0; y < NUM_CELLS; y++ )
-        {
-            for ( int x = 0; x < NUM_CELLS; x++ )
-            {
-                char v = maze_[ y * NUM_CELLS + x ];
+        for ( int y = 0; y < numCells_; y++ )
+        {
+            for ( int x = 0; x < numCells_; x++ )
+            {
+                char v = maze_[ y * numCells_ + x ];
                 orxout()<<"[";
                 if ( ( v & eDirection_Up    ) ) orxout()<<"U";
@@ -176,12 +178,12 @@
     */
     void MazeGenerator::levelOut(){
-        for ( int y = 0; y < NUM_CELLS; y++ )
-        {
-            for ( int x = 0; x < NUM_CELLS; x++ )
+        for ( int y = 0; y < numCells_; y++ )
+        {
+            for ( int x = 0; x < numCells_; x++ )
             {
                 orxout()<<"[";
-                if ( levelcode_[ y * NUM_CELLS + x ] < 2) orxout()<<"U";
-                else orxout()<<" ";
-                if ( levelcode_[ y * NUM_CELLS + x ] % 2 == 0) orxout()<<"R";
+                if ( levelcode_[ y * numCells_ + x ] < 2) orxout()<<"U";
+                else orxout()<<" ";
+                if ( levelcode_[ y * numCells_ + x ] % 2 == 0) orxout()<<"R";
                 else orxout()<<" ";
 
@@ -200,25 +202,29 @@
     void MazeGenerator::renderMaze()
     {
-        for ( int y = 0; y < NUM_CELLS; y++ )
-        {
-            for ( int x = 0; x < NUM_CELLS; x++ )
-            {
-                char v = maze_[ y * NUM_CELLS + x ];
-
-                if ( !( v & eDirection_Up    ) && y >0) levelcode_[ y * NUM_CELLS + x ] |= 2;
-                if ( !( v & eDirection_Right ) && x <9) levelcode_[ y * NUM_CELLS + x ] |= 1;
-            }
-        }
-        for ( int y = 3; y < 7; y++ )
-        {
-            for ( int x = 3; x < 7; x++ )
-            {
-
-                if(y == 3 && x != 7)
-                    levelcode_[ y * NUM_CELLS + x ] &= 2;
-                else if (x == 7 && y != 3)
-                    levelcode_[ y * NUM_CELLS + x ] &= 1;
-                else if(x != 7)
-                    levelcode_[ y * NUM_CELLS + x ] = 0;
+        for ( int y = 0; y < numCells_; y++ )
+        {
+            for ( int x = 0; x < numCells_; x++ )
+            {
+                char v = maze_[ y * numCells_ + x ];
+
+                if ( !( v & eDirection_Up    ) && y >0) levelcode_[ y * numCells_ + x ] |= 2;
+                if ( !( v & eDirection_Right ) && x <(numCells_-1)) levelcode_[ y * numCells_ + x ] |= 1;
+            }
+        }
+
+        // leave an empty space in the middle of the maze
+        int lowerBound = numCells_ / 2 - 2;
+        int upperBound = numCells_ / 2 + 2;
+        for ( int y = lowerBound; y < upperBound; y++ )
+        {
+            for ( int x = lowerBound; x < upperBound; x++ )
+            {
+
+                if(y == lowerBound && x != upperBound)
+                    levelcode_[ y * numCells_ + x ] &= 2;
+                else if (x == upperBound && y != lowerBound)
+                    levelcode_[ y * numCells_ + x ] &= 1;
+                else if(x != upperBound)
+                    levelcode_[ y * numCells_ + x ] = 0;
             }
         }
@@ -229,10 +235,10 @@
     int MazeGenerator::cellIdx()
     {
-        return ptX_ + NUM_CELLS * ptY_;
+        return ptX_ + numCells_ * ptY_;
     }
 
     int MazeGenerator::randomInt()
     {
-        return (rand() % NUM_CELLS);
+        return (rand() % numCells_);
     }
 
Index: code/branches/presentationHS15/src/modules/hover/MazeGenerator.h
===================================================================
--- code/branches/presentationHS15/src/modules/hover/MazeGenerator.h	(revision 11036)
+++ code/branches/presentationHS15/src/modules/hover/MazeGenerator.h	(revision 11040)
@@ -51,5 +51,5 @@
     {
         public:
-            MazeGenerator();
+            MazeGenerator(int numCells);
 
             void generateMaze();
@@ -60,6 +60,4 @@
             int* getLevelcode() const
                 { return this->levelcode_; }
-            int getNumCells() const
-                { return NUM_CELLS; }
 
         private:
@@ -71,5 +69,5 @@
             int randomInt4();
 
-            static const int NUM_CELLS = 10;
+            int numCells_;
             int* levelcode_;
             unsigned char* maze_;
