Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
GameMaker Programming By Example

You're reading from   GameMaker Programming By Example Master the development of 2D games by learning to use the powerful GameMaker Language and tools provided by the GameMaker: Studio workspace and engine!

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785887963
Length 212 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Brian Christian Brian Christian
Author Profile Icon Brian Christian
Brian Christian
Steven Isaacs Steven Isaacs
Author Profile Icon Steven Isaacs
Steven Isaacs
Arrow right icon
View More author details
Toc

Creating an endless platformer

Let's first explain exactly how this game will work. Whenever the player hits a platform, they will bounce into the air, regardless of whether a key was pressed. They will come down in the air too, and bounce on any platforms they land on. Direction can be controlled by the left and right keys. If they do not land again after falling, and thus go off the bottom of the screen, they die. As they get higher, the screen will move, in that, platforms previously visible and usable will go off screen and disappear. Enemies will be incorporated, followed by the main part of the game—random spawning. The game will finish up with the introduction of menu and message displaying systems.

You can compare this whole game to games such as Doodle Jump or Pixel Jump.

So let's begin! First, make your player sprite. Give it two subimages, for a left and right view, and modify the collision mask to whatever you think works best for the sprite. Make an object for...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image