Book Read Free

Introduction To Game Design & Programming in GameMaker Studio 2

Page 1

by Ben Tyers




  Introduction To Game Design

  &

  Programming

  In

  GameMaker Studio 2

  ©2019 Ben Tyers

  LearnGameMakerStudio.com

  Special Thanks to The Following, Who Pre-Ordered This Project & Made It Possible:

  Michał Kamiński

  Corey Cuhay

  Honey

  Pedro Santos

  Mark Porter

  Dean Radcliffe

  Mickey Everett

  Vasco

  Mike Cowel

  Gaven Renwick

  Thanks Also to The Following People:

  Yellow Afterlife – Thanks for your help

  Nathan Brown

  Loukas Bozikis

  Alesia Buonomo

  Kehran Carr

  Arik Chadima

  Rom Haviv

  Zachary Helm

  ISBN: 9781795199537

  Copyright 2019 © Ben Tyers

  First Edition

  If you find any issues of problems with this book (such as omissions or mistakes) please drop me an email:

  Ben@LearnGameMakerStudio.com

  Educational Use

  I am more than happy the this or material from it being used in an educational setting, such as schools or clubs. As an educator, I am sure you appreciate how much effort and time goes into making a book such as this, therefore I ask that one copy is purchased (ebook or paperback) for every 10 students using it. If you have any questions, please email:

  Ben@LearnGameMakerStudio.com

  ACKNOWLEDGMENTS

  Graphics In Main Chapters: GameDeveloperStudio.com

  All Audio In Main Chapters: SoundImage.org

  Assets are not needed to enjoy this book

  If you wish to make the game covered in this book, you can access assets from the above sites.

  No assets are included with this book project, except for Chapter 7 Introduction, which is optional, and the appendix.

  Chapter 7 Introduction Project:

  Buttons: DaButtonFactory.com

  Heart: OpenGameArt.org cdgramos cc0

  Monster: OpenGameArt.org bevouliin.com cc0

  Appendix 4 Cloud BananaOwl / opengameart.org CC-BY 3.0

  Appendix 4 Gun sight Lucian Pavel / opengameart.org CC0

  Appendix 6 Brick and ball Zealex / opengameart.org CC0

  Appendix 7 Rotating coin Puddin / opengameart.org CCO

  Appendix 7 Character rileygombart / opengameart.org

  Appendix 7 Horse reivaxcorp / opengameart.org CC-BY 3.0

  Appendix 9 Audio http://soundimage.org

  Appendix 12 Songs http://soundimage.org

  Appendix 13 Car sheikh_tuhin!

  Rock - Jasper / OpenGameArt.org CC0

  Appendix 15 Bird bevouliin.com / OpenGameArt.org CC0

  Appendix 20 Chess Sprites: mr0.0nerd : https://2dartforgames.wordpress.com/

  Appendix 21 Crosshair: Red Eclipse / OpenGameArt.org CC-BY-SA 3.0

  Appendix 21: Sounds: SoundImage.org

  Appendix 22: Cards Kenney.nl

  Includes text taken from Wikipedia, some of which is edited CC-BY 3.0

  Creative Commons

  Some of the resources used in the appendix is licensed in Creative Commons.

  Some extracts from Wikipedia is also in Creative Commons.

  See https://creativecommons.org/ for full info

  The Main Ones Are:

  License Conditions

  Creators choose a set of conditions they wish to apply to their work.

  Attribution (by)

  All CC licenses require that others who use your work in any way must give you credit the way you request, but not in a way that suggests you endorse them or their use. If they want to use your work without giving you credit or for endorsement purposes, they must get your permission first.

  ShareAlike (sa)

  You let others copy, distribute, display, perform, and modify your work, as long as they distribute any modified work on the same terms. If they want to distribute modified works under other terms, they must get your permission first.

  NonCommercial (nc)

  You let others copy, distribute, display, perform, and (unless you have chosen NoDerivatives) modify and use your work for any purpose other than commercially unless they get your permission first.

  NoDerivatives (nd)

  You let others copy, distribute, display and perform only original copies of your work. If they want to modify your work, they must get your permission first.

  Attribution 4.0 International (CC BY 4.0)

  This is a human-readable summary of (and not a substitute for) the license. Disclaimer.

  You are free to:

  •Share — copy and redistribute the material in any medium or format

  •Adapt — remix, transform, and build upon the material

  •for any purpose, even commercially.

  •The licensor cannot revoke these freedoms as long as you follow the license terms.

  ________________________________________

  Under the following terms:

  •Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

  •No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

  Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

  This is a human-readable summary of (and not a substitute for) the license. Disclaimer.

  You are free to:

  •Share — copy and redistribute the material in any medium or format

  •Adapt — remix, transform, and build upon the material

  •for any purpose, even commercially.

  •The licensor cannot revoke these freedoms as long as you follow the license terms.

  ________________________________________

  Under the following terms:

  •Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

  •ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

  •No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

  Public domain

  Our licenses help authors keep and manage their copyright on terms they choose. Our public domain tools, on the other hand, enable authors and copyright owners who want to dedicate their works to the worldwide public domain to do so, and facilitate the labeling and discovery of works that are already free of known copyright restrictions.

  CC0

  Use this universal tool if you are a holder of copyright or database rights, and you wish to waive all your interests that may exist in your work worldwide. Because copyright laws differ around the world, you may use this tool even though you may not have copyright in your jurisdiction, but want to be sure to eliminate any copyrights you may have in other jurisdictions.

  •Learn more

  •Use this tool

  Public Domain Mark

  Use this tool if you have identified a work that is free of known copyright restrictions. Creative Commons does not recommend this tool for works that are restricted by copyright laws in one or more
jurisdictions.

  You can download resources & completed project here:

  www.learngamemakerstudio.com/assets.zip

  Introduction

  Welcome

  Game Resources

  Main Book Contents

  About GameMaker

  Chapter 1 Starting With An Idea

  Initial Idea

  Infinite Scroller – Survive as long as you can

  Parallax Backgrounds – Give a sense of depth to the game

  Moveabe Player – Move the player and allow to shoot weapons

  Basic Enemy – Moves across the screen

  Advanced Enemy – Moves in circular path and shoots at the player

  Boss Enemy – Formiddable enemy

  Multiple Weapons – Player can collect upgrades to their weapons

  Set Health – Player has set amount of health, game over when all lost

  Highscore System – Save and display the player’s best score

  Game Aim – Survive as long as possible and get the highest score

  Chapter 2 Initial Planning & Preparation

  Chapter 3 Software & Financing

  Working with Different Budgets

  Cost of software

  Development

  Graphics

  Free Graphics Software

  Paid Graphics Software

  Audio

  Free Audio Software

  Paid Audio Software

  Pre-Made Graphics

  Free Graphics

  Paid Graphics

  Ways of raising funds

  Crowd Funding

  Patreon

  Social Media

  Steam Early Access

  Chapter 4 Game Assets

  Chapter 5 Refining Resources

  Graphics

  Audio

  Chapter 6 Beta Testing & Debugging

  Beta Testing

  Graphics are too large

  Not responsive enough

  Too easy

  Player weapons are too slow

  HUD is not in keeping with the rest of the game

  Aspect ratio should be changed

  Collision masks are impresise

  GUI life and dots not in keeping with game style

  To visually show damage to player

  Debugging

  Chapter 7 Programming

  Programming Introduction

  Game Programming

  Scripts

  Objects

  Rooms

  Paths

  Audio

  Chapter 8 Final Testing

  Chapter 9 Publishing & Game Promotion

  Social Media

  YoYo Games Forum

  Steam

  Itch.io

  GameJolt

  Google Play

  Chapter 10 Summary

  Target Audience

  Pricing

  Working as a Team

  Useful Links

  Crediting Creators

  Educational Use

  Where Next

  Conclusion

  Appendix

  Appendix 1 Variables

  Appendix 2 Conditionals

  Appendix 3 Drawing

  Appendix 4 Drawing Continued

  Appendix 5 Keyboard Input & Simple Movement

  Appendix 6 Objects & Events

  Appendix 7 Sprites

  Appendix 8 Health, Lives & Score

  Appendix 9 Mouse

  Appendix 10 Alarms

  Appendix 11 Collisions

  Appendix 12 Rooms

  Appendix 13 Backgrounds

  Appendix 14 Sounds

  Appendix 15 Splash Screens & Menu

  Appendix 16 Random

  Appendix 17 AI

  Appendix 18 INI Files

  Appendix 19 Effects

  Appendix 20 Loops

  Appendix 21 Arrays

  Appendix 22 DS Lists

  Appendix 24 Scripts

  Introduction

  Welcome

  A note from the author:

  Congratulations!

  You are about to learn the basics of GameMaker Studio 2, and potentially start a career in game making.

  This book is an introduction to the game making process, an introduction to GameMaker Studio 2, and other considerations when making your first game.

  GameMaker Studio 2 is a powerful piece of software for making games. This book only covers the basics, but is a great place start.

  Best of luck with you game making endeavours,

  Ben

  Over the last ten years or so I have written many books on game programming and have completed over two-hundred game projects. During that time I have learnt GML coding to a reasonable level, and have picked up many skills, tips and tricks and methology for making games in GameMaker & Game Maker Studio 2.

  The purpose of this book is to provide you with some of the knowledge that I have acquired. I make no claim that I’m the best coder or designer, but I do have a proficient understanding that I would like to instil on other budding game makers.

  Through my website, I set up a number of polls and gained feedback on what game to make and which graphics to use, in total over 500 people have voted on my site, and chose a side-scrolling war zone themed shooter. Thanks to everyone who voted. This book covers my approach to make said game.

  Unlike previous books of mine that focused mainly on the actual GML code, this book covers the full design progress, with some code thrown in. It focuses on:

  Starting With An Idea

  Initial Planning & Preparation

  Software 7 Financing

  Game Assets

  Refining Resources

  Beta Testing & Debugging

  Programming

  Final Testing

  Publishing

  Game Promotion

  Additional Considerations

  Summary

  +An Appendix Of Commonly Used GML Coding

  I will be the first to admit that the process of making a game is dynamic and fluid, and as such may not follow the order above. This will change depending on your level on GML, whether you have made a similar game before, the genre, and the complexity of the game. That said, the above order is a great place to start.

  So, you have GameMaker Studio 2 installed. Let’s start it up and start making a game. Then again, let’s not. Jumping straight in is a bad idea, not least for the following reasons:

  You have no idea at this stage what the game will be about

  You have not yet decided on the look of the game

  You have no idea what the objects will be and how they will interact

  Jumping in blindly will make the whole game creation process more difficult for you

  You will come up with extra ideas for the game, and adding them when the basic game has been made will make this confusing and difficult

  That said, if you just want to create one game element to see what it looks like, or how a certain feature works, or basic player movement, I consider that perfectly OK. Attempting the whole game with no planning is a big no-no, especially if you are quite new to GameMaker or the game making process.

  GameMaker Studio 2 is a very powerful and adaptable software for making 2D games, I would go as far as to say that if you can make pretty much any 2D game that you can think of.

  Game Resources

  This game will consist of graphics and audio from a couple of sites, due to licensing restrictions I can’t provide them as a download, but I will include a link so you can access them should you decide to make the game covered in this book. The main focus of this book is on the design and programming considerations, with some of the more prominent coding dissected and explained. You will not need the assets to enjoy this book.

  All game graphical assets used in the main game are from the great website GameDeveloperStudio.com. If you wish to remake the game made in the book, you can access the assets directly from this site. The site does have several free assets, so you can swap them in instead of using purch
ased assets if you are working on a low budget.

  Main Book Contents

  The main areas covered in the book are:

  1 Starting With An Idea

  This section covers what you need to do with your initial ideas and how to take them forward.

  2 Initial Planning & Preparation

  Take your ideas forward, design the basic game layout, what objects will be present, and how they will interact.

  3 Software & Financing

  Software and resources cost money, this chapter covers some of the options available when funding your game.

  4 Game Assets

  Possible design issues, and how to tweak your ideas.

  5 Refining Resources

  Setting up and editing resources so they are ready for your game,

  6 Beta Testing & Debugging

  Testing the game, fixing bugs, and implementing feedback.

  7 Programming

  Covers some of the coding required to implement aspects from your game design. This also covers a way to make the game in small chunks, so you can test it as you go.

  8 Final Testing

  Polishing off the game and making it ready for publication.

  9 Publishing & Game Promotion

  Where to publish your game.

  10 Game Promotion

  Summary of the book.

  About GameMaker

  (Edited From Wikipedia) CC-SA 3.0

  GameMaker Studio (formerly Animo until 1999, Game Maker until 2011, GameMaker until 2012, and GameMaker: Studio until 2017) is a cross-platform game engine developed by YoYo Games. I’m showing my age here, but vagely remember Animo, and have followed it’s progression since then.

  GameMaker accommodates the creation of cross-platform and multi-genre video games using a custom drag-and-drop visual programming language or a scripting language known as Game Maker Language, which can be used to develop more advanced games that could not be created just by using the drag and drop features. GameMaker was originally designed to allow novice computer programmers to be able to make computer games without much programming knowledge by use of these actions. Recent versions of software also focus on appealing to advanced developers.

 

‹ Prev