RetroBASIC
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
RetroBASIC ReadOnly Archive
Home
Help
Search
Login
Register
RetroBASIC
»
Retrogamecoding(.org)
»
EGSL
»
collision args explanation please?
« previous
next »
Print
Pages: [
1
]
Author
Topic: collision args explanation please? (Read 2012 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)
Logged
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.
Logged
GEEK
Guest
Re: collision args explanation please?
«
Reply #2 on:
November 06, 2013, 05:26:29 PM »
ok, thanks for your help!
Logged
Print
Pages: [
1
]
« previous
next »
RetroBASIC
»
Retrogamecoding(.org)
»
EGSL
»
collision args explanation please?