Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411504 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 04:13:58 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Infographic on how to make non-repeating textures with tiles
Pages: [1]
Print
Author Topic: Infographic on how to make non-repeating textures with tiles  (Read 922 times)
quixoticproject
Level 0
**


just looking around


View Profile WWW
« on: January 23, 2015, 02:54:44 AM »

Hey everyone,
for our current game Blockadillo we used a variation of the wang tiles technique to create interesting backgrounds, walls and other stuff. I made a little infographic on how we did that and thought you might be interested!

You can find the whole thing here.

Below is a little teaser:


« Last Edit: January 23, 2015, 03:00:33 AM by quixoticproject » Logged

bdsowers
Level 3
***



View Profile WWW
« Reply #1 on: January 23, 2015, 10:29:39 AM »

This looks good. Is your algorithm actually using color matching like your infographic suggests, or are you just adding little metadata bits to each tile? it seems like a color matching approach would be needlessly complex.
Logged

quixoticproject
Level 0
**


just looking around


View Profile WWW
« Reply #2 on: January 23, 2015, 12:45:43 PM »

In my code I have an array which contains which color each side of each tile has. Color is encoded as a simple int. Even a boolean would be enough in this case since our tilesets uses only two colors.

This information is then processed at the start of the level editor into three arrays: rightNeighbour, topNeighbour, topRightNeighbor which are basically look up tables that are used to query potential fitting neighbour tiles.

Since we use this algorithm only at level creation time I never worried about performance, beauty or other things. It just works Wink
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3 on: January 23, 2015, 01:05:36 PM »

This is a really nice idea!  Would work especially well with rotatable and colourable tiles, I think, to explode the number of possible combinations.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
bdsowers
Level 3
***



View Profile WWW
« Reply #4 on: January 23, 2015, 02:53:05 PM »

Quote
This is a really nice idea!  Would work especially well with rotatable and colourable tiles, I think, to explode the number of possible combinations.
Indeed, though I think you'd need to attach more metadata for rotation & colorization to work well. Like if Tile X gets colorized to color Y, its sides then become colors A,B,C,D. Or if you do a rotation, you may want to change the 'colors' instead of simply rotating them, depending on your tiles.

Or maybe I'm just overthinking it. That's a possibility. Smiley
Logged

BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #5 on: January 23, 2015, 03:46:30 PM »

I think part of the appeal of wang tiles is you need a fairly small number of tiles before you are guaranteed a tiling. Doing every combination of tiles misses this aspect, though I think it was a good tutorial.
Logged
oahda
Level 10
*****



View Profile
« Reply #6 on: January 24, 2015, 06:04:31 AM »

Useful!
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic