02 October 2017, 20:52 | #1 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Fast(est) method for bounding box collisions?
Hi! What's the fastest way of testing bounding box collisions in BB2? Is there any built in functions for that or do I need to make my own system? I guess there is no short-circuit evaluation going on in BB2 so it might be faster to check for bounding box collisions in multiple if clauses instead of combining them. Grateful for any insight!
|
02 October 2017, 21:09 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
|
I can't comment on the speed, but the RectsHit command might be what you're looking for:
RectsHit (X1,Y1,Width1,Height1,X2,Y2,Width2,Height2) Returns true if they overlap. I love that, in the manual, they actually say "Care should be taken with the pronunciation of this command." |
02 October 2017, 21:17 | #3 |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Thanks! I will try the RecShit command!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SetCol/DoColl-How to test collisions with different sprites against different colors? | Shatterhand | Coders. Blitz Basic | 1 | 12 January 2017 18:51 |
[REQ:ASM] Sprite collisions basics | jman | Coders. Tutorials | 5 | 03 September 2011 00:07 |
Disable Sprite Collisions | DeAdLy_cOoKiE | Retrogaming General Discussion | 4 | 24 March 2006 17:56 |
WANTED: A600 wild weird wicked box - just the box :P | Smiley | MarketPlace | 0 | 23 May 2005 17:51 |
Mon nom est Pond, James Pond ! | RCK | Retrogaming General Discussion | 9 | 12 December 2001 15:20 |
|
|