realbasic-games
[Top] [All Lists]

Re: Dynamic 2D Isometric Terrain

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Dynamic 2D Isometric Terrain
From: Lars Jensen <larsjensen at rcn dot com>
Date: Sun, 26 Jun 2005 11:32:31 -0400
Delivered-to: realbasic-games at lists dot realsoftware dot com
> What I can't seem to layout mathematically is taking in to account other
> tiles in the area that may have already been raised.

I believe you can do this with a simple adjustment to your raising
procedure. If the current procedure is:

  for each successive ring
    nominal height = height of center point - distance from center point
    for each point on this ring
      height of this point = nominal height

then you could alter the last bit to say:

  for each successive ring
    nominal height = height of center point - distance from center point
    for each point on this ring
      height of this point = max(nominal height, height of this point)

I haven't actually tried this, but it's where I'd start. I think you could
extend this to lowering the terrain too, by using max or min in the last
part based on the sign of the displacement of the center point.

lj
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>