View Single Post
  #9  
Old 01-26-2002, 04:34 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
May be there could be one that fills levels with
grass and flowers or so, each time you click it places
more random stuff or so

The algorithm for the sand path is like this:
1. check if there is grass/sand where the player clicks,
if not then do nothing
2. place a random sand tile on the mouse position
3. for the tiles near calculate the sand-border tile
depending on the tiles around, like
if (sandn+sandw+sands+sande==2) means two of
the 4 directions north/west/south/east have sand;
then there are the possiblities that sandn+sands==2
(sand in north and south direction) -> place sand,
otherwise place a grass spot corner tile because we
only have the possibililties sandn+sandw==2, sandn+sande==2,
sands+sandw==2, and sands+sande==2 left
That calculation is done for all possible cases.
Reply With Quote