Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm building a 16 bit game for my final project and have completed all the objects and environments, I exported all the images as png files into flash as well as my character, breaking the environment up into background, objects and foreground. I can't however find a simple tutorial explaining how to do bitmap hit testing or another simple way of making my character not be able to move into the objects.

Could someone recommend a simple tutorial or an alternative method of achieving this ?

Thanks in advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
142 views
Welcome To Ask or Share your Answers For Others

1 Answer

Take a look at this great tutorial about using BitmapData.hitTest for collision detection:

http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/

Also, if you are building a flash game I think you should look into using a Flash Game Engine, for example for 2D games, plataformers and such I'd recommend:

Both will help you A LOT with game development specific stuff such as collision detection, user input, etc which should speed up your workflow. Hope this helps!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...