Im just after some ideas as im currently working on a platform game but im running into some problems. Im using bitmapData and an Array to draw the map where 1 = wall, and 0 = blank space. This works great and my hero collides with ‘tilespace’ by determining the next tile he will be on yada yada, but how will i go about elevators, as they are moving!.. I thought about using a movieclip but i would prefer to drop them all together as bitmapData is faster.
No. You’d have to attach them to MC to get them to show on screen anyway. You could just perform standard MC hittesting with the said MCs. Of course every elevator must have a MC, but you’ll attach the same BitmapData to all of them.
//Edit: It’s good to highlight that I never actually tried this, it just sounds logical to me based on what I know about MCs and BitmapData, but I may be completely wrong. Still, I guess it’s worth checking.
BitmapData can use hitTest with another BitmapData object only, and at pixel level…During rendering, BitmapData is mostly used to generate non-Interactive stuff, Like tiled backgrounds and layer design.Since its just a copy, or, umm, screenshot of a mc…
[QUOTE=bluemagica;2337777]BitmapData can use hitTest with another BitmapData object only, and at pixel level…During rendering, BitmapData is mostly used to generate non-Interactive stuff, Like tiled backgrounds and layer design.Since its just a copy, or, umm, screenshot of a mc…[/QUOTE]
I use BMD (BitmapData) hittest for my platformer, you can hittest it with MC’s or other images fine. It’s a bit faster than mc’s hittest therefore the best option for pixel-level collision.
Im just after some ideas as im currently working on a platform game but im running into some problems. Im using bitmapData and an Array to draw the map where 1 = wall, and 0 = blank space. This works great and my hero collides with ‘tilespace’ by determining the next tile he will be on yada yada, but how will i go about elevators, as they are moving!.. I thought about using a movieclip but i would prefer to drop them all together as bitmapData is faster.