Simple Platform Tutorial Part 1

1

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

2,973 visits, 4,813 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

This platform tutorial is for beginners. Ashley has shown much in his tutorial therefore nothing that many of you has missed out. I have added simple thing for beginners like copying, pasting and much more that was not in Ashley tutorial.

Let’s start:

1. Create new project and call whatever you like

2. Windows size set to 704, 448

3. Preview browser fullscreen OFF

4. Create layer BACKGROUND 1920, 448 (32 X 14 )

5. Create Layer Objects

6. Create Layer Player

7. Create Layer HUD do not forget to set parallex to 0.0

That will do for start. Now lock the Object, Player, HUD I have chosen BACKGROUND colour is 156,184,222. Now set the BG to top 0,0 and size to 1920, 448. That’s your BG done. Lock it.

Unlock Object and create sprites of block here and name it Knockoutblock. Set image point to top left 0,0 or click on IMAGE_POINT and little Imagepoint box opens. Here click right mouse button on QUICK ASSIGN. From drop down menu click on top-left. Bingo that will be done. With this you can set IMAGE_POINT quickly and easy. SET BEHAVIOR TO SOLID

What I do is make my objects on screen first like Created Knockoutblock.

Lets create another block call it Coin_Block must have second frame looks like this and set animation frame to 0 (Zero). SET BEHAVIOR TO SOLID AND EASE TWEEN

Settings for EASE TWEEN

Active NO

Position POSITION

Function LINEAR

Initial CURRENT

Target 0,-10

Duration 0,1

Wait 0,0

Play back PING PONG STOP

Value 0

Coordinate RELATIVE

Force In NO

Once you create Knockoutblock. Lets create Coin and call it COIN what else.

Lets create BlockParticles

Settings for Particle below

Now lets create our layout for our game look something like this

My Screen looks like this, you can design your screen as you wish, long as your sprites and everything else is same as mine for tutorial.

Now we shall create Player sprite. To do this import sprite strip if you have or search on

Prepare Assets – Free Art from vickiwenderlich.com

It’s free.

My player Strip is 4 X 4

Now first animation frame JUST 1 and this animation frame we will call that

idle

ALL ANIMATION REMEMBER TO USE IMAGE POINT BOTTOM CENTER.

LIKE THIS

Now there is quickest way to do to add these Image-point to all ANIMATION USE THIS SHORT METHOD IT’S SIMPLE AND FAST TOO.

use right button on ORIGIN and you will see another box open up and it

use right button on ORIGIN and you will see another box open up

looks like this now use right button on QUICK ASSIGN THIS will open another window which will look like this as you can see this is quick way to add image-point.

Once you add the first point now all you do is CLICK ON

apply to all animations. Bingo all your animation has same image-points.

Next Animation for player we want 4 frames walking RIGHT and name the ANIMTION right. For left animation just mirror the right frames. If you don’t know how to then just right above in animation windows you will find

Here how to set mirror animation for the whole, right hand frames just press SHIFT KEY DOWN AND THEN CLICK FIRST ICON THIS SHOULD MIRROR ALL YOUR FRAMES TO LEFT and call this animation left.

This will do for animation now set your animation

SPEED 8

LOOP YES

Close the window. For player behavior we will add this:

PIN TO

FLASH

EASETWEEN easeTween add this values

Now remember my player height is 32 X 48 and image-point set bottom middle.

Now let's create another sprite call it PLAYER_SHADOW AND say based on my 32x48

player I have created and set size to 18x38. And place it on top of player and set to INVISIABLE STATE therefore you will not see this sprite(player_shadow) on screen. . For player_shadow behaviour we will add this INSTANCE VARIABLE

Then add this behaviour

PLATFORM and SCROLLTO

Our player_shadow is done.

Now I will add other condition soon and it will be in PART 2

.CAPX
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!