GameMaker Game Programming with GML

Learn GameMaker Language programming concepts and script integration with GameMaker: Studio through hands-on, playable examples.

GameMaker Game Programming with GML

Starting
Matthew DeLucas

Learn GameMaker Language programming concepts and script integration with GameMaker: Studio through hands-on, playable examples.
$10.00
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781783559442
Paperback350 pages

About This Book

  • Write and utilize scripts to help organize and speed up your game production workflow
  • Display important user interface components such as score, health, and lives
  • Play sound effects and music, and create particle effects to add some spice to your projects
  • Learn how to script common game features: artificial intelligence, collision, reading input, and player feedback
  • Build your own example match-three puzzle and platform games

Who This Book Is For

If you are a GameMaker: Studio developer, having little experience with writing scripts and are looking to expand that skill set, this is the book for you. It is assumed that you can already navigate GameMaker: Studio to some degree. Because this book focuses on the scripting and integration of scripts to aid in the production of a game, instead of game design, it would also be useful for you to have access (or have the ability) to create the visual and audio assets that are presented in the examples throughout this book.

Table of Contents

Chapter 1: Getting Started – An Introduction to GML
Creating GML scripts
Understanding parts of GML scripts
Pushing your buttons
Summary
Chapter 2: Random Organization – Creating a Puzzle Game
Understanding sprite variables and functions
Setting up the puzzle game
Aligning the pieces of the puzzle game to a grid
Understanding and utilizing randomization
Checking pieces
Running it all together
Summary
Chapter 3: So How Do I Play? – Adding Player Interaction
Designing player interaction
Creating resources to integrate mouse input into the puzzle game
Updating organization with scr_reorganize_board
Integrating keyboard input
Summary
Chapter 4: Juicy Feedback – Aural and Visual Effects
Introducing alarms
Hiding the pin drop – adding audio
Creating sound resources
Visualizing effects with particles
Integrating particles
Summary
Chapter 5: Solving the Puzzle – Finishing Touches to the Puzzle Game
Drawing and graphical user interface
Gathering resources for creating the main menu
Scripting obj_main_menu
Changing obj_grid_manager
Integrating score and time
Summary
Chapter 6: Finite State Machines – Starting the 2D Platformer
Introducing finite state machines
Gathering resources for the platformer
Defining Vlad's state constants
Starting Vlad's events and scripts – walking
Summary
Chapter 7: It's in the Name – Platforms and Collisions
Collision – a crash course
Gathering resources to build platforms
Populating the room
Working with Collision events
Moving platforms with paths
Integrating the moving platforms
Preventing Vlad from leaving
Knowing the design ahead of time (when possible)
Summary
Chapter 8: Setting the Stage – Views, Backgrounds, and Tiles
Expanding the room – views
Adjusting view parameters
Preparing the game for obj_camera
Setting the environment – backgrounds
Introducing tiles
Summary
Chapter 9: Breaking Vlad – Pickups, Hazards, and Enemies
Tracking health with Draw and Draw GUI
Working with pickups
Dying from hazards
Fighting the player with enemies
Summary
Chapter 10: GOAL – Timelines and Feedback Review
GOAL!
Introducing timelines
Gathering resources for integrating the timeline
Creating and applying the timeline
Reviewing polish, feedback, and juiciness
Providing feedback when Vlad is damaged
Extending the enemy death sequence
Summary
In closing...

What You Will Learn

  • Create script resources as well as custom scripts for events
  • Learn how to import, compress, and play sound effects and background music
  • Build particle effect systems to give games a little extra flare
  • Track and display user interface elements such as health and scoring
  • Program and interact with simple yet challenging artificial intelligence
  • Read player input from a variety of sources
  • Utilize alarms to create a clean series of events
  • Establish a finite state machine to track a character's current state
  • Complete easy and fun games from start to finish

In Detail

GameMaker: Studio is a popular game engine used to publish games to a variety of platforms. Although GameMaker: Studio's drag-and-drop functionality makes creating games simple and fast, utilizing scripts can really help organize and speed up GameMaker's workflow exponentially.

This hands-on guide will help you build a strong foundation in programming in GameMaker Language by taking you through several example games. Knowledge gained by the end of the book can be applied so you can build your own line of exciting games.

Authors

Table of Contents

Chapter 1: Getting Started – An Introduction to GML
Creating GML scripts
Understanding parts of GML scripts
Pushing your buttons
Summary
Chapter 2: Random Organization – Creating a Puzzle Game
Understanding sprite variables and functions
Setting up the puzzle game
Aligning the pieces of the puzzle game to a grid
Understanding and utilizing randomization
Checking pieces
Running it all together
Summary
Chapter 3: So How Do I Play? – Adding Player Interaction
Designing player interaction
Creating resources to integrate mouse input into the puzzle game
Updating organization with scr_reorganize_board
Integrating keyboard input
Summary
Chapter 4: Juicy Feedback – Aural and Visual Effects
Introducing alarms
Hiding the pin drop – adding audio
Creating sound resources
Visualizing effects with particles
Integrating particles
Summary
Chapter 5: Solving the Puzzle – Finishing Touches to the Puzzle Game
Drawing and graphical user interface
Gathering resources for creating the main menu
Scripting obj_main_menu
Changing obj_grid_manager
Integrating score and time
Summary
Chapter 6: Finite State Machines – Starting the 2D Platformer
Introducing finite state machines
Gathering resources for the platformer
Defining Vlad's state constants
Starting Vlad's events and scripts – walking
Summary
Chapter 7: It's in the Name – Platforms and Collisions
Collision – a crash course
Gathering resources to build platforms
Populating the room
Working with Collision events
Moving platforms with paths
Integrating the moving platforms
Preventing Vlad from leaving
Knowing the design ahead of time (when possible)
Summary
Chapter 8: Setting the Stage – Views, Backgrounds, and Tiles
Expanding the room – views
Adjusting view parameters
Preparing the game for obj_camera
Setting the environment – backgrounds
Introducing tiles
Summary
Chapter 9: Breaking Vlad – Pickups, Hazards, and Enemies
Tracking health with Draw and Draw GUI
Working with pickups
Dying from hazards
Fighting the player with enemies
Summary
Chapter 10: GOAL – Timelines and Feedback Review
GOAL!
Introducing timelines
Gathering resources for integrating the timeline
Creating and applying the timeline
Reviewing polish, feedback, and juiciness
Providing feedback when Vlad is damaged
Extending the enemy death sequence
Summary
In closing...

Book Details

ISBN 139781783559442
Paperback350 pages
Read More

Recommended for You

Building a 2D Game with GameMaker: Studio [Video]
$ 10.00
Unity 4.x Game Development by Example: Beginner's Guide
$ 10.00
Unity 3D Game Development by Example Beginner's Guide
$ 10.00