Index: client/Client/Client.vcxproj.filters
===================================================================
--- client/Client/Client.vcxproj.filters	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
+++ client/Client/Client.vcxproj.filters	(revision 384b7e0e4f6fa3e09e435a55a7c008609faa0ed9)
@@ -56,5 +56,5 @@
     </ClCompile>
     <ClCompile Include="..\..\common\WorldMap.cpp">
-      <Filter>Source Files\gui</Filter>
+      <Filter>Source Files\common</Filter>
     </ClCompile>
   </ItemGroup>
Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
+++ client/Client/main.cpp	(revision 384b7e0e4f6fa3e09e435a55a7c008609faa0ed9)
@@ -29,6 +29,6 @@
 #include "../../common/Message.h"
 #include "../../common/Common.h"
+#include "../../common/WorldMap.h"
 #include "../../common/Player.h"
-#include "../../common/WorldMap.h"
 
 #include "Window.h"
@@ -160,5 +160,7 @@
    }
 
-   WorldMap* gameMap = WorldMap::createDefaultMap();
+   WorldMap* gameMap = WorldMap::loadMapFromFile("../../data/map.txt");
+   //delete gameMap;
+   //gameMap = WorldMap::createDefaultMap();
 
    wndLogin = new Window(0, 0, SCREEN_W, SCREEN_H);
Index: common/WorldMap.cpp
===================================================================
--- common/WorldMap.cpp	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
+++ common/WorldMap.cpp	(revision 384b7e0e4f6fa3e09e435a55a7c008609faa0ed9)
@@ -1,3 +1,8 @@
 #include "WorldMap.h"
+
+#include <string>
+#include <iostream>
+#include <fstream>
+#include <sstream>
 
 using namespace std;
@@ -57,2 +62,78 @@
    return m;
 }
+
+WorldMap* WorldMap::loadMapFromFile(string filename)
+{
+   WorldMap* m = new WorldMap(12l, 12);
+
+   ifstream file(filename);
+
+   if (file.is_open())
+   {
+      string line;
+      int width, height;
+
+      // read the map dimensions
+      getline(file, line);
+      if (line.size() > 0)
+      {
+         istringstream iss(line);
+         string token;
+         getline(iss, token, 'x');
+         width = atoi(token.c_str());
+         getline(iss, token, 'x');
+         height = atoi(token.c_str());
+      }
+
+      cout << "width: " << width << endl;
+      cout << "height: " << height << endl;
+
+      // read the map contents
+      int row = 0;
+      while ( file.good() )
+      {
+         getline(file, line);
+         if (line.size() > 0)
+         {
+            cout << "line: " << line << endl;
+
+            istringstream iss(line);
+            string token;
+            int type;
+            TerrainType terrain;
+
+            for(int x=0; x<width; x++)
+            {
+               getline(iss, token, ',');
+               cout << "token: " << token << endl;
+               type = atoi(token.c_str());
+               cout << "type: " << type << endl;
+
+               switch(type) {
+               case 1:
+                  terrain = TERRAIN_GRASS;
+                  break;
+               case 2:
+                  terrain = TERRAIN_OCEAN;
+                  break;
+               case 3:
+                  terrain = TERRAIN_ROCK;
+                  break;
+               }
+
+               cout << "About to set element" << endl;
+               cout << "x: " << x << endl;
+               cout << "row: " << row << endl;
+               m->setElement(x, row, terrain);
+            }
+         }
+
+         row++;
+      }
+      file.close();
+   }
+   else
+      cout << "Could not open the file" << endl;
+
+   return m;
+}
Index: common/WorldMap.h
===================================================================
--- common/WorldMap.h	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
+++ common/WorldMap.h	(revision 384b7e0e4f6fa3e09e435a55a7c008609faa0ed9)
@@ -26,4 +26,5 @@
 
    static WorldMap* createDefaultMap();
+   static WorldMap* loadMapFromFile(string filename);
 };
 
Index: data/map.txt
===================================================================
--- data/map.txt	(revision 384b7e0e4f6fa3e09e435a55a7c008609faa0ed9)
+++ data/map.txt	(revision 384b7e0e4f6fa3e09e435a55a7c008609faa0ed9)
@@ -0,0 +1,13 @@
+12x12
+2,2,2,2,2,2,2,2,2,2,2,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,2,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,1,1,1,2
+2,2,2,2,2,2,2,2,2,2,2,2
