在AS3位图hittesting [英] Bitmap hittesting in AS3
问题描述
我要建一个16位的游戏,我的最后一个项目,并已完成了所有的物体和环境,我出口的所有图像为PNG文件导入Flash,以及我的性格,打破了环境成背景,目标和前景。我却无法找到一个简单的教程,说明如何做到位图命中测试或让我的性格不能够移动到物体的另一种简单方法。
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 ?
在此先感谢
推荐答案
在关于使用这个伟大的教程看看 BitmapData.hitTest
碰撞检测:
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/
另外,如果你正在建设一个flash游戏,我认为你应该考虑使用的 Flash游戏引擎,例如,对于2D游戏,plataformers和这样的我建议:
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:
或 Flixel
双方将帮助您与游戏开发具体了很多东西,如碰撞检测,用户输入等应加快工作流程。希望这有助于!
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!
这篇关于在AS3位图hittesting的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!