Hey everyone, I hope you’re all doing well! I thought it would be cool to try and implement the marching cubes algorithm on Roblox in Lua, and I’m here to share the results! Feel free to take this and learn from it, or use it in a future game idea you may have cooking up!
You can try it out online here: https://www.roblox.com/games/5070286107/Marching-Cubes
Or you can download the place file here (38.5 KB)
Or you can clone the git repository here: https://github.com/Imaginaerume/MarchingCubeCaves
Marching cube caves
A Roblox Lua implementation of the Marching Cubes algorithm, in this case used to generate cool triangular caves and ore veins with Perlin Noise.
Videos and screenshots
Controls
E: Throw light
Q: Throw sticky light
G: Connect grapple to point
Hold right click: reel in grapple
Spacebar: Stop grappling
Learning sources
Sebastian Lague
- https://github.com/SebLague/Marching-Cubes
- “Coding Adventure: Marching Cubes”: https://www.youtube.com/watch?v=M3iI2l0ltbE
Paul Bourke
- “Polygonising a scalar field”: http://paulbourke.net/geometry/polygonise/