View Single Post
Old 21 September 2017, 21:12   #1
Brick Nash
Registered User

Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 201
Writing custom collision code advice

Just want an opinion to see if this is worth pursuing.

I've got my Double Dragon port running nicely now and I have an enemy who follows my player around the screen and it's all animated using my own custom animation player.

I'm about to get into the combat and I was thinking that the built in bob collisions might not be very good as for a beat em up as you only want a hit to be registered when a certain piece of say, an arm, meets an enemies upper body and not the whole bob.

I had the idea of drawing boxes when the player punches to get an idea of coordinates which I could use for a punch hitbox. Amos will draw a box around the place where I want the collision to go, then do the same for the enemy's upper body.

I'd then take those coordinates and code in that if the enemy's body box enters the coordinates of the punch box on the exact frame of the punch then that's a hit.

It's only theory so far and I think it'll be a lot of work, but I've tried the box drawing and it really works to get a visual on the numbers.

Do you think this is worth pursuing? I thought about having an invisible collision object but I'd like to limit the amount of stuff going on in the screen as at the moment the game only runs smoothly with a 68020.

Thanks, any advice will be welcome!
Brick Nash is offline  
AdSense AdSense  
 
Page generated in 0.03918 seconds with 11 queries