Sprites/Maps/Graphics

Well;
I’ve got a working map editor which allows me to create mult-layer(Map) levels(Parallaxes). Now I want to create a good usable map for starting my game. How do most people get good tilesets. I’m using gage so each individual tile is a seperate image. I dowloaded some chipsets from rpg-maker, but they seem really small. also is there any programs that will take a single image file(png in the case of a chipset) and break it up into multiple images? maybe I’m rambling. I just don’t know where to start. How does everyone elese do this?

Splitting a large image with tiles into Image objects is something you can easily program yourself. Some psudocode. Handles divide by a fixed tilesize when the tiles are organized in the large file like this.


------------------------
|        |        |         |
|  0,0 | 1,0  |  2,0  |
------------------------
|        |        |         |
|  0,1 | 1,1  |  2,1  |
------------------------


public Image[][] divide(String filename, int tilesize){
   //load the imagefile
  InputStream is = getClass().getResourceAsStream(filename);
  BufferedImage tmpImg = (BufferedImage) ImageIO.read(is);

   int x = tmpImg.getWidth() / tilesize;
   int y = tmpImg.getHeight() / tilesize;

   Image ret[][] = new Image[x][y];

   for (int i=0; i<x; i++)
     for (int j=0; j<y; j++){
       BufferedImage tile = new BufferedImage(tilesize, tilesize, BufferedImage.TYPE_INT_ARGB); //or the type you need
        Graphics2D g = (Graphics2D) tile.getGraphics();
        g.drawImage(tmpImg, 0, 0, tilesize, tilesize, i*tilesize, j*tilesize, i*tilesize+blocksize, j*tilesize+blocksize, null);
        g.close();
         ret[i][j] = tile;
     }
     return ret;
}


The code will not compile or run it is just something written from memory and the x,y offsets are surly wrong, but this gives you an idea how to implement it.

:smiley: Thanks a bunch;
I’ll give it a try and let you know how I make out.