O'Reilly logo

GameMaker Game Programming with GML by Matthew DeLucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Fighting the player with enemies

Enemies in platformer games such as the one being built in this book can come in a vast variety. There are some common themes that exist when discussing most enemies though, as shown in the following list:

  • They can cause harm to the player
  • They are usually not static, acting like moving hazards
  • They can be killed by the player

Now, not all enemies will exhibit all of the behaviors previously listed, but a good majority of them do. In this text, the enemies created will focus on at least two of these items at a time, particularly the ability to harm as well as be killed by the player.

There will be two enemies created in total. A simple enemy that walks back and forth and another that will utilize GameMaker's built-in, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required