TileMap vs 9-Patch

  • I know how to use TileMap and 9-Patch as individual objects, but I want to know when and where should I use each ?

    For example, I want to make levels like these ones:

    Island Level

    Forest Level

    Rock Level

    Snow Level

    Cave Level

    I want to mention that the levels will have at least 2 layers (one layer with solid objects and one with the background).

    Which one should I use ?

  • Use TileMap if you can

    9-patch is no bad, but too many objects for this.

    Only two TileMap in your project for the entire map.

    You can test this Map : AdventureIslandIII-Area1-1-CoastalClash

    It's an TMX map from TilED Editor.

  • Use tilemaps only for those kinds of levels. 9-patch is more useful for UI windows, resizable rectangles and such.

  • anata

    @Ashley

    Thank you <img src="smileys/smiley1.gif" border="0" align="middle" />

    So is better to use only one TileMap for both layers (one with ground objects and another one with the background sky and clouds) instead of two separate TileMaps.

    Is better to use bigger or smaller Tiles ?

    Also, is there any way to use 2 different textures (low quality and high quality) using the same TileMap ?

    I am designing my game for 720p but if the resolution is bigger, the characters will use higher quality sprites (another set of animations with bigger resolution). Can I do the same with TileMap ?

  • Is better to use bigger or smaller Tiles ?

    Also, is there any way to use 2 different textures (low quality and high quality) using the same TileMap ?

    I am designing my game for 720p but if the resolution is bigger, the characters will use higher quality sprites (another set of animations with bigger resolution). Can I do the same with TileMap ?

    Anyone ?

  • Up <img src="smileys/smiley2.gif" border="0" align="middle" />

    Any way to change TileMap's texture in game ?

  • You're asking a lot of questions about a recently introduced feature.

    Why not just prototype a few scenarios. That way, you'll be able to both provide yourself and the rest of us with the answers.

  • You're asking a lot of questions about a recently introduced feature.

    Why not just prototype a few scenarios. That way, you'll be able to both provide yourself and the rest of us with the answers.

    I already tried but didn't find what I want ... The only way to use higher resolution textures is to create the TileMap at 2x the size I need and set layer's scale to to 0.5 at the start of layout.

    I thought there might be something like this:

    http://stackoverflow.com/questions/13763769/how-to-create-single-tile-map-for-universaliphone-ipad-for-cocos2d

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ashley

    Is there any way to make TileMpas look good on different resolutions except downscaling ? Something like sprites to be able to use bigger resolution textures ?

  • Ashley

    @anata

    @Aphrodite

    The TileMap works great in Chrome, but I can see the grid in Firefox, Internet Explorer, Node-Webkit, CocoonJS and Android Browser (Android 4.0.4 ICS)

    <img src="http://s16.postimg.org/msvu6x4xx/Tile_Map_Bug.jpg" border="0">

    TileMap_Bug.capx

    Is this a bug or did I implemented it wrong ?

  • the grid is a bug.

    I have this with my ati graphic card. Because, all tile are not multiple of tow.

    i use always 64*64 or 32*32 for tiles, never 70*70 ^^

    look at this

    <img src="http://puu.sh/5TGvr/27269e8d91.png" border="0" />

    no grid , and i use 32*32 for all tiles

  • TGeorgeMihai - you have to use the Tilemap object's recommended settings to avoid seams: pixel rounding on, point sampling and letterbox integer scale. Also you've chosen a weird window size which makes it downscale and still shows seams - you should make sure the game is shown at 1:1 scale or larger, not smaller.

  • anata

    Thanks <img src="smileys/smiley20.gif" border="0" align="middle" /> The grid was caused by the resolution of the tile (I've forgot that I have to use multiple of 2). Tried with tiles of 64x64 and worked perfectly <img src="smileys/smiley20.gif" border="0" align="middle" />

    Your game looks great <img src="smileys/smiley32.gif" border="0" align="middle" /> Does it support multiple resolutions ? If yes, what is your method ?

    @Ashley

    Thank you <img src="smileys/smiley1.gif" border="0" align="middle" />

    Yes, I've found about the seams after I "fixed" the tiles resolution <img src="smileys/smiley24.gif" border="0" align="middle" />

    I use a square-ish resolution and Scale Outer in order to maintain the same size of the objects (same scale) in game regardless the orientation of the device. I usually use 720p, but there I used 900p (as a test) especially to be between 720p and 1080p in order to not lose too much quality when upscaling (and downscaling would look great).

    Too bad that TileMap does not work well when downscaling, makes it very hard to use with different resolutions (aspect ratios) <img src="smileys/smiley24.gif" border="0" align="middle" /> ... Even when used on screens with the same aspect ratio, the quality/details of tiles is lost when used on bigger resolution <img src="smileys/smiley6.gif" border="0" align="middle" />

  • i use my hq2x shader for my project.

    All are in 32*32, and the window size is 320*240 ^^

  • i use my hq2x shader for my project.

    All are in 32*32, and the window size is 320*240 ^^

    Great ideea <img src="smileys/smiley20.gif" border="0" align="middle">

    I remember using hqx scaling when I was playing NES, SNES and GBA games on PC.

    You made your hq2x shader yourself ? Is it hard to adapt js-hqx to a C2 shader ?

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)