Advertisement

Space Shooter Enemies

Started by April 14, 2016 06:40 PM
0 comments, last by FrogJohnson 8 years, 8 months ago

Hey everyone!

I'm currently working on a Darius Gaiden type space shooter, and I'm having some problems with the enemy AI (sort of AI, I guess). I want to make enemies move in all sorts of patterns (like so

) and come in in waves. I have some ideas that include using animations to move them; using the NavMesh and letting the enemies find their path through some empty game objects; using some asset called "ITween". There are more types of enemies and each has their own pattern, maybe even more patterns. They are not reacting to the player's action (no dodging etc.), they just follow their paths.

Thank you very much and have a nice day!

Hi,

For complex enemy paths, using Bezier curves and/or splines might be a good starting point. I made a basic shmup in unity and used bezier curve components from http://catlikecoding.com/unity/tutorials/curves-and-splines/

What I did: Add child objects with the spline component to the enemy spawners. Enemies which need to travel in a path have a "MoveAlongPath" component with a reference to the spline component from the spawner's child object. This reference assignment is done as soon the spawner instantiates the enemy. After that just keep incrementing the spline parameter using a hardcoded or configurable fraction (I went with 1.0/duration, explained on the link above) and get the position vector on the spline using that parameter

This topic is closed to new replies.

Advertisement