If you're like me, you enjoy pushing the boundaries of software applications for fun and profit. In an abundance of that enterprising spirit, I've taken a unique approach to procedural generation using Google Sheets.
I created a Perlin-like noise generator, which I’ve named the "tentpole noise algorithm," relying entirely on cell formulas and MOD functions for pseudo RNG with a seeded approach.
Here's a breakdown of how it's structured:
First Layer - Establishing Tentpoles: The initial setup involves defining high and low points using modulus operations to determine peak positions:This mimics the function of tentpoles, setting the maximum and minimum
=IF(MOD(C$5,$C$1) + MOD($A7,$C$1)=0,IF(MD5(CONCATENATE($C$3,C$5,$A7))>"8",((HEX2DEC(RIGHT(MD5(CONCATENATE($C$3,C$5,$A7)),1))-5)*$C$4),0),0)
Second Layer - Canvas Logic: This layer applies logic to smooth the terrain between the tentpoles, simulating the canvas stretched over them =IF(E9=0,(SUM(IF(D9=0,0,D9),IF(E8=0,0,E8),IF(F9=0,0,F9),IF(E10=0,0,E10))/2+SUM(IF(D8=0,0,D8),IF(F8=0,0,F8),IF(D10=0,0,D10),IF(F10=0,0,F10))/2+SUM(IF(C9=0,0,C9),IF(E7=0,0,E7),IF(G9=0,0,G9),IF(E11=0,0,E11))/4+SUM(IF(C8=0,0,C8),IF(D7=0,0,D7),IF(F7=0,0,F7),IF(G8=0,0,G8),IF(C10=0,0,C10),IF(G10=0,0,G10),IF(D11=0,0,D11),IF(F11=0,0,F11))/8)+5,E9)
Originally designed for terrain generation, this algorithm has been equally effective for simulating environmental attributes like moisture and temperature in my game.Here’s a link to the spreadsheet in case anyone wants to see it in action. https://docs.google.com/spreadsheets/d/172yXQpKp1AeM89RiSsL8...
Once I had this working, I converted the logic to C# and put it into my project, Xyzzya — a platform that merges worldbuilding with advanced AI and procedural generation to create dynamic, living worlds. For more insights into how procedural generation shapes the core of Xyzzya, you can check out our latest blog post here: https://www.xyzzya.com/progress/xyzzya-adventure-mode-recent...
Note: I posted this on reddit over the past weekend, and it was well-received so I am sharing here. Original: https://www.reddit.com/r/proceduralgeneration/comments/1dapw...