Page 1 of 1

Problems with Collision

PostPosted: Tue May 26, 2009 2:29 am
by He360
I making a fighting game and even though I set it so that when a character is punched it is destroyed, sometimes the punch command destroys the character and sometimes absolutely nothing happens. I was wondering why is it that the collision event works sometimes but doesn't work every time? What can I do to fix it?

Thanks
HE

P.S. I totally suck when it comes to coding and frankly I don't really understand coding. Thus, if coding is posted, tell me what it is and how it works.I wish to take some programming classes in the future. Thanks again.

Re: Problems with Collision

PostPosted: Tue May 26, 2009 3:19 am
by skydereign
You may need to give more info, but it is possible, if the two actors are already colliding, when you do the punch, it won't destroy the actor, pending on your use of repeat collision. That may be the case, and if so, you would switch the collision. If this is not it, could you post a .ged of the problem?

Re: Problems with Collision

PostPosted: Tue May 26, 2009 11:25 pm
by He360
skydereign wrote:You may need to give more info, but it is possible, if the two actors are already colliding, when you do the punch, it won't destroy the actor, pending on your use of repeat collision. That may be the case, and if so, you would switch the collision. If this is not it, could you post a .ged of the problem?



I went back and took off the repeat and it worked for some. I'm going to work through my game and see if it works for all. What you said might be how I solve the problem. Also, that's a good idea what you said. I'm going to try posting my game sometime soon just so others can see how I made my game and how I can improve it.

Thanks,
HE

Re: Problems with Collision

PostPosted: Wed May 27, 2009 12:22 pm
by DST
There was a debug mode for Mortal Kombat Trilogy on the PSX (i think that was the right version) that would cause the game to show you attack and defend zones. I couldn't find a snapshot of that cheat, but i made a mockup version for here.

It gives a real insight into how they programmed that game, and a good one to look at because MK 2, 3 had some excellent fighting physics. I can see that using attack/defend zones would give you great control over the fighter interaction.

mkzones.jpg


You can't punch my hand!

A lot of that old hardware did not support sprites that size - this means that many fighting games characters were made from multiple sprites. This also would lend itself to decisions about what body part was in attack mode, if any, and what body part it struck. The point is, few if any multi-zone fighting games used a single object for a player. Most of the games that did (like double dragon) did not have zone-specific attacks, but just different animations for what was basically a recycled punch.

Synchronizing the parts was probably a challenge at first, but i'm sure they came up with good methods and reused them. Especially notice how many versions of street fighters capcom made - they liked to reuse their system!

Re: Problems with Collision

PostPosted: Tue Jun 02, 2009 11:59 am
by factorman2
I had this problem in GM, only I quit on that one, but This is GE, The boxes are a good idea, they can probably be made with some kind of region.