Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
HTML5 Game Development with GameMaker
HTML5 Game Development with GameMaker

HTML5 Game Development with GameMaker: Experience a captivating journey that will take you from creating a full-on shoot 'em up to your first social web browser game

Arrow left icon
Profile Icon Jason Lee Elliott
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (5 Ratings)
Paperback Apr 2013 364 pages 1st Edition
eBook
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Jason Lee Elliott
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (5 Ratings)
Paperback Apr 2013 364 pages 1st Edition
eBook
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

HTML5 Game Development with GameMaker

Chapter 2. Triple 'A' Games: Art and Audio

Now that we are comfortable navigating around the interface and have built a simple game, we can start to create more complex projects. In this chapter we are going to focus on creating art, adding animation, and implementing an audio soundscape. All three of these elements are incredibly important for the creation of a game as each of them helps the player to understand what is happening and makes the experience more immersive. How we go about building a game can be drastically affected by the types of assets we use and how they are implemented. We will start by looking at importing external images and move onto some practical examples of how to create a tileset and make an animated character. We will then move onto audio files and how to add ambience to a game. We will wrap up the chapter with a brief talk on how to make a game look more professional. Let's get started!

Manufacturing art assets


More often than not, when creating a game, the majority of the art assets will be created in an external program and it will need to be imported. It is true that GameMaker: Studio does have an in-built image editor that we will investigate later, but its capabilities are fairly limited. It's perfect for creating simple art, but there are many other tools that provide us with much more advanced techniques for creating complex art.

There are many popular software options you might want to consider. The most full featured option and the most expensive is Adobe Photoshop , which is the preferred option for most professional artists and can be purchased at http://www.photoshop.com/. A free alternative with many similar capabilities is GIMP, downloadable at http://www.gimp.org/. Both these packages offer a full suite of advanced tools for creating images. There are also many other simpler tools available, such as Pickle http://www.pickleeditor.com/, Spriter http://www...

Importing sprite sheets


While all the animations in this book will be using GIF images for the sake of expediency, it would be remiss if we did not cover how to import a sprite sheet. A sprite sheet is generally a PNG file with all the frames of animation of an object, such as a character, placed evenly in a grid. We can then quickly cut out each frame of animation in GameMaker to build the individual sprites we need. Let's try this out!

  1. Let's start by opening a New Project called Chapter_02.

  2. Create a new Sprite and name it spr_PlayerSpriteSheet.

  3. Click on the Edit Sprite button to open the Sprite Editor.

  4. Under File, select Create from Strip, and then open Chapter 2/Sprites/PlayerSpriteSheet.png with nothing selected in the Image Information section. This will open the Loading a strip image editor.

  5. The sprite sheet we just loaded consists of a six frame run cycle. Since we want all the frames, we need to set number of images to 6.

  6. The layout of the sprite sheet has two rows of three images. Set...

Introducing the image editor


One of the big benefits of developing with GameMaker: Studio is that it has an in-built Image Editor for creating sprites and backgrounds. This editor may appear to be very basic but there are a lot of excellent tools available to use. There are a variety of different drawing tools including the standard tools such as pencil, eraser, and fill. One very useful and unique feature in the editor is the ability to paint with both mouse buttons. The Colors | Left and Colors | Right color options, as seen in the following image, indicate the color that will be used depending on whether the left or right mouse button is being used. We can also adjust a wide range of things through the Transform and Image menus. The Transform menu contains the ability to affect the size and placement of the pixels in the image. The Image menu contains the image alteration tools such as the ability to change the color, blur the image, and add glows.

Rather than talking about the image...

Animating and creating sprites


Animated sprites are a sequence of static images which, when played, appear to have a movement. It lets the player know that they are running, when they are attacking with a sword, and that a button is clickable. Good games have animation on everything interactive and often on many of the background elements, so much so that you may not even notice it. It is the tiny details such as animation that really breathe life into a game.

The illusion of action

Creating animation takes time and a sharp eye, but basic animation, even of characters, can be done by everyone. There are a few important rules to follow to make animating easier. First, it is about the appearance of an action, rather than the accuracy of an action. As can be seen in the following screenshot, the first sword set swinging animation is technically accurate; the sword would be in each of these positions. However, the second set will appear more natural as it includes a blur effect that one would...

Manufacturing audio


Audio is incredibly important for creating a professional quality game. Unfortunately, it is often the most neglected element and the last to be implemented. One reason for this is the fact that we can play a game without the audio and still enjoy the experience. However, a good soundscape in a game will make it much more immersive and help improve user feedback.

In order to create audio we will need to use external software, as GameMaker: Studio does not come with any built-in audio creation tools. There are a range of software choices to choose from. For creating sound effects and music there are popular programs such as the very full featured Reason, http://www.propellerheads.se/, which emulates a rack of synthesizers, mixers, and other components. On the free side, there is BFXR , http://www.bfxr.net/, that allows you to create game sounds online and then there is also Sonant , http://sonantlive.bitsnbites.eu/, for making music. All these packages are fun and easy...

Using the GM:S Audio engine


GameMaker: Studio comes with two different sound engines for controlling the various audio in games: GM:S Audio and Legacy Sound. These systems are completely independent from each other and you can have one system or the other active in a game.

The GM:S Audio engine is the new, more robust sound system that was designed to allow a full 3D soundscape through the use of emitters and listeners. Emitters allow for the positioning in game space where sounds are going to occur. There are functions for adding falloff of the sounds, velocity to emulate movement, and more. Listeners give even more control by dictating how the sound is played based on where the player is in the game, including their orientation and velocity. If you do not declare a listener, then the sounds become universal. This will eventually become the primary audio engine in GameMaker: Studio, but because of the HTML5 audio issues, it doesn't work properly in all browsers.

The Legacy Sound engine...

Raising the quality bar


When looking at the hundreds of thousands of games out there, it is quite easy to recognize the top-tier games from the bottom-tier. However, when we look across the spectrum at all the best games, there is a stark difference between them. Some games are very minimalist, some are photo-realistic, while others are fantastical. These games might be made by a few people, or a large team of specialists. What is it that makes games that are fundamentally so different still able to achieve the same definition of quality? The answer is quite simple and can be summed up by three general principles: Consistency, Readability, and Polish. While creating high caliber art and audio, it does require plenty of acquired skills learned through years of study and practice. Following these few rules will help make any game appear more professional.

Consistency

Consistency sounds obvious but it is actually a lot more challenging than one might expect. Each sprite, background, or other...

Summary


Creating art and audio for games is an enormous task, both in terms of the time it takes and the assets to be produced. As a game developer, it is your responsibility to ensure that everything is cohesive and aesthetically pleasing, whether you are creating the assets or working with artists and sound designers. In this chapter you have started to understand how art and audio works in GameMaker: Studio and what the difference is between good and good enough. You learned about the acceptable image formats and how to import a sprite sheet. You created a tileset that will make better use of computer memory and allow for large unique worlds. You animated a sprite and made it loop properly. You also learned how to control sounds and the direction they are heard from. You are now ready to start making real games!

In the next chapter we are going to build our second game, a side scrolling shooter. We will create a player that moves around the screen, build several enemies that shoot weapons...

Left arrow icon Right arrow icon

Key benefits

  • Build browser-based games and share them with the world
  • Master the GameMaker Language with easy to follow examples
  • Every game comes with original art and audio, including additional assets to build upon each lesson.

Description

The introduction of HTML5 has revolutionized the web browser as a legitimate gaming platform with unlimited potential. Making games for the browser has never been simpler, especially with GameMaker Studio. Developers have full control over asset management, built-in systems for physics, particles and path finding. In addition, it offers a rich scripting language and extensions for developers now enabling everyone to create games and monetize them quickly and easily.HTML5 Game Development with GameMaker will show you how to make and release browser based games using practical examples. This book utilizes GameMaker's powerful scripting language allowing you to create your first game in no time. With this guide you will develop a thorough skill set and a coherent understanding of the tools to develop games of increasing complexity, gradually enhancing your coding abilities and taking them to a whole new level. The GameMaker Studio environment allows you to jump right into building browser based games quickly and releasing them online. The chapters focus on core practical elements, such as, artificial intelligence and creating challenging boss battles. This book guides you on how to use advanced features easily and effectively, these include, data structures and demonstrating how to create rigid body physics with simple explanations and visual examples. By the end of this book you will have an in-depth knowledge of developing and publishing online social browser based games with GameMaker.

Who is this book for?

This book is for anyone with a passion to create fun and action packed web browser games using GameMaker Studio. This intuitive practical guide appeals to both beginners and advanced users wanting to create and release online games to share with the world, using the powerful GameMaker tool.

What you will learn

  • Create great web based and social networking games, including games for Facebook, no experience is needed
  • Implement Pathfinding and Artificial Intelligence
  • Make games in various genres using the GameMaker Language
  • Explore and appreciate the most popular mobile games genre, Physics based games
  • Add unlockable levels, equipment and inventories
  • Create amazing particle effects for any game
  • Publish your games online, play with friends on Facebook

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 22, 2013
Length: 364 pages
Edition : 1st
Language : English
ISBN-13 : 9781849694100
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Apr 22, 2013
Length: 364 pages
Edition : 1st
Language : English
ISBN-13 : 9781849694100
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 124.97
Gamemaker Essentials
$26.99
jQuery Game Development Essentials
$48.99
HTML5 Game Development with GameMaker
$48.99
Total $ 124.97 Stars icon
Banner background image

Table of Contents

9 Chapters
Getting to Know the Studio with Your First Game Chevron down icon Chevron up icon
Triple 'A' Games: Art and Audio Chevron down icon Chevron up icon
Shoot 'em Up: Creating a Side-scrolling Shooter Chevron down icon Chevron up icon
The Adventure Begins Chevron down icon Chevron up icon
Platform Fun Chevron down icon Chevron up icon
Toppling Towers Chevron down icon Chevron up icon
Dynamic Front Ends Chevron down icon Chevron up icon
Playing with Particles Chevron down icon Chevron up icon
Get Your Game Out There Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(5 Ratings)
5 star 60%
4 star 20%
3 star 0%
2 star 20%
1 star 0%
Michael Dailly May 17, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good, well written book that introduces you easily to GameMaker: Studio, taking you through the problems of creating HTML5 content, and how to implement some analytics and social features. Good read.
Amazon Verified review Amazon
Filipe D. Fortes May 19, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a must buy for any Game Developer wishing to make HTLM5 games with Game Maker. The authors go above and beyond to explain in concise easy to understand bites, what exactly HTML5 is and how it evolved to this point.Not only are the examples in the book fun to put together, they are also pretty open ended and this leaves the reader with a sense of courage to modify and tinker with the examples and keep on developing.Overall this is a great book that really shines when compared to other titles of the sort. The author is brilliant and I cannot wait to see a second edition HTML5 title with even cooler projects/lessons. It's going to be hard to top this one though, because they've set the bar very high as to how technical books should be written.I recommend it for EVERYONE. Beginner's and Pro's alike will get something out of this book. GameMaker: Studio Professional [Download ]
Amazon Verified review Amazon
Angel Pretelin Ricardez Mar 17, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book helped me with the use the physics engine of Game Maker Studio. The book came to Mexico in perfect condition.
Amazon Verified review Amazon
Svetoslav Iliev Oct 02, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
One of the better Game Maker books out there. It covers a lot of ground and teaches some useful concepts.Definitely worth getting compared to other GM books.
Amazon Verified review Amazon
Daniel Stern Jul 29, 2013
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Unfortunately I did not find the book useful as it focuses largely on using the GameMaker Pro software suite which I could not afford.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.