Page 1 of 2

Beginners Tutorial 1 make a Platform action game

PostPosted: Tue Jun 22, 2010 3:07 pm
by krenisis
Ok I looked in the forums and many people have questions on how to make a simple action platform game. Here we will go and make a simple action platform game and by the end you will have a framework which to build your game.

WHATS INCLUDED
SuperMario bros graphics
A Ged example of the game so you can see game and play the game.

OVERVIEW
1) Learn how to make your actor move left and right.
2)Make your actor jump without repeat jump.
3)Interaction with enemies and move around the land.
4)How to declare a variable.

Before we begin you need to have these graphics ready

your player
land (3 different animations)
enemy

Ok go ahead and open Game Editor , and add the 3 actors plus animations to each.

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 3:24 pm
by krenisis
Ok now we are going to set up the main charactor.

Click on the actor you are going to control

Click on add//click on key down//now a tab will open up//it will ask you what button you want to press// press the right arrow on computer//click on add action//click on script editor//put this code in which make your charactor move right

x+=10;
Go to the variables/functions tab on bottom of screen and click on change animation and choose the animation you want your player to have when you press the button.

then click ok//immediate action

Now you be taken back to the tab//press clear button//press left key//click on add action//click on script editor//put this code which makes your charactor move left

x-=10;
Go to the variables/functions tab on bottom of screen and click on change animation and choose the animation you want your player to have when you press the button.

click ok// immediate action


Ok hit clear again//hit the spacebar//go to the script editor//put this code in to make your actor jump

if(jump==1)
{
yvelocity=-20;
jump=0;
}

click ok and a error message dont worry about it will pop up. continue and press ok button//click immediate action


Now the 1st part is done.

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 3:47 pm
by krenisis
Ok remember the error message we got , lets go take care of that now.

Go to the top of your screen where it has a tab called script.Click on that tab and a big menu will open up. Ok now type this in the menu

jump;

Now on the lower part of the menu it has the word name and next to it a space// in the space next to name type

move

Now there is a tab under that, that says variables. Click on that and a small windows opens up// click add and a smaller windows opens up
put this

name: jump
array dont put anything
save group: move

Click add and close the small window....now where it says add next to where you type move click on the add and the words dissapear. Now click close and save your game.


The process you just did is called declaring a variable

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 4:03 pm
by krenisis
Now the final step to completing the actor that you are controlling.
Click on your actor//click on add//click on draw actor//click on add action//click on script editor//and add this code//

yvelocity++;

This gives your player gravity.

Now one last code and you be done with your charactor hahaha i know the last step i said is final but this is final step ok I promise.
click on add//click on collision//a small window open up// make it loook like this

on: any side of
of actor: land
repeat while colliding: yes

now click on add action//script editor//now just copy and paste this next code I know your fingers hurt by now we almost done

PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000, 1.000000, 0.000000, 0.000000);
jump=1;


OK now go ahead and save your game.

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 4:31 pm
by krenisis
Ok now we are going to get into making the level a little bit. Go ahead and click on the land actor // look in the small window and you will see the clone command // click that command// click on array and type in 20 where you see a 0. Now using your mouse move the land pieces where you want them to be. After your done go ahead and click game mode. Game mode is located along the top of the screen its one of the gray tabs. Move your charactor around on the screen. Having fun now???

Ok now structure the level with the land pieces a bit and lets get to the action part of the game.

Now click on your enemy//click on add//click on collision//
on any side of
select the charactor your controlling
no

click on add action//click on destroy actor// where it says Event Actor click on it and select the player your controlling//click on add//immediate action.

Now when the enemy hits your actor, he will kill you. But right now he cant move so we get him to move right now.
Along the top of the screen you see a tab called path//click on it// click on add//it will look like this
Name
Frames
Now type this for now
Name: enemy move
Frames: 100

This is how you will move the screen forward. Go and add an actor but where it says normal click on it and select....wire frame region .
Name this actor moveright. Now using the mouse scretch him by left clicking on his ends and you can shape the charactor box wise. Go ahead andmake him skinny and the lenght of the screen. Move him to the right of your actor. Now click on him and where it says parent click on that and change parent to view. Now click add//click on collision //
on any side of
select your player
yes repeat while colliding

click add action // script editor // put this code in


view.x+=10;

click ok and click immediate action. Now when you go forward the screen will go foward.


Now click on draw button and now when you click on the screen dots will appear, those dots represent your enemy movements. Make a path and when your done click close. Now click on your enemy look in the window and you see a tab called path. Click next to it and select the enemy move. Now the enemy will move in the pattern that you like.

Go Ahead and clone you enemy the same way you cloned the land. Run your game now. After your done go ahead and save your game.
Now you have a simple platform action game. If you want more functions I will add more later on.

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 4:47 pm
by Hblade
wow o.o good job :D!

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 6:18 pm
by Bee-Ant
Don't forget to add "How to make menus"
Nice :D

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 22, 2010 11:58 pm
by krenisis
Thanks guys,
Ok if thier is any questions on the tutorial showed above feel free to ask questions. In the future there will be an advanced tutorial on how to make a mario game.

Re: Step by Step how to make a Platform action game

PostPosted: Sun Jun 27, 2010 10:58 pm
by krenisis
Anyone need help with tutorial?

Re: Step by Step how to make a Platform action game

PostPosted: Tue Jun 29, 2010 5:04 pm
by lcl
krenisis wrote:Click on add//click on key down//now a tab will open up//it will ask you what button you want to press// press the right arrow on computer//click on add action//click on script editor//put this code in which make your charactor move right

x+=10;
Go to the variables/functions tab on bottom of screen and click on change animation and choose the animation you want your player to have when you press the button.

then click ok//immediate action

Now you be taken back to the tab//press clear button//press left key//click on add action//click on script editor//put this code which makes your charactor move left

x-+10;
Go to the variables/functions tab on bottom of screen and click on change animation and choose the animation you want your player to have when you press the button.

click ok// immediate action


You have done much work with this, and that's great you help people. :D
But your tutorial has one problem. It's moonwalk. Mario starts the animation all the time again while you press left or right, and that's looking bad. I had the same problem in my Elephant game and I didn't even notice it first, but when I had a look to my real animations like what they should be, I found out that my actor keeps repeating two first frames of animations all the time while moving. But it's easy to fix. :D

Add variable called direction (or what you want) and then change the moving script to be like this:
(key right)
Code: Select all
x+=10;
if(direction!=1)
{
    ChangeAnimation(blah blah blah all this... xD);
    direction=1;

    //First line checks if the value of direction is some else than 1
    //Second line changes the animation
    //And third line makes direction equal to 1, so it can't repeat changing animation
}

This way the variable direction can hold all the directions, then you just have to decide different values for all directions and change them to the code. :D I hope this helps you to help people! :)

Re: Beginners Tutorial 1 make a Platform action game

PostPosted: Sat Jul 10, 2010 12:41 am
by krenisis
Ok thanks if anyone has a question about this tutorial please post your question here, thank you.

Re: Beginners Tutorial 1 make a Platform action game

PostPosted: Fri Sep 03, 2010 2:21 am
by NightOfHorror
Thanks :)

Re: Beginners Tutorial 1 make a Platform action game

PostPosted: Sat Sep 04, 2010 1:27 pm
by NightOfHorror
At the part where you declare the variable I did everything but I don't see what your talking about after you close the variable window

Re: Beginners Tutorial 1 make a Platform action game

PostPosted: Sun Sep 05, 2010 4:42 am
by zxcvbnm
Ok after you declared the variable , where you able to use it in the game or it didnt work ?

Re: Beginners Tutorial 1 make a Platform action game

PostPosted: Sun Sep 05, 2010 8:21 pm
by NightOfHorror
What I meant was I typed in jump; then move then did all that other stuff. You said there would be something that said Next to where