Using Marching Squares for Tile Placement
If manually matching perimeter pieces in your tile based game is too tedious, then let Marching Squares help you make levels. Starting at a basic blocky tileset, this tutorial walks each step to make smooth and seamless transition tiles automatically assemble.
While written with beginners in mind, even experts might pick up a trick or two. I've extracted the essence of Marching Squares to create a flexible and fast implementation using only the nature of the numbers: It doesn't use an intermediary lookup table or even a single conditional statement (no if/then needed), so this solution is a prime candidate for GPU acceleration.
An HTML5 demonstration of the algorithm is included as a hands-on example to show how the metadata directly affects the tile placement. (Oh, it scrolls with the other mouse button -- that's not as 'discoverable' as I'd like...)
Though its a simple topic and quite a thorough write-up, I'll check in periodically to answer any questions while my code's compiling.
Posted May 20, 2013, 2:43 PM UTC
Sorry but could not open the site... "Oops! Google Chrome could not find blog.project-retrograde.com"
I looked at the cached copy but its hard to read... :(
Edit: Works now and a great demo and article!
Hm, it loaded fine for me just now. Might've been a server hiccup at the time you tried?
I tested the links and looked in the server logs. ::shrug:: Looks OK on this end. Anyone else having an issue? Could be intermittent PEBKAS - Problem Exists Between Keyboard and Server. The web is a fickle mistress...