gocs / marchingsquares

πŸƒβ€β™‚οΈβΉ This will generate array of marching squares config; just specify 2dmap and its dimensions, and will be given vertices and indexes for ebiten.DrawTriangle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marching squares

Simple Marching Squares implementation in ebiten. Based on Sebastian Lague's Marching Squares tutorial.

image

Basic

This showcases the basic Marching Squares implementation. There are nothing more than just an image.

go run ./cmd/1_basic/main.go

Aggregate

This features a square that can be moved on the marching squares map. To move the square, press and hold Mouse 3 as if you are panning. Aggregate in this context is adding a square with moving functionality on the marching squares map.

go run ./cmd/2_aggregate/main.go

Product

This features the whole marching squares map to be dragged. This also offers the same keyboard input as the Aggregate. Product in this context means dragging functionality on the marching squares map itself.

go run ./cmd/3_product/main.go

Limitations

  • Drawing in Triangles.
  • OpenGL vertex limit

License

MIT

About

πŸƒβ€β™‚οΈβΉ This will generate array of marching squares config; just specify 2dmap and its dimensions, and will be given vertices and indexes for ebiten.DrawTriangle

License:Apache License 2.0


Languages

Language:Go 100.0%