|
-
May 24th, 2000, 09:06 PM
#1
Thread Starter
Fanatic Member
I'm trying to generate a terrain on a 40 x 40 grid. There should be three mountains, which i'll color yellow, and then gradually change to white as the altitude decreases. Can someone please try and explain to me how I can do this. I read a whole lot of source code, but it's mostly Java or C++, and it is to do 3D terrains without grids.
r0ach™
Don't forget to rate the post
-
May 27th, 2000, 10:07 PM
#2
transcendental analytic
ACtually terrain generating is a set of algoritms you should make yourself. To make a terrain just declare a byte or integer array.
Here's an example for the altitude:
Code:
For y=0 to 40
For x=0 to 40
terrain(x,y)=int(rnd*5+abs(20-y)/2)
next x
next y
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|