A89: Re: Landscape algorithm?


[Prev][Next][Index][Thread]

A89: Re: Landscape algorithm?




I made a routine the other day, I was interested when the topic came up.
I wasn't telling first, but I felt I needed to after seeing all stange posts
here. (like why 2d couldn't have caves and overhangs. It all depends how you
define it. what you, who critisized that doesn't understand, is what is counted
as the ground. the ground is that 1D line between black and white.)
It is very simple and unscientific, but It generates quite nice landscapes.
here is some previews: http://alh.dhs.org/ti89/screens.zip (pcx format)
What they need is fill routine, wich I have only half coded. It will work like
that, that it starts on every line from the left, and if the first pixel is
black, start to fill, until it hits a black to white edge, and then stop until
itt finds a white to black edge and then start again. this will create some
caves to. (holes).
Tell me what you think, and if anyone is interested.
It is, as I said, very unscientific, and is not very controllable. And as you
will se, if you look closely, it has a problem with uphills (counted from the
left) :)  But they look quite ok anyway.

//Olle


Follow-Ups: References: