Terrain generation in video games is a super interesting problem

Arpit Bhayani

Arpit Bhayani

Nov 15, 2024 • 1 min read


Terrain generation in video games is a super interesting problem.

In 2020, I was getting bored and had nothing to do. So, spent one entire week digging into the math that generates terrains programmatically, and the results were out of the world. no exaggerations.

It felt overwhelming, but the more time I spent understanding it, the math became easier and easier. To be honest, all it takes is a bunch of super-imposed cosine functions to generate beautiful landscapes and terrains.

if you want to understand it end to end, I have a super detailed write-up about it covering the math, inner workings, and more importantly the code to generate one.

give it a read - https://lnkd.in/gtuAgUzc source: github.com/klvsh/wallx

This is the beauty of maths and engineering. Exploring things for fun is where the magic happens. Do not limit yourself to some roadmap and checklist, explore what interests you. That’s what makes you a 10x engineer.

enroll for dec cohort, 39 seats left - arpitbhayani.me/course

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses