A few days ago, I ported Emanuele’s AS2 line rider tutorial to AS3 in about an hour, and then went on to add keyboard control and gave him a grenade launcher — I’m not going to include the source in this post because it was fun to port and don’t want you to miss out. Its amazing how fast one can knock together a Metal Slug prototype these days.
For our game [stay tuned], I needed to change a few things such as moving the terrain and not Manny so that he stays locked to the centre of the screen; giving the illusion that he’s actually moving — this prevents him from sliding off the screen.
I’ve been been experimenting with different collision detection techniques (hitTestPoint, using circles, and even colour getPixel), and found Keith Peter’s book invaluable; especially the relatively simple radius detection (compared to the vector stuff) — great introduction to trig and physics — I wish he was my highschool math teacher. I’ve learned that switching between different techniques can increase performance dramatically.