e-ucm / ead

Mokap Platform and ead game engine
GNU Lesser General Public License v3.0
6 stars 8 forks source link

Generate transparency polygons for images automatically #197

Closed manuel-freire closed 10 years ago

manuel-freire commented 10 years ago

A very common use-case is to have to import figures that should have non-rectangular boundaries in-game. We want to generate their polygonal borders to allow easy collision detection & transparency.

This reopens #18, since it is finally a valid use-case for JTS (polygon simplification).

We could build the initial polygon using the marching-squares algorithm. A libre implementation can be found here

RotaruDan commented 10 years ago

Example of how to use libGDX pixmap: shadoq / s3GdxProcTexture.