GLBasic forum

Main forum => GLBasic - en => Topic started by: Hemlos on 2009-Jun-26

Title: What is faster? Sprcoll() or Boxcoll()
Post by: Hemlos on 2009-Jun-26
Which one is faster? Sprcoll() or Boxcoll()?
Title: Re: What is faster? Sprcoll() or Boxcoll()
Post by: Moru on 2009-Jun-26
SPRCOLL does a BOXCOLL first for speed reasons so I guess BOXCOLL is faster.

Edit: Did a little test and yes, Boxcoll and Sprcoll are identical in speed as long as there is no collision, when the edges meet, Sprcoll takes about double as long on my computer.
Title: Re: What is faster? Sprcoll() or Boxcoll()
Post by: Hemlos on 2009-Jun-26
Awesome thanks,
thatll push the PE dynamics engine.

Do you know of a faster way to do this calculation?
Maybe with inline?

Im going to make my own detection with GLBasic, getspritesize embedded, and some if{}+=-thens
Ill call it PIXELSPRCOLL()