   expanding a 2d map (smoothly)
  hey! I am creating a 2d world at the moment with three levels of magnification. WorldRegionLocaleach World square contains X x Y Region squareseach Local square contains X x Y Local squaresI currently have a nice looking world going and I am trying to make the Region and Local maps not so blocky.What are some methods I could use to go about doing this?I have divided up the world into different regions based upon their type. I was originally thinking of outlining the entire regions to create shapes and do something with them but then thought it would probably be easier if I divide up each world square into 0.0 to 1.0 X 0.0 to 1.0 and then just move the 4 corners in to some point or leave them at the edge if that square spills over into it's neighbor. I was wondering what other options are available to me because I am sure this problem has been solved, maybe not as much in 2-d games, but definitely with graphics.world_map.png[Edited by - polit on April 25, 2009 3:48:53 PM]
  If you are talking about image quality, like you are seeing too many pixels, then the obvious choice would be mipmaps.If you mean the edges of the 2D tiles stand out too much, I would say really your only choices are to filter the edges or design the tiles in such a way that it is less noticeable.I do not know what you are writing this in, but seeing as how I am currently using OpenGL for my project, the first thing that comes to mind for filtering is a fragment shader.I may be way off though. I don't have much experience yet.   ;  Looking at that screenshot, I would say just change your tileset so that your tile textures aren't so square. Maybe keep the ones you have, but then also have coastal tiles for where the land meets the sea, or transitional ones for where (for example) jungle meets desert.cheers,metal   ;  Sorry, guess I did not explain myself well enough.I have 3 levels of magnification in my gameThe World map:worldThe Region map - each one of these maps consists of 24x24 tiles and each region map corresponds to one of the world map tiles.The Local map - each one of these maps consists of 24x24 tiles and each local map corresponds to one of the region map tiles.You can change the level of magnification (not zooming in or zooming out) by "entering" the current world map square. This causes 4 region maps to be loaded corresponding to the current world map square and the three closest adjacent world map squares:regionYou can see the 4 distinct regions (SW has hills & some green trees, SE has some yellow plants, NW has some yellow plants and some grass and NE has water). I have done some very basic blending of the neighboring region types, but it still looks extremely blocky. Same region but zoomed in closer to the corner of the 4 regions:zoomed regionI am trying to make the actual region map look less blocky and square. It doesn't have anything to do with my tiles or transitional tiles. (and yeah, I do have some shore tiles, but I am going to redraw those so they are not currently in my master graphics - and yeah, I am going to make some transitional tiles... maybe)   ;  For your region map you may want to use a multi-layer tile system. Have one layer be for the basic ground(e.g. grass, dirt, sand, water, etc.). Then for a second layer you use special tiles that have the edges roughly alpha'ed out so they blend with the terrain for things like roads, moutains, lakes, etc. For each terrain on the second layer you'd need atleast 9 tiles per terrain, one solid and the other 8 corresponding to the surrounding edges, plus 5 more, 1 that has each side edged out, and then 4 more that have 1 solid side each and the others partially alpha'ed out so you can place single rows and columns of that terrain. You can get an example of such a tile set if you look up ones designed for RPGMaker.   ;  I don't really understand what I am saying incorrectly, but nobody seems to understand my question.My query has nothing to do with my art, my tiles or transitional tiles. Look at the region map as a whole. You can see 4 distinct regions with different terrainNW has sand(yellow and brown tiles) with some grass and some small yellow plantsNE has waterSW has sand, hills and some green treesSE has sand, and some small yellow plantseach one of these separate region types is the same as the world map tile associated with that region (as you can see in the pink outlined graphic above titled "The World map:")I have done some very basic region blending (which is what I am trying to accomplish, but on a larger scale) - you can see this with the ocean bordering the NW and SE regions (and the eastern side of the SE region and the northern side of the NW region, which both border water)I do not want the entire regions (not the world tiles, or the indivdual tiles) to look like huge obvious squares.Now some of the ideas that I thought of to solve my problem involve shifting the corners of a world map tile to another point within the world map tile (or leaving them in the corners if that region spills over into it's adjacent region), so when I create the region that world map tile's tiles are used only within the 4 corner points - this will mean that instead of squares, there will be differently shaped regions (within the actual square of the entire Region Map)another thing I thought of was to have a + or - offest for each of the edge tiles in the RegionMap (so the first tile on the northern border can be +5 and spill over into the region to the north of it, or -5 and the region to the north will spill over into this region for 5 tiles. the second tile can be -2 and the region to the north will spill over into this reigon for 2 tile)and another idea that I thought of involved demarcating similar world map tiles into separate areas. Then creating a slope using the edges of those areas and using that slope when building a regionmap. ;  Thanks for your all your help and patience trying to decipher my requests- it looks like I am going to be using the basic drunk walk on two edges and a corner (and maybe keep track/ randomize the orientation of that in te world map if certain things look too uniform)I am glad I did not try to implement this until I thought about just doing a drunk walk. So much easier than trying to figure out shapes and whatnot.region2However, if there are any other interesting solutions that people have that could be applied to this problem, I would be happy to hear them!   ;  How are you generating your maps?If you are using something like Perlin noise (or some other fractal noise, or something), you could generate the most zoomed-in level (have the noise function give you values that you translate into which tile goes where). Then the next zoom level out would pick it's tile based on the most common tile in that region, and so on.Basically what I'm trying to get at (my explanation sucks I think) is create the most detailed map level first, and then base the zoomed out versions on some statistics from that detailed level. This'll give you something that is not blocky, but the zoomed out levels will still more or less indicate what the majority of the terrain within that block has in it.However, your drunk walk thing doesn't look bad (does it stay the same if you zoom out and back in, or if you scroll?).   ;  I create everything with random averaging, random expanding of the same elevation/ value to adjacent tiles and random drunk walks.What you described seems interesting - maybe some day in the future I will try to do something like that and see what kind of results I get.Everything is consistent because I create the region terrain based upon the worldtile coordinates multiplied by my starting seed. I just changed this actually, from an extremely bloated and completely unnecessary save file for each region and each local map. I am so glad that I did that too - now I just need to set up a changes-done-file to keep any terrain changes consistent.//world generation (elevation) algorithmworld.randomize(-50,-50,&WMAPTILE::elevation); //(startRange,endRange,value);for(int pix = 0; pix < WMAP_X * .75; pix++){world.genDrunk(WMAP_X,150,150,&WMAPTILE::elevation); //(repetitions, startRange, endRange, value);}world.averagizer((WMAP_X * WMAP_Y),0,&WMAPTILE::elevation); (repetitions, increase/decrease, value);world.smooth(-1,0,-50,150,&WMAPTILE::elevation); (repetitions, increase/decrease, low limit, high limit, value);world.averagizer((WMAP_X * WMAP_Y),0,&WMAPTILE::elevation); (repetitions, increase/decrease, value);world.averagizer((WMAP_X * WMAP_Y),0,&WMAPTILE::elevation); (repetitions, increase/decrease, value);world.setEdge(3,-50,&WMAPTILE::elevation); (#of tiles from edge, set, value);world.smooth((WMAP_X * WMAP_Y * .5),0,-50,150,&WMAPTILE::elevation); (repetitions, increase/decrease, low limit, high limit, value); world.averagizer((WMAP_X * WMAP_Y * .35), 0, &WMAPTILE::elevation); (repetitions, increase/decrease, value);world.setEdge(2,-50,&WMAPTILE::elevation); (#of tiles from edge, set, value);world.averagizer((WMAP_X * WMAP_Y * .35), 0, &WMAPTILE::elevation); (repetitions, increase/decrease, value);world.modify(-10,&WMAPTILE::elevation); (increase/decrease, value);//averagizer gets the average of the surrounding tiles (n,s,e,w; ne,nw,se,sw; or all 8 directions)//smooth sets the surrounding tiles to the tile under focus//randomize sets everything to a random value (unless the range is from -50 to -50, then everything is set to -50)//modify increases or decreases everything by value//setEdge sets the edge of the map to value from the edge to #of tiles from edge//genDrunk picks a random point and randomly chooses an adjacent square for # of repetitions