+ Reply to Thread
Results 1 to 5 of 5

Thread: Tool to create 1 pixel border around tileset images

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    356

    Default Tool to create 1 pixel border around tileset images

    Does anyone know of a tool or plugin that will insert a 1 pixel border around tiles in a tileset pnf file. I have a 350x450 png file with each tile being 50x50 in size. I need to have a black 1 pixel border around each tile for the game engine I am using. Short of does this manually is their a tool or photoshop plugin that will do this.



    Thanks
    Stanley D. Chatman
    Golden Doodle Games
    http://www.goldendoodlegames.com

  2. #2
    Senior Member
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    258

    Default

    What sort of engine is this for? Can you do it while loading, rather than on the files?

    I generally prefer doing that sort of stuff in the loading process, as it often depends on video settings, quality settings, engine implementation details and things like that. Borders and the like generally belong in "engine quirks" domain anyway, so it's nicer if all of it can be kept in the same place - in the engine.
    David Olofson - Free/Open Source developer and aspiring indie game developer
    Olofson Arcade
    http://olofson.net

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    356

    Default

    This is for the Android platform and I am using the AndEngine. It has a Api extension for reading in tmx files created with mapeditor (http://www.mapeditor.org/). The issue is that if you have just a regular tilemap it appears to create these 1 pixel artifacts while scrolling. The work around for the moment is to create/modify your tileset to include this border.
    Stanley D. Chatman
    Golden Doodle Games
    http://www.goldendoodlegames.com

  4. #4
    Senior Member
    Join Date
    Mar 2008
    Location
    Gainesville, Florida
    Posts
    794

    Cool

    Quote Originally Posted by stanchat View Post
    Does anyone know of a tool or plugin that will insert a 1 pixel border around tiles in a tileset pnf file. I have a 350x450 png file with each tile being 50x50 in size. I need to have a black 1 pixel border around each tile for the game engine I am using. Short of does this manually is their a tool or photoshop plugin that will do this.



    Thanks
    Look into Image Magick. I use the command line tools to do this type of processing all the time.

    It might take a little googling to get what you want, but it will do this.

    First, you'll need to tell Image magick (mogrify) to split up the image into tiles

    http://imagemagick.org/Usage/crop/#crop_tile

    Then recombine them with a +1+1 border
    -James
    Haunted Hotel I, Haunted Hotel II, Jane Croft

  5. #5
    Senior Member
    Join Date
    Aug 2005
    Location
    Southern California
    Posts
    137

    Default

    Photoshop actually has what's called a Batch Process. You record a series of events on one image, save the process and then you can reuse that exact series of events on specified files very easily in a few steps.

    This article is from 2002, but it pretty much explains what you have to do to get it to work: http://www.creativemac.com/2002/04_a...ls/psbatch.htm

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts