Yadu Rajiv
Developing Turn-Based Multiplayer Games with GameMaker Studio 2 and NodeJS
Yadu Rajiv
Bangalore, Karnataka, India
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-3860-8 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-3860-8 e-ISBN 978-1-4842-3861-5
https://doi.org/10.1007/978-1-4842-3861-5
Library of Congress Control Number: 2018964003
Yadu Rajiv 2018
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
To my wife, Pooja, for all the love, courage, and strength that keeps me going; and to our lovely daughter Leela, who keeps us on our toes. To my father, mother, and brother for their love and unwavering support.
Introduction
Welcome to Developing Turn-Based Multiplayer Games with GameMaker Studio 2 and Node.js . This book will serve as a quick introduction to making turn-based multiplayer games with GameMaker Studio 2.
This book will serve as a handy guide to those who are already familiar with GameMaker Studio as well as an introduction to those who are new to it.
The first two chapters of the book introduce you to GameMaker Studio and how to start working with GameMaker Language (GML). We reinforce your learning in Chapter by making a simple, well-rounded, and playable game.
Chapter builds upon this experience to write a simple dice roller server application that can communicate back and forth with a client game made in GameMaker Studio.
Chapter focuses on taking you through the steps of building a slightly more complex turn-based game with Node.js.
Resources
The resources for this book can be downloaded via the download link provided here www.apress.com/978-1-4842-3860-8 . This includes code and resources that are referred to in the following chapters.
Acknowledgments
First, I want to thank my wife, Pooja, and our beautiful baby girl Leela. You have given me the strength and courage to keep myself afloat and sail on through the storms to find my small island of creativity.
Id also like to thank my Acquisitions Editor at Apress, Nikhil Karkal, for having faith in me and signing me up to write this book and my Coordinating Editor, Divya Modi, for her immense patience and constant support. Huge thanks to Matthew Moodie and Dickson Law for doing the technical review and weighing in at the right places to help me shape the content accurately.
I want to thank my friends Joel, Rishi, and Kinshuk for being constant forces of positive encouragement in my life.
A big shoutout to the community of game developers in Bangalore and the whole of India, and to all the Indies who keep the dream alive!
Lastly, I want to thank you, the reader, for buying this book. I hope it helps you get started on the extraordinary journey that is gamedev.
Table of Contents
About the Author and About the Technical Reviewer
About the Author
Yadu Rajiv
is a Game Designer, Developer, curator, and evangelist for independent games. In 2011, he co-founded Hashstash Studios, where he designed and developed multiple games. He teaches User Experience Design, Game Design, and Game Development at Srishti Institute of Art, Design and Technology, Bangalore, India. He has been building and supporting communities around game design and development since 2008 and is currently working on GameDev.in ( http://gamedev.in ). Yadu writes about Game Design, Game UX, and Development on Twitter under his handle, yadurajiv, as well as on his blog ( http://yadurajiv.com ).
About the Technical Reviewer
Dickson Law
is a GameMaker hobbyist, commentator, and extension developer with 8 years of community experience. In his spare time, he enjoys writing general-purpose libraries, tools, and articles covering basic techniques for GameMaker Studio. As a web programmer by day, his main areas of interest include integration with server-side scripting and API design. He lives in Toronto, Canada.
Yadu Rajiv 2018
Yadu Rajiv Developing Turn-Based Multiplayer Games https://doi.org/10.1007/978-1-4842-3861-5_1
1. An Introduction to GMS2
Yadu Rajiv
(1)
Bangalore, Karnataka, India
In this chapter, you will get started with GameMaker Studio 2 (GMS2). The first thing we will be doing is to find out how we can download and install the latest version of GameMaker Studio 2. Once we have downloaded and installed the software, we will get started with an overview of GameMaker Studio 2s interface and then move on to create our first project.
Through this chapter, you will get a basic understanding of how a GameMaker Studio 2 project is laid out and navigate the integrated development environment (IDE) . This will give you a foundation for all future projects to come.
Installing GameMaker Studio 2