# Which hittest

**URL:** <https://forum.kirupa.com/t/which-hittest/314778>\
**Category:** Uncategorized\
**Created:** [October 8, 2010, 10:57am UTC](https://forum.kirupa.com/t/which-hittest/314778 "2010-10-08T10:57:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://forum.kirupa.com/u/jagguy)\
**Post date:** [October 8, 2010, 10:57am UTC](https://forum.kirupa.com/t/which-hittest/314778/1 "2010-10-08T10:57:12Z")

</div>

I have learnt some hitTest methods and I dont know what is best for games as in performance wise. There are so many collision tests and I am not sure what is quickest or slowest.

I have a player image which takes on many images like walking that I move with keyboard.  
I use bitmaps and test bitmapData using Bitmapdata.hitTest.  
I want to test against an enemy image where it again is an animated image.

My idea is to test the player image and enemy image with a simple rectangle test to see if they overlap and if they do then do a points array test on the image to see if any point hits on a pixel test.

I have read hitTest ,HittestPoint and Hittest with bitmapdata,spriteMovieClip, and testing bitmapData with rectangles, points or another bitmapdata.

For a game is/is not acceptable?
