Collision sprites help

SGDK only sub forum

Moderator: Stef

Post Reply
Cristiano Sword
Interested
Posts: 19
Joined: Mon Jul 03, 2017 2:23 pm
Location: Sao Paulo -Sp
Contact:

Collision sprites help

Post by Cristiano Sword » Thu Nov 22, 2018 2:25 pm

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
The Mega Drive Will Never Die In Our Hearts.

Project Leyria RPG for Sega Mega Drive / Genesis
https://gendev.spritesmind.net/forum/vi ... php?t=2728

Stef
Very interested
Posts: 2993
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Collision sprites help

Post by Stef » Thu Nov 22, 2018 3:09 pm

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.

Cristiano Sword
Interested
Posts: 19
Joined: Mon Jul 03, 2017 2:23 pm
Location: Sao Paulo -Sp
Contact:

Re: Collision sprites help

Post by Cristiano Sword » Thu Nov 22, 2018 7:47 pm

OK. I understand, so I'm putting the structure and it does not work ........ kkkk
Thank you for answer Stef :D
The Mega Drive Will Never Die In Our Hearts.

Project Leyria RPG for Sega Mega Drive / Genesis
https://gendev.spritesmind.net/forum/vi ... php?t=2728

Stef
Very interested
Posts: 2993
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Collision sprites help

Post by Stef » Thu Nov 22, 2018 9:27 pm

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:

Miquel
Very interested
Posts: 478
Joined: Sat Jul 30, 2016 12:33 am

Re: Collision sprites help

Post by Miquel » Thu Nov 22, 2018 9:41 pm

It's just four compares if rectangles, or two if circles. Check Internet there are billions of examples.
Help. Spanish TVs are brain washing people to be hostile to me.

Post Reply