realbasic-games
[Top] [All Lists]

Re: Doc's on box to box

To: realbasic-games at lists dot realsoftware dot com
Subject: Re: Doc's on box to box
From: Eric Richards <erockus at earthlink dot net>
Date: Sun, 27 Feb 2005 20:51:40 -0600
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20050226180035 dot 4207B75F2F5 at lists dot realsoftware dot com>

I don't know of any documents, but box/box tests in 2D are pretty trivial. Assuming that b1 and b2 are the bounds objects of the two sprites, each with left/top/right/bottom properties. Then, they're overlapping if

  b1.right > b2.left and b1.left < b2.right and _
  b1.bottom > b2.top and b1.top < b2.bottom



Would this apply when using canvas and tile based?

Right now the tiles/objects that the character can run
into have no properties. It just - ok look at each layer of the map
and draw tiles according to the data. Layer 3 holds only that which
you can not pass. Now layer 3 is just drawn like the others but is checked
to see if there is an object in the way.

Now would I need to provide properties for the "objects" in layer 3?

Thanks

Eric


_______________________________________________
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>