# How can I quickly check if my sprite tiles well?

I am trying to create tilemap sprites that tile nicely, but checking how well they tile is really cumbersome.

Ideally, I'd like to have an image editor that shows a layout like this, so I could see if it tiles well without a manual check:

     [img]
[img][img][img]
[img]


What programs can do this, or how can I otherwise make this easier?

• I think you're talking about checking if texture tiling works seamlessly. And gimp at least to my knowledge has a render->map or something function that does that. but not while editing. Otherwise, wally has this feature, but its damn old. (half life texture editor) – v.oddou Oct 16 '15 at 6:19
• amnoid.de/ddsview supports tiled preview of many image formats. And which image editor are you using? I'm sure it has some way of tiling an image. – snake5 Oct 16 '15 at 10:45
• Which editor are you using? It should be possible to hack something together using Photoshops smart objects – PlasmaHH Oct 16 '15 at 17:01
• Set it as your desktop background, and choose the "Tile" option. – user14146 Oct 16 '15 at 18:16
• "What programs can do this" Krita can do this and it even lets you pant while wrapped (see answer below) – darkflame Oct 19 '15 at 13:51

Here's a quick hack that works with any image editor.

If your tile image is called tile.png, create an index.html like this:

<body style="background:url(tile.png) repeat 0 0"></body>


(Thanks @Deryllium for the simpler alternative!)

Open that in a web browser.

Whenever you need to check how well the image tiles, save it, and refresh the web browser.

GIMP's export shortcut is Ctrle and Chromium's refresh shortcut is Ctrlr. The e and r are adjacent on a QWERTY, so this is pretty fast to do.

• Very inventive! You can also make the HTML simpler by using <body style="background: url(tile.jpg) repeat 0 0;"> – driima Oct 16 '15 at 11:31
• You can also add <header><meta http-equiv="Refresh" content="2"></header> right before the <body> to make the page auto-load every 2 seconds. – Shivan Dragon Oct 16 '15 at 13:36
• Or, if you were so inclined, you could go deeper and set up a tool like grunt or gulp to watch for changes and live-reload the browser when you make them. – Seiyria Oct 16 '15 at 13:52
• @Kroltan ddsview reportedly has a dedicated "tile view". GIMP's flood-fill tool can read from the clipboard, which is also fast to test with with. – Anko Oct 16 '15 at 22:33
• @Anko True, but my point was for an actual, editable, and fully functional tiled view. These tools make it faster, but not a seamless process (unintentional pun). – Kroltan Oct 16 '15 at 22:35

Using photoshop or GIMP, you can use the offset command. If you are working for say a 100x100px image, you can offset it 50px in each direction, and the seam where the image tiles together will be displayed in the middle of the image.

• As an added bonus, now the seam is right in the middle of the image, for quick and easy editing! – Cort Ammon Oct 19 '15 at 6:38

Krita has a feature that allows you to edit tiling textures and see the changes update live. By pressing the W key, it enables wrap around mode, which makes this possible. A youtube video of this feature in action is available here. (feature is enabled at 0:12)

• This deserves more upvotes. Its a bit of software that does exactly what is asked for in one button press. Better yet, it also lets your painting to wrap around too - which is almost certainly going to help anyone making seamless textures. You should also point out Krita is free and can be downloaded; krita.org/download/krita-desktop – darkflame Oct 19 '15 at 13:47
• +1 If someone has the same question, this is the first answer they should see. "What programs can do this?" "Krita". – Jibb Smart Oct 19 '15 at 13:54

Make your tile a tiled wallpaper on you desktop. Super easy and no coding or extraneous software.

• +1 This works spectacularly well on Linux with inotifywait -m -e modify --format '%w' tile.png | while read file; do feh --bg-tile "\$file"; done running. Just save the image; wallpaper changes immediately. Also works with multiple files specified in addition to tile.png. When I don't need fullscreen, this rocks. – Anko Oct 18 '15 at 22:59

If you want to test multiple images, it may help to have an mini webapp based on Anko's answer. This will let you drag images onto the page to let you test them in quick succession:

window.addEventListener('load', function() {
// Accept the drag
event.preventDefault();
});

// Prevent page redirect
event.stopPropagation();
event.preventDefault();

// Set background image
document.body.style.background = 'url(' + e.target.result + ') repeat 0 0';
document.body.textContent = ''; // Remove instructions
};

});
});
html, body {
width: 100%;
height: 100%;
box-sizing: border-box;
}

html {
border: 2px dashed black;
}

body {
}
<p>Drag an image here</p>