Beginners Tutorial 1 make a Platform action game

Learn how to make certain types of games and use gameEditor.

Beginners Tutorial 1 make a Platform action game

Postby krenisis » Tue Jun 22, 2010 3:07 pm

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.
Attachments
data.zip
SuperMarioBros game example GED to go along with tutorial
(75.15 KiB) Downloaded 5465 times
Last edited by krenisis on Mon Jun 28, 2010 4:20 am, edited 5 times in total.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby krenisis » Tue Jun 22, 2010 3:24 pm

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.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby krenisis » Tue Jun 22, 2010 3:47 pm

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
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby krenisis » Tue Jun 22, 2010 4:03 pm

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.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby krenisis » Tue Jun 22, 2010 4:31 pm

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.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby Hblade » Tue Jun 22, 2010 4:47 pm

wow o.o good job :D!
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4374
Joined: Fri Dec 08, 2006 11:14 pm
Score: 169 Give a positive score

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

Postby Bee-Ant » Tue Jun 22, 2010 6:18 pm

Don't forget to add "How to make menus"
Nice :D
User avatar
Bee-Ant
 
Posts: 3695
Joined: Wed Apr 11, 2007 12:05 pm
Location: Can bee found antywhere
Score: 209 Give a positive score

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

Postby krenisis » Tue Jun 22, 2010 11:58 pm

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.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby krenisis » Sun Jun 27, 2010 10:58 pm

Anyone need help with tutorial?
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

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

Postby lcl » Tue Jun 29, 2010 5:04 pm

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! :)
SABRE (semi-3D engine) official development topic: viewtopic.php?f=6&t=12644
A game project that utilizes SABRE: viewtopic.php?f=4&t=13297
User avatar
lcl
 
Posts: 1948
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 207 Give a positive score

Re: Beginners Tutorial 1 make a Platform action game

Postby krenisis » Sat Jul 10, 2010 12:41 am

Ok thanks if anyone has a question about this tutorial please post your question here, thank you.
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 607
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: Beginners Tutorial 1 make a Platform action game

Postby NightOfHorror » Fri Sep 03, 2010 2:21 am

Thanks :)
Last edited by NightOfHorror on Fri Sep 03, 2010 2:22 am, edited 1 time in total.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1770
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 50 Give a positive score

Re: Beginners Tutorial 1 make a Platform action game

Postby NightOfHorror » Sat Sep 04, 2010 1:27 pm

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
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1770
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 50 Give a positive score

Re: Beginners Tutorial 1 make a Platform action game

Postby zxcvbnm » Sun Sep 05, 2010 4:42 am

Ok after you declared the variable , where you able to use it in the game or it didnt work ?
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 249
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: Beginners Tutorial 1 make a Platform action game

Postby NightOfHorror » Sun Sep 05, 2010 8:21 pm

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
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1770
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 50 Give a positive score

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests