Page 1 of 1

Collision sprites help

Posted: Thu Nov 22, 2018 2:25 pm
by Cristiano Sword
Hi guys! It's all good :D
I'm having difficulty using the SGDK collision :(
From what I read in the documentation and I understand it's a Union, but I do not quite understand how to apply it in the code.
Can anybody help me ?
I just want to understand how 2 sprites can collide using this sgdk feature

Thanks in advance

Re: Collision sprites help

Posted: Thu Nov 22, 2018 3:09 pm
by Stef
Unfortunately Collision support is not completed in SGDK, so you have the structure but no method to use it yet :-/
So in the meantime you have to handle that with your own structure and code.

Re: Collision sprites help

Posted: Thu Nov 22, 2018 7:47 pm
by Cristiano Sword
OK. I understand, so I'm putting the structure and it does not work ........ kkkk
Thank you for answer Stef :D

Re: Collision sprites help

Posted: Thu Nov 22, 2018 9:27 pm
by Stef
You can actually use the collision structure of SGDK ut i think it would be more straightforward to design your own, with your own collision code :lol:

Re: Collision sprites help

Posted: Thu Nov 22, 2018 9:41 pm
by Miquel
It's just four compares if rectangles, or two if circles. Check Internet there are billions of examples.