💦 CREATE AND FUCK YOUR OWN AI CUMSLUT 🔥 TRY NOW ♥
Create AI Cumsluts 💦
February 28, 2015

Marching Squares 4

Thanks to your support, my fourth Marching Squares tutorial is here!

We start with refactoring some code, which is something that you'll probably do many times as a programmer. So it makes sense to include it in a tutorial, right?

After that's out of the way, we proceed to add some depth to our surface, by adding walls. This involves adding a new mesh, doing some different caching, connecting cell edges, and adding normals.

Besides that, this is also the first new tutorial that uses the new layout. It is printer-friendly, and also includes a PDF download link at the bottom of the page.

http://catlikecoding.com/unity/tutorials/marching-squares-4/

Comments (2)

D
Daisy · March 2, 2015

Ooh! I've been trying to shoehorn physics in by blindly mapping the vertices of Step 2 onto PolygonCollider2D's. It works fine at low resolutions, but maxes out at around 32x32 tiles. But hey, deciding which tiles need colliders at compile time (by mapping your walls to EdgeCollider2D's) will probably be much more efficient.

C
Catlike Coding · March 3, 2015

It may well be. Though if you're limiting yourself to static geometry you could run other mesh simplification algorithms too.