public void update(GameContainer gc, int delta, BlockMap bmap)throws SlickException
    {
        Vector2f trans = new Vector2f(0,0);
        
        Input input = gc.getInput();
        
        if(input.isKeyDown(Input.KEY_W))
        {
            trans.y -= 0.5f * delta;
        }
        
        if(input.isKeyDown(Input.KEY_S))
        {
            trans.x -= 0.5f * delta;
        }
            
        int mapWidth = bmap.tmap.getWidth() * bmap.tmap.getTileWidth();
        int mapHeight = bmap.tmap.getHeight() * bmap.tmap.getTileHeight();
        
        if(viewPort.getX() + trans.x < 0)
        {
            viewPort.setX(0);
        }else if(viewPort.getX() + trans.x + gc.getWidth() > mapWidth){
            viewPort.setX(mapWidth - gc.getWidth());
        }else{
            viewPort.setX(viewPort.getX() + trans.x);
        }
        
        if(viewPort.getY() + trans.y < 0)
        {
            viewPort.setY(0);
        }else if(viewPort.getY() + trans.y + gc.getHeight() > mapHeight){
            viewPort.setY(mapHeight - gc.getHeight());
        }else{
            viewPort.setY(viewPort.getY() + trans.y);
        }
    }