MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Rooms, 3D arrays, etc.
- To: mud-dev#null,net
- Subject: Re: [MUD-Dev] Rooms, 3D arrays, etc.
- From: silovic#srce,hr (Miroslav Silovic)
- Date: Thu, 29 May 1997 11:22:16 +0200 (MET DST)
> [Miro:]
>
> :Use pseudorandom function. Here's one I use to generate procedural
> :textures in my renderer:
>
> [code omitted]
>
> Call me dumb, but I'm not understanding your solution. I see what the
> code does, but I don't see how it fits in. Where do the parameters to
> 'irand' come from, i.e. what are they, and how do they relate to the
> x,y coordinates and the stored random seeds used to tweak the landscape?
>
Uuuh, sorry. I forgot that my code is obvious... to me. :)
Here's an example call:
int i[2];
i[0] = x;
i[1] = y;
terrain.elevation = (int)(150*irand(2, i));
(of course, the last is not quite honest, since you need to substitute that
line with fractal noise generator. Look into my renderer at
ftp://maja.zesio.fer.hr/pub/tools/graphics/sart)
Another notice, irand works with n-dimensional noise fields. The first
parameter is the number of dimensions (you want 2), and the other is
pointer to the vector of integer coordinates. Hope this helps. :)
Miro
- Thread context:
- Re: [MUD-Dev] Resets, repops and quests, (continued)
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Jeff Kesselman jeffk#tenetwork,com, Wed 28 May 1997, 12:13 GMT
- <Possible follow-up(s)>
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Thu 29 May 1997, 13:03 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sun 01 Jun 1997, 00:17 GMT
- Re: [MUD-Dev] Rooms, 3D arrays, etc.,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Tue 03 Jun 1997, 08:14 GMT
[ Other Periods
| Other mailing lists
| Search
]