Page 1 of 1

Collision Box

Posted: Thu Mar 15, 2018 11:54 pm
by cloudstrifer
Hi!
Is there any way to create a collision box without using a sprite?

Thank you!

Re: Collision Box

Posted: Fri Mar 16, 2018 10:16 am
by Stef
Nothing prevent you to use the 'Box' structure and do whatever you want with it =)

Re: Collision Box

Posted: Fri Mar 16, 2018 4:08 pm
by cloudstrifer
Sorry for asking too much.

But please. Could you show me an example?

Where can I find the SGDK documentation?

Thank you!

Re: Collision Box

Posted: Fri Mar 16, 2018 4:35 pm
by Miquel
I think he wants to display a box corresponding to the bounding box into the screen.

On MD you can only display things through sprites or tiles, to display a box with tiles is doable but very hard and will invalidate any work you have done before with them. So only remains doing it with sprites.

Another possibility is to have you game also running in you favourite OS.

Re: Collision Box

Posted: Fri Mar 16, 2018 4:45 pm
by cloudstrifer
I would like to do something like the hitboxes and hurtboxes of Street Fighter V, and that they could be visible (for testing) or invisible.

Image

Re: Collision Box

Posted: Fri Mar 16, 2018 5:00 pm
by Miquel
Yeah! is what I thought you meant.

The only viable option is sprites or to make you code run also on Windows/Linux/Mac/Whatever.

Re: Collision Box

Posted: Fri Mar 16, 2018 8:21 pm
by cloudstrifer
Thank you!

Re: Collision Box

Posted: Fri Mar 16, 2018 11:20 pm
by Stef
Oh sorry, i though you just wanted collision box in code ^^
So yeah as Miquel said, no other way than wasting some sprites for that.

Re: Collision Box

Posted: Sat Mar 17, 2018 12:59 am
by Sik
If you want something relatively cheap, you can do like Sonic Pocket Adventure's debug mode, where only the corners are shown. You need four sprites for this (one for each corner, same graphic but flipped over in each of them), but they can easily adjust to any box shape as long as the box isn't tiny.

Re: Collision Box

Posted: Sat Mar 17, 2018 7:07 pm
by cloudstrifer
Thank you!