I've found many tutorials online for unity making homing missiles. I can't find one for people not using unity.

Recommended Answers

All 3 Replies

Your topic needs clarification. As I have worked in C# albeit not for homing missiles I did work in the defense industry decades ago on a few missile systems then later industrial products.

Putting aside asking if this was a missile or a game any app you write involving missile tracking and such could have a lot of other items that have to be shared such as:

  1. Is this IRL a "missile"?
  2. Is this a game?

For the first you would be working with dozens of engineers to create and manufacture the product.

For a game you rarely go commando as in you don't use any library or game development system. Today it's rare to see such made without supporting libraries and APIs.

Further to the game, today's games are quite visual so the work to make a homing missile In Real Life (IRL) versus a game would take entirely different skill sets.

For IRL missile, well, that development has not been one I've read as Open Source or discussed in the open.
For the game, missile graphics and mechanics are usually worked out by more than one person. I'm talking about AAA games here. If this is something of an Indy work, then you do what you can and have the missile fly in a straight line from launch to impact. Nothing fancy.

Yes, I'm sorry I thought I mentioned that in my question. I am trying to make a scrolling type video game and I figured out how to animate the missile and have it moe forward but I can't figure out how to make it a homing missile. There will be 7 enemies in the game and I was going to have a random choose which enemy it will seek out. Which I figured out for the game. So far, I only put 3 enemies because I wanted to start small, figure it out and then add enemies once I figure out how to make the homing missing work. As you can see its far from complete.

This is a snippet of the program I am working on.

void movemissile()
        {
            Random enemy = new Random();
            int ene;
            ene = enemy.Next(1, 5);
            foreach (Control y in this.Controls)
            {
                if (y is PictureBox && y.Tag == "missile")
                {
                    y.Left += 100;//x.Top -= 10;
                    if (y.Top > 900)//<100
                    {
                        this.Controls.Remove(y);
                    }
                }
            }
        }

That clears up a lot.

I'd look to using a game development system now.

https://github.com/yoyoberenguer/Homing-missile lets you read how it was done in a 2D game. You get to repurpose if you wish.

Your supplied code looks rudimentary. That is, you may have a few years before you can compete with other game programmers. Don't get stuck here by eschewing Game Dev Kits.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.