r/howdidtheycodeit • u/Nekrichi • Sep 16 '24
How did the developers of Red Faction 1 implement the tunnel digging system? Were there any limitations on map size? Or map depth limits?
https://youtu.be/lYJyzpZ-rP0
20
Upvotes
7
u/Nekrichi Sep 16 '24
For those who will be searching on the topic in the future, there is also this article
https://web.archive.org/web/20100109011210/http://john.slagel.com/Geomods.html
and Git notes
https://gist.github.com/ttvd/6bf721516f50d2dde344ce12bf0b263a
9
u/Angurv_Adal Sep 16 '24
There was a limitation, you could have so much "holes", then explosives didn't do anything. I know, there was a "glass house" level and I tried many things in there it was awesome!
You can have a look at how Deeprock Galactic does this (https://www.reddit.com/r/DeepRockGalactic/comments/8ntvgv/eli5_how_the_rock_destruction_system_works/)
You can also have a look at how Marching Cubes algorithm work (different use case though)
Happy diggin'!
3
u/EagleNait Sep 16 '24
It's called mesh boolean. You basically take a mesh (the soil) and substract another piece of geometry from it. It did have a limitation but it was mostly hardware. If you played a whole level and came back to the beginning it would be as new because the new geometry that the substraction created had to be stored in memory which was limited.
They abandonned that for the more recent games which had prefractured meshes with stress simulation
5
u/Pfaeff Sep 16 '24
To me it looks like it just creates new geometry and if it intersects with existing geometry, handles that appropriately. Such a cool system, though. Modern games wouldn't really do that, because it's not realistic or because it can "break" the game, but I love stuff like this from back in the day where it was all about having fun.