How do I generate terrain like that of Scorched Earth?

Posted by alex on Game Development See other posts from Game Development or by alex
Published on 2011-03-06T11:39:54Z Indexed on 2011/03/06 16:19 UTC
Read the original article Hit count: 312

Hi, I'm a web developer and I am keen to start writing my own games.

For familiarity, I've chosen JavaScript and canvas element for now.

I want to generate some terrain like that in Scorched Earth.

Scorched Earth

My first attempt made me realise I couldn't just randomise the y value; there had to be some sanity in the peaks and troughs.

I have Googled around a bit, but either I can't find something simple enough for me or I am using the wrong keywords.

Can you please show me what sort of algorithm I would use to generate something in the example, keeping in mind that I am completely new to games programming (since making Breakout in 2003 with Visual Basic anyway)?

© Game Development or respective owner

Related posts about JavaScript

Related posts about procedural-generation