Archive for the ‘Tutorial’ Category
ActionScript: Tutorial How to create a gravity like a Mario platformer
In this little tutorial you will learn how to create a gravity like a Mario platformer. Let’s start! Get files Save these 2 sprites (Right click > Save as) Open Flash and create a new ActionScript 3.0 document. Document properties: 24 fps, 550×400 by default. Create the Hero MovieClip Create a new Symbol: Insert > [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: acceleration, as3, bounce, gravity, jump, mario, physic, plateformer, sonic
ActionScript: Move an object with keyboard with absolute controls
In this tip I will show you how to move an object with keyboard with absolute controls. See also how to move an object with keyboard relative-camera control. What is the absolute controls? The direction of your object will be calculated depending the object orientation. (Biohazard, Micro Machines, Gears of War). This code is very [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: absolute, actionscrip, car, controls, flash, game, Tutorial
ActionScript: Move an object with keyboard with camera relative control
In this tip I will show you how to move an object with keyboard with camera relative control. What is a camera relative control? The direction of your object will be calculated depending the camera position. (Mario 64, Uncharted, GTA 3, etc.). Eg: If press the right button the character will go on the right. [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: ActionScript3 as3, arrows, camera, key, keyboard, move, relative
ActionScript: Move an object to coordinates with smoothing
There is a simple formula to move an object to coordinates with smoothing. The speed will decrease with smooth during the time. speed = distance_between_objects / smoothing The distance will decrease because the distance will decrease too. If I set values I got: object.x = 50 targetX = 100 speedX = (targetX – object.x) / [...]
In: Game Design, Tip, Tutorial · Tagged with: 3, ActionScript3 as3, move, object, smooth
ActionScript: Throw bullets to mouse direction
After calculating the angle of 2 graphic objects, you can also use this angle to throw a bullet to the object direction with the trigonometry. How ? Calculating the angle (in radian) between 2 graphics objects with the Math.atan2 method (cf. Orient object to the mouse cursor). On click, display a bullet to the “tank” [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: angle, bullet, direction, mouse, radian, shoot em up
ActionScript: Detect collision between 2 circles
With the Pythagoeran theorem you can detect collision with 2 circles. You just have to get the rays of 2 circles with the width property divided by 2. Actually the width property returns the diameter of the circle. So, you can calculte the ray like this: ray = diamter / 2 ray = circle.width / [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: 2 collision, as3, distance, pythagoeran, test
ActionScript: Get distance between 2 MovieClips
If you want to get the distance in pixels between 2 graphic objects just use the Pythagorean theorem in ActionScript :). c² = a² + b² Download source : Get_Distance.zip 12345function getDistance(pObj1:MovieClip,pObj2:MovieClip):Number { var distX:Number = pObj1.x – pObj2.x; var distY:Number = pObj1.y [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: 2, collision, distance, movieclip, pixel, pythagore
ActionScript: Orient an object to the mouse cursor
How to orient an objet to an other ? Just put those lines and change the instance name myTank.
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: actionscript 3, mouse, orientation
Tutorial: How to make a game like Jetman – step 1 – The Jetman
In my first tutorial I will show you how to make a flash game like Jetman. A simple very famous casual game on facebook and very addictive. Play Jetman 1. First of all you have to download the Adobe Flash IDE: Adobe Flash CS3 or Adobe Flash CS4 We will code the game with ActionScript [...]
In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: actionscript 3, flash, Game Design, jetman, Tutorial
