Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Gamemaker Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Gamemaker Essentials

Gamemaker Essentials

close
close
Gamemaker Essentials

Gamemaker Essentials

Overview of this book

This book is for users experienced with game development who now want to learn how to develop games in GameMaker: Studio in a fast-paced way.
Table of Contents (11 chapters)
close
close

Enemies


We now have the very basics of a game. We have a player who has something to do. However, there is no challenge to the game at this point. In nearly every game, there is some sort of challenge or problem to overcome. This gives the player more purpose and makes their goal harder to achieve.

For this game, let's simply add in some enemies. These enemies will spawn randomly just like the collectable items, and they will also randomly choose to go either vertically or horizontally. When they collide with a wall, they will turn around and go the other way. We can also randomize their speed to add more variety and challenge.

Once again, let's start by creating a new sprite. Name it spr_Enemy and create a simple 32 x 32 red square. Once again, this can be changed later on, but for now, let's keep things simple.

Now, create a new object and name it obj_Enemy. Link the new sprite to it; then, add a create event and drag in a code block.

There are three essential variables we need to create for...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Gamemaker Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon