Login
Password

Forgot your password?

Creating a 2D Scrolling Game on Game Maker Part 1

By Edited Dec 21, 2015 0 0

The button that you click to create a new sprite

Part 1

     Before you read this, keep in mind, this is a tutorial for complete beginners. So if you find things too obvious, you'll have to deal with it until the next tutorial.

Wink

     To start, create a sprite by clicking on the pacman shape on the top of the screen(below run). Then name this spriteMain. Next click edit sprite and click create a new sprite, keep the width and height the same. Open the square that was just made. Then just try to draw a spaceship. Then click the check mark at the top left of the pop up window, then click the check mark again, then click center(right above the OK button). Now click OK at the bottom left of the pop up window. Do this when I tell you to "exit" out of the sprite or object. Make sure you save often.

     Next create an object by clicking on the blue sphere at the top of the screen which is about eight  icons to the right of create a sprite. When the object is open, change the sprite by clicking on the button that looks like a list next to the phrase <no sprite>. Then choose spriteMain. Next change the object name (at the top left) to objectMain. 

     Keep the object open, click on the control panel to the right which is the fourth tab down from the top. Now click on Add Event and choose <keyboard> at the bottom of the left column, then choose left which is at the very top of the list. In this event drag and drop the execute code icon on to the actions rectangle. The execute code box should automatically open and inside this write x -= 5

     Exit out and right click on the event. Choose duplicate event and do the same thing except this time choose right. Now open the execute a piece of code and change the code to x+=5

     Duplicate again, click keyboard, choose up, open the execute code and then change the code to y-=5

     Now do all the same stuff but this time choose down. Then click on execute code and change it to y+=5

     Then Exit out of the execute code window and the objectMain window.

     Now just create a room by clicking the create a room button right next to the create an object button. Place the object objectMain anywhere in the room. Exit out.

     To play the game, press the green arrow pointing to the right which is under scripts.

The button that you click to create a new sprite

Create a Sprite Button
Credit: Christina Braun

What the Control Tab Looks Like

What the Control Tab Looks Like

Execute Code Icon

Execute Code Icon
Advertisement

Comments

Add a new comment - No HTML
You must be logged in and verified to post a comment. Please log in or sign up to comment.

Explore InfoBarrel

Auto Business & Money Entertainment Environment Health History Home & Garden InfoBarrel University Lifestyle Sports Technology Travel & Places
© Copyright 2008 - 2016 by Hinzie Media Inc. Terms of Service Privacy Policy XML Sitemap

Follow IB Technology