Hacker News new | past | comments | ask | show | jobs | submit login
Programming terrain from scratch using C++ and OpenGL by Shamus Young (2006) (shamusyoung.com)
107 points by pathless 8 months ago | hide | past | favorite | 23 comments



I just finished watching a live-coding session (from 2 years ago) by Inigo Quilez (ex Pixar), where he constructs an entire ray-marched landscape using only maths (mostly SDFs) in pure GPU shader code.

The stream: https://www.youtube.com/watch?v=BFld4EBO2RE

The demo: https://www.shadertoy.com/view/4ttSWf


iq is a genius. So is Fabrice Bellard (ffmpeg/qemu/tcc) and Nick Black (notcurses).


This reminds me of NeHe’s OpenGL tuts. That, and a little earlier Denthor’s mode13h tut, changed my life. Good times.


Ahh, the old days! I learned a bunch of OpenGL off NeHe. I even won one of the demo competitions. :)

Another great one for general graphics/demo/simulation coding was "The good-looking textured light-sourced bouncy fun smart and stretchy page" (https://web.archive.org/web/20031218105827/http://freespace....)

And for landscapes in general, Ken Musgrave did some awesome work although I'm having trouble digging up the more technical stuff he used to post.

And then there was software like Terragen and Bryce could produce some great rendered landscapes. It's getting me all nostalgic. :)


I loved this series and his procedural city. His death was a great loss for the recreational programming and gaming community.


Oh I just clicked who this was. I followed that tutorial through years ago, it was fantastic.


I remember being blown away by something similar on the venerable Commodore Amiga in the early 90s. Can't remember the name of the app, but you'd adjust a few parameters and line by line a terrain may would appear.




I had that or something very similar on our old Windows 95 machine. I spent quiet a bit of time flying around


I really miss reading new blog posts and series from Shamus :(


I also enjoyed his similar series on generating a procedural city: https://www.shamusyoung.com/twentysidedtale/?p=2940


That was an amazing read as well. I really wish the internet had more game-programming-for-beginners or whatever you might call them style microblogs.

Shamus will be missed! RIP.


I didn't know he had passed away. While not what's being discussed now, DM of the Rings remains one of the funniest comics I've ever read.


I ported his code to a macOS screen saver back in the day, but I see I haven't updated it since macOS 10.6… I guess the chance of it working on a Apple Silicon Mac isn't anywhere near 100% :P

https://emage-software.com/


A sort-of port for the wab can be found here: https://art.muth.org/pixelcity.html


Oh wow, that came out when I was in university. I often think about that series of articles and the little tricks and techniques he used to simulate the feeling of a city at night - almost entirely via artifice and very little intentional design. I always found these dirty little tricks in graphics super interesting.


Man that’s a blast from the past


I don't think it was this tutorial, but something similar I did around 2006 after completing a year of games programming study. Generating noise as height maps, mapping height ranges for texture blending and creating these terrains had me hooked on programming. Sadly, web development was just a lot more lucrative, so I dropped C++ for C#, and only done games dev as a hobby every now and then. I love these kind of tutorials though, same with Open GL NeHe, Game Programming Gem books, GPU Gems, etc. Good times!


Yet another "Hey, this reminds me of a similar thing" contribution: Sean Barrett (of the STB header-only libraries fame) has a series of coding livestreams going over his OpenGL voxel rendering library and sort of turning it into a game:

https://www.youtube.com/watch?v=kD93nsghj9A&list=PLMkT-w6m06...


its interesting... but i do wonder how we went from planet scale and infinite terrains in the earlier 2000s and late 90s down to "lets just do one little square". granted this looks a lot prettier...


Story and dialogue heavy games did well in the market, and work-intensive art assets like voice acting made it so these couldn’t scale through procedural generation. Ultimately there’s less call for big empty spaces.


First make one little square,

...then draw the rest of the owl




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: