Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Marvin Hawkins · Feb 05, 2011 at 04:45 PM · airaycastingpathfindingshmup

How do I handle Pathfinding in Shoot Em Ups?

Hello,

I'm working on a top down Shmup. (Think Air Attack HD, Ikkaruga etc) In these games, enemies fly at you in waves. Usually, when they get to a certain point, they change their direction. In my current game, the enemies just translate in one direction. (left to right, or up and down) I have tried the math.pingpong function. It's okay, but it the behavior is not exactly what I had in mind.

So my question: How is enemy path finding usually handled in games like these? I imagine these enemies follow some type of paths

I found the Angry Ant A* pathfinding tutorial. I have not used it yet, but I feel it may be overkill. I also have found a few tutorials that allow the enemy AI to go between a few points. Again, I just imagine that this would be a huge hit on a computer's memory to have multiple entities checking waypoints every few minutes. Do these games use raycasting? (Disclaimer, I don't know much about raycasting...) Should I have the enemy check what his current world position is, and go in a different direction when he reaches a certain point?

I'll stop babbling, but can anyone point me in the correct way of thinking? Thanks in advance.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Marvin Hawkins · Feb 05, 2011 at 05:08 PM 0
Share

This video does a decent job of illustrating what I'm looking for. Note the red planes that spawn from the red cube. They seem to follow a path along the green cubes. I hate to ask, but what type of math is involved?

http://vimeo.com/13428175

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Skjalg · Feb 05, 2011 at 08:34 PM

Its mentioned in the video, but the math used is a Bezir Curve.

"All boxes have a purpose : one spawn point (what NPC load, how many..), one start point (first point of the path), a final point and one or two mid points. So to calculate the Bzier curve, three or four points are used."

http://en.wikipedia.org/wiki/B%C3%A9zier_curve

http://answers.unity3d.com/questions/5279/moving-an-object-along-a-bezier-curve

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Marvin Hawkins · Feb 06, 2011 at 05:51 PM 0
Share

Thanks! This looks like a good resource. I'll check it out.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Raycasting crashing Unity? 3 Answers

Movement around a huge object by avoiding obstacles 1 Answer

Aron Granberg's A* seeker goes back and forth if a smooth modifier is attached. 0 Answers

Restricting NavMesh path finding directions 1 Answer

A* pathfinding for 2D top Down 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges