Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / need guide for collide animation

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 6th Mar 2015 00:18
Hi.

I want add a simple fight in my game. I have a character that have box and kick animation.If I'm not mistaken for 3d models we can attache a object to kick or hand and check if kick animation or box animation is playing and attached object collide to enemy reduce (health, live,....).
but in 2d games I don't know how can check kick or hand is collide to enemy.

Please Guide me.

Thanks.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 6th Mar 2015 06:31 Edited at: 6th Mar 2015 06:38
Hi Bhedad, in 2D there are 2 ways you can use:

1) Make an array of frames for the animation. In this way you must calculate manually the positions.

or

2) Paint 2 sprites, upper you can paint the main and under the copy, painting the copy red or green for the various part of the body... and check the collisions on their colors. In this way you can check also kick to head or punch in the leg.

I prefer the 1st to save memory and loadings, but if you want a perfect collision detect, use the 2nd.

I hope i explained what i mean

Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 6th Mar 2015 16:01
Thanks xGEKKOx.

can you show me an example for 1st part?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 6th Mar 2015 16:05
Knew that was coming! Lol.

V2 T1 (Mostly)
Uzmadesign
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 6th Mar 2015 20:25 Edited at: 6th Mar 2015 20:25
I Created a sample from my knowledge for check collision.

Please see it and tell this way is good or can use better way.

Thanks.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-25 18:44:47
Your offset time is: 2024-11-25 18:44:47