Fanatrick
Member
Marketplace: Link
Itch.io: Link
Imgur gallery: Link
GMGrass is a powerful yet simple-to-use library for creating and rendering awesome dynamic 2D grass/foliage.
- Procedurally generate or define every single blade of grass yourself
- Physically simulated and customizable wind, turbulence and colliders
- Cuttable/regrowable foliage
- High-performance, can handle hundreds of thousands foliage particles
- Cross-platform, written in GML 2.3 and GLSL ES 2.0
- Documented and simple to use plug-n-play library (includes an example)
GML:
// Create
container = new foliage_container(x, y, x + 400, y);
container.verbuffer_begin(); // begin writing to vertex buffer
for(var i = 0; i < 1000; i++) { // add thousand blades of grass
container.verbuffer_add(sprGrassBlade, 0, random(1), 1, random(4), 16, random_range(0.04, 0.08) * choose(1, -1));
}
// Draw
container.render();
Attachments
-
116.7 KB Views: 10
Last edited: