Author Topic: collision args explanation please?  (Read 1820 times)

GEEK

  • Guest
collision args explanation please?
« on: October 31, 2013, 12:17:58 AM »
can anyone please explain how this works?

    sidecoll (x,y,w,h,dx,dy, rx, ry, rw, rh)

and what 'skip' means in this function:

    pixelcoll (image1,ax,ay,image2,bx,by,skip)

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: collision args explanation please?
« Reply #1 on: November 06, 2013, 02:29:54 PM »
Ok first sidecoll. Just assume you have one obejct at x,y with width w and height h. Another object is at rx,ry with width rw and height rh. Now what happens if the first object moves one (or more) pixels to dx (negative values are allowed) and dy. sidecoll tells you where the objects collide, if at all.
"Skip" in pixelcoll means how many pixels pixelcoll should skip calculating since it is a time consuming function. The more pixels you skip the more inaccurate the result is.
BTW, pixelcoll will not be possible in EGSL2, so better don't use this function if you want to port your games later.

GEEK

  • Guest
Re: collision args explanation please?
« Reply #2 on: November 06, 2013, 05:26:29 PM »
ok, thanks for your help!