Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
GameMaker Cookbook

You're reading from   GameMaker Cookbook Over 50 hands-on recipes to help you build exhilarating games using the robust GameMaker system

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781784399849
Length 212 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Game Plan – Creating Basic Gameplay FREE CHAPTER 2. It's Under Control – Exploring Various Control Schemes 3. Let's Move It – Advanced Movement and Layout 4. Let's Get Physical – Using GameMaker's Physics System 5. Now Hear This! – Music and Sound Effects 6. It's All GUI! - Creating Graphical User Interface and Menus 7. Saving the Day – Saving Game Data 8. Light 'em up! – Enhancing Your Game with Lighting Techniques 9. Particle Man, Particle Man – Adding Polish to Your Game with Visual Effects and Particles 10. Hello, World – Creating New Dimensions of Play Through Networking Index

Following the cursor

As long as we're using the mouse, we may as well look into further uses for our favorite peripheral. Some games, like the brick breaker subgenre, may use the mouse without relying on the mouse buttons. As you move your mouse left and right, your paddle moves correspondently onscreen, allowing you to bounce a ball upwards toward bricks. You know…the ones you want to break. Tennis-style games like Pong work on the same basic principle, only on a different axis. If you've ever wanted to revisit this classic control scheme, now is as good a time as any.

Getting ready

We won't get into creating a full Pong or brick breaker style game at this point; we only want to learn how the paddle moves. In this case, we'll make a paddle that moves along the x axis. That said, all you need is a sprite and object named in the vein of _paddle and you're set.

How to do it...

Get ready for this one, it may take a while.

  1. In obj_paddle add a Step event.
  2. Place a code...
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 AU $24.99/month. Cancel anytime