GMS 2 Best way to create enemies attack patterns. Shoot em up

Ramón

Member
Hello.
I am using GameMaker Studio 2.2.1.375, and I am new programming games. I am programming using GML.
In this moment I am creating a Shoot em up, and I have a doubt about the creation of enemies attack patterns.
I can use Timelines, alarms...
Do you know what is the best way to manage the enemies attack patterns in this type of game?

Thanks in advance.
 

Guitarmike

Member
You have a couple of choices depending on what you want to do. You can create static paths ahead of time using the path editor and then assign them to instances. Or you can program some AI to have them create dynamic paths based on player movement, environment, etc. There are lots of tutorials on this on Youtube. Another option is to use the basic Gamemaker pathfinding system based on mp_grid. It really depends on the kind of behavior you want your enemies to exhibit and how dynamic you want that behavior to be. Good luck!
 

samspade

Member
Personally, I would use a state machine
Hello.
I am using GameMaker Studio 2.2.1.375, and I am new programming games. I am programming using GML.
In this moment I am creating a Shoot em up, and I have a doubt about the creation of enemies attack patterns.
I can use Timelines, alarms...
Do you know what is the best way to manage the enemies attack patterns in this type of game?

Thanks in advance.
It's a little difficult to answer this question as an enemy is a collection of various AI behaviors - for a shoot em up that is mostly movement and shooting. Those could be connected or entirely unconnected.

Either way, if you're not familiar with state machines I would also consider looking them up. While most GMS state machine tutorials are directed more towards building a player character, the exact same ideas work with enemies. There are also several bullet hell generators in the marketplace that you could look at. I believe there's even a full shmup demo project.
 
Top