@Override
    public void init(GameContainer container) throws SlickException
    {
        grassmap = new TiledMap("data/40X40Map.tmx");

        player1 = new Player(Username,35f,35f*3);
        
        Tinput = new TextField(container, container.getDefaultFont(), (int)chatx,(int)(chaty+chat.getHeight() + 5),(int)(chat.getWidth()),20);
        Tinput.setMaxLength(25);
        
        ArrayList<Object> polygons = new ArrayList();        

        
        for (int xAxis=0;xAxis<grassmap.getWidth(); xAxis++)
        {
            for (int yAxis=0;yAxis<grassmap.getHeight(); yAxis++)
            {
                int tileID = grassmap.getTileId(xAxis, yAxis, 0);
                if (grassmap.getTileProperty(tileID, "blocked","false").equals("true")){
                    boolean added = polygons.add(new Rectangle(xAxis*SIZE,yAxis*SIZE,SIZE,SIZE));
                }
            }
         }

        polygons.trimToSize();
        walls = new Rectangle[polygons.size()];
        for(int i = 0; i< walls.length; i++){
            walls[i] = (Rectangle)polygons.get(i);
        }

        mapw = grassmap.getWidth()*grassmap.getTileWidth();
        maph = grassmap.getHeight()*grassmap.getTileHeight();
        
        new InputThread ().start ();
    }