Settings

Theme

Programming terrain from scratch using C++ and OpenGL by Shamus Young (2006)

shamusyoung.com

107 points by pathless 2 years ago · 24 comments

Reader

tombh 2 years ago

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

herodoturtle 2 years ago

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

  • taneq 2 years ago

    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. :)

baruz 2 years ago

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

Simon_ORourke 2 years ago

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.

fredthedeadhead 2 years ago

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

ricree 2 years ago

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

  • pathlessOP 2 years ago

    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.

    • cptnapalm 2 years ago

      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.

  • m_eiman 2 years ago

    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/

  • rkachowski 2 years ago

    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.

  • ozarker 2 years ago

    Man that’s a blast from the past

layoric 2 years ago

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!

zootboy 2 years ago

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...

jheriko 2 years ago

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...

  • thom 2 years ago

    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.

  • drekipus 2 years ago

    First make one little square,

    ...then draw the rest of the owl

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection