How to make a platform game in flash 8 part 1
HOW TO MAKE A GAME IN FLASH - This is the First part of the PLATFORM GAME DEVELOPMENT TUTORIAL which teaches you how to make a 2D platform game ( also called side scrolling game) in flash 8 , flash cs4, flash cs5 or flash cs6. All the codes for the game are written by using a programming language ActionScript 2 ( AS2 ). In this Video you will learn how to make character and ground for your platform game!
One of the most popular genres of video game is the platform game, which also
poses some very interesting programming and design challenges.
From a programming point of view, if you can program a platform game then you are a good programmer
Code for the character:
onClipEvent (load) {
var ground:MovieClip = _root.ground;
var grav:Number = 0;
var gravity:Number = 2;
var speed:Number = 7;
var maxJump:Number = -12;
var touchingGround:Boolean = false;
}
onClipEvent (enterFrame) {
_y += grav;
grav += gravity;
while (ground.hitTest(_x, _y, true)) {
_y -= gravity;
grav = 0;
}
if (ground.hitTest(_x, _y+5, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.UP) && touchingGround) {
grav = maxJump;
}
if (ground.hitTest(_x+(_width/2), _y-(_height/2), true)) {
_x -= speed;
}
if (ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {
_x += speed;
}
if (ground.hitTest(_x, _y-(height), true)) {
grav = 3;
}
}
UPDATE
Download complete project from github :
https://github.com/AthulDilip/AS2-Platform-Game
Subscribe for more tutorials
Видео How to make a platform game in flash 8 part 1 канала Game Development Tutorials
One of the most popular genres of video game is the platform game, which also
poses some very interesting programming and design challenges.
From a programming point of view, if you can program a platform game then you are a good programmer
Code for the character:
onClipEvent (load) {
var ground:MovieClip = _root.ground;
var grav:Number = 0;
var gravity:Number = 2;
var speed:Number = 7;
var maxJump:Number = -12;
var touchingGround:Boolean = false;
}
onClipEvent (enterFrame) {
_y += grav;
grav += gravity;
while (ground.hitTest(_x, _y, true)) {
_y -= gravity;
grav = 0;
}
if (ground.hitTest(_x, _y+5, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.UP) && touchingGround) {
grav = maxJump;
}
if (ground.hitTest(_x+(_width/2), _y-(_height/2), true)) {
_x -= speed;
}
if (ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {
_x += speed;
}
if (ground.hitTest(_x, _y-(height), true)) {
grav = 3;
}
}
UPDATE
Download complete project from github :
https://github.com/AthulDilip/AS2-Platform-Game
Subscribe for more tutorials
Видео How to make a platform game in flash 8 part 1 канала Game Development Tutorials
Показать
Комментарии отсутствуют
Информация о видео
22 января 2012 г. 18:20:54
00:08:31
Другие видео канала
![How to make a platform game in flash 8 part 2](https://i.ytimg.com/vi/EIRftyt9lWM/default.jpg)
![How to make a platform game in flash 8 part 4](https://i.ytimg.com/vi/Osv0hz25KDg/default.jpg)
![ALAN BECKER - Freeware Alternatives to Adobe Flash](https://i.ytimg.com/vi/BDv8KeJDEnk/default.jpg)
![ALAN BECKER - Camera Movement (revamped)](https://i.ytimg.com/vi/Np2LXXk-uHw/default.jpg)
![Growing Moon and Animation using Macromedia Flash8](https://i.ytimg.com/vi/2IIzJUIQs7Q/default.jpg)
![How to make a game in flash.](https://i.ytimg.com/vi/r_QFlwRsOco/default.jpg)
![Learn C language in 30 Minutes & Start Coding For Beginners in Hindi](https://i.ytimg.com/vi/U8_8fTODn5g/default.jpg)
![Macromedia Flash 8 basic tutorial](https://i.ytimg.com/vi/nzzbMluMCHY/default.jpg)
![How To Make A Platform Game In Flash (Extended Part 3)](https://i.ytimg.com/vi/i6OgGDsIniU/default.jpg)
![Play, Pause and Stop Buttons In Flash](https://i.ytimg.com/vi/tU9OWTtDAMY/default.jpg)
![How to Use the Loops to Create Animation in Flash Using ActionScript 3.0](https://i.ytimg.com/vi/2lIyJKlOA34/default.jpg)
![How to make a game like FLAPPY BIRD in flash (AS3)](https://i.ytimg.com/vi/o6KwkbB8Jr4/default.jpg)
![How to make a platform game in flash (CS5)](https://i.ytimg.com/vi/US2P89m8GV0/default.jpg)
![BasicTutorial // Flash pro 8 || Basic stick look and animation](https://i.ytimg.com/vi/Wdjl0gsXqzg/default.jpg)
![Red Ball MUST SAVE HIS GIRLFRIEND! | Red Ball 4 Gameplay (World 5)](https://i.ytimg.com/vi/3eBf2o2fUZg/default.jpg)
![How To Make A Platform Game in Flash (Extended)](https://i.ytimg.com/vi/LTxI1VnWJ5M/default.jpg)
![Tebak Gambar dengan Macromedia Flash](https://i.ytimg.com/vi/0xtvtDsihcQ/default.jpg)
![Animate CC Basic Parallax Side Scrolling Background](https://i.ytimg.com/vi/GvN8ujzHumU/default.jpg)
![Super Mario game in Flash AS2 Tutorial Part 1](https://i.ytimg.com/vi/0SwLJXvsM48/default.jpg)
![Creating a Tap the Balloons Game in Adobe Flash using ActionScript 3.0 - Part 01](https://i.ytimg.com/vi/MJ5kFU2-D68/default.jpg)