title: how to scroll my map in java?
body: <p>Firstly, happy new year all.</p>
  
  <p>Ive got a</p>
  
  <pre><code>    int[] map = new int[2550];
  </code></pre>
  
  <p>and in that array I place the id of a block at that pos, so for example if the top left block in the map has a id of one</p>
  
  <pre><code>    map[0] = 1
  </code></pre>
  
  <p>Now I'm trying to think how I would scroll my map now, as I render the map like so - </p>
  
  <pre><code>  for(int y = 0 ;y &lt; current.height;y++){
  for(int x = 0 ; x &lt; current.width;x++){
      Block block = current.getBlock(x, y);
      g.drawImage(block.texture, x * 30 , y * 30);
    }
  }
  </code></pre>
  
  <p>How would I scroll the map? to make it so for example the block that was at 0,0 is now at 0,1 or whatever. Thanks for the help.</p>
  
  <p>Edit: Im using LWJGL and slick2d to do my rendering and stuff, so I cant use Swing or AWT.</p>