Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 08:44:10 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsMarching Squares for Automatic Tile Placement
Pages: [1]
Print
Author Topic: Marching Squares for Automatic Tile Placement  (Read 5340 times)
VortexCortex
Level 2
**


Engram Architect


View Profile WWW
« on: May 18, 2013, 09:23:58 PM »


This tutorial explains how to go from basic and blocky to smooth and seamless by using Marching Squares to automatically stitch together tiles.


Starting from the simplest 1:1 tiling system we cook up a few automatic placement strategies and boil down the bits to extract the very essence of the marching squares algorithm.


I've created a simple HTML5 tile placement demo using the algorithm as described, so you can see the Marching Squares in action and peek under the hood at the metadata itself.


This tutorial is targeted at entry level game devs. As such it covers info that many skilled folks are already familiar with, but even experts might pick up a trick or two.  For instance:  Did you know it's possible to implement marching squares without a single conditional ('if / then') statement or lookup table?  Ever thought about using the 'saddle point' solution beyond its problem space to add a bit of variety to all of the tiles?

Being born from TIGS' own Placeholder Graphics thread, the tileset template is free to use in your own implementations.

If algorithms were tools, Marching Squares would be a Swiss Army Knife.  Swedish soldiers shouldn't have all the fun...
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic