in the videos I saw they draw a whole image but I'd like to draw only a part of a picture.
In Notch's live he uses only 4 colors in a tile and colors it so it's not good for me.
So I load a picture:
image = ImageIO.read(Game.class.getResourceAsStream("/icons.png"));
And I think I can't do what Notch made because it works only with 8 bit:
pixels = image.getRGB(0, 0, width, height, null, 0, width);
And I need somehow to make a function which gives the tile e.g. getTile(int column, int row);
And then draw it somewhere
I don't know if it's better to make a new function to render 1 tile and call it in the loops or just simply make a function which draws all the background tiles.
edit: I think I found but I'm didn't try it