Enemy Movement Patterns for Unity 2D Shooting Games: Easy to Implement and Enhance Gameplay - mohumohu studio

mohumohu studio

           

みずきの技術&読書ブログ&無料ゲーム

プロフィール画像

Enemy Movement Patterns for Unity 2D Shooting Games: Easy to Implement and Enhance Gameplay

Great work, everyone!!

I was thinking about what kind of enemy movements to use for the shooting game I’m currently developing, and when I asked ChatGPT, it suggested several patterns that seemed immediately usable — so I thought I’d share them with you all!


Table of Contents


Basic Movement Pattern

① Straight-Line Movement (Top → Bottom)

  • Description: Simply moves straight downward
  • Difficulty: ★☆☆☆☆
  • Best used in: Tutorial or early stages

② Moves Downward While Swaying Left and Right (Wave Movement)

  • Description: Moves in a zigzag pattern, making it harder to dodge bullets
  • Difficulty: ★★☆☆☆
  • Best used for: Mid-game and later stage minor enemies

③ Slowly Tracks the Player

  • Description: Gradually approaches the player’s position
  • Difficulty: ★★★☆☆
  • Best used for: Enemies that create a sense of tension

④ Changes Direction Randomly (Unpredictable Movement)

  • Description: Changes movement direction at set intervals
  • Difficulty: ★★★☆☆
  • Best used for: Ambush-type enemies

With Action Pattern

① Approach → Explode

  • Description: Approaches the player and self-destructs
  • Difficulty: ★★★★☆
  • Best used for: High-risk, charge-type enemies

② Appears from Behind → Disrupts Player’s Progress

  • Description: Appears from behind, not above the camera, and pursues the player
  • Best used for: Mid-boss type enemies that create tension

③ Flies in Formation (Formation Type)

  • Description: Multiple enemies appear together in a formation
  • Examples: V-shape, vertical line, horizontal line, circle
  • Best used for: Visually appealing, also great for bonus stages

Special Patterns for Bosses

① Stops at Regular Intervals to Scatter Bullets

  • Description: Stops to fire rapidly → Moves → Fires rapidly again
  • Best used for: Mini-bosses, boss battles

② Movement Pattern Changes Across Multiple Phases

Example:

  • Phase 1: Straight-line movement + Single bullet
  • Phase 2: Wave movement + Spread bullets
  • Phase 3: Homing movement + Rapid fire

Additional Notes

  • Enemy movement can be handled either in the Update method or by using Rigidbody2D’s velocity.
  • Managing patterns with ScriptableObjects or Enums makes it easier to extend.
  • For the bullets (bulletPrefab), set the behavior (such as straight movement, spread, etc.) in a separate script.。

Summary

This time, I shared some enemy movement patterns for Unity 2D shooting games that are easy to implement and enhance gameplay!

ChatGPT, who instantly suggested so many patterns, is really amazing!

I’m always grateful for the help! It’s like having a companion for game development (laughs).

2025-06-22

0件のコメント

コメントはまだありません。最初の一人になりましょう!

Leave a Reply

Your email address will not be published. Required fields are marked *