SUGGESTION: Collision Boxes

Started by Theme, Tue 14/11/2006 16:22:03

Previous topic - Next topic

Theme

I was reading at Ahmet's AGS Fight Game thread. It would be nice if AGS implemented collision boxes. It would be setted to every sprite in a animation and when a hotspot, object, character etc collide with it, it would start an event.


this is from Mugen, it has 2 kinds of boxes, the red one is the attack and blue is the hitable area of the character. In ags case it would be only one.

o/

R4L

Four words, Pixel Perfect Collision Detection. Im sure something could be done with it.

SSH

12


Theme

but edit the boxes yourself for each frame can let you do fighting games properly!
(not only fighting games)
I didn't test the module but I guess it works for the whole object or character, I mean not a specific frame or region of the obj/char.
So if the enemy hit the back of my character while I was executing a punch he wouldn't get hit.

oh, my explanation is little confusing +_+ sorry

o/

Janik

I doubt CJ would add something like this since it's such a specialized request. Perhaps AGS is not the ideal environment for a fighting game...

If you define the box sizes manually (say reading off the positions in photoshop), you could then make a module which would know what boxes are where on each frame. It would be a bit of typing if you have a lot of frames, but possible.
Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

Kweepa

You could save the frames in two pieces - the hittable part and the attack part. You would just need to keep two characters in sync, one for the hittable part and one for the attack part. Then use the module to test the attack part against the other character's hittable part.
Still waiting for Purity of the Surf II

Pumaman

Realistically I don't think this is something that I'd add to AGS, because of its rather specialized nature. As people have pointed out, you could do something similar yourself in the script, albeit more work to achieve.

R4L

Couldn't you do something with rawdraw features and the PPCD module? I agree that this shouldn't be implemented into AGS, but a module would be nice.

Shane 'ProgZmax' Stevens

Besides, you can create your own bounding boxes around sprites by doing simple collision tests.  Check out the OROW game Blackmail in Brooklyn I made using 100% Rawdraw code (including dialogue) for an example.  I never had a chance to clean it up though so it still has a few bugs I never got to fix.  Background by scotch!

http://www11.asphost4free.com/veradinx/blackmail.rar

Quintaros

#10
I'm currently working on a collision box editor in AGS.Ã,  The user defines collision boxes for each frame of a view and the corner coordinates are written to a .dat file.Ã,  Prior to a fight sequence the .dat file is read so that the coordinates can be used for collision detection.



Here's a screenshot where I was testing the collision detection:



Currently the code is specific to my own game but I should be able to generalize it over the weekend so it can be released as a downloadable module.


Theme

wow thats neat quintaros!
I'll give it a try when you release
o/

SMF spam blocked by CleanTalk