Finally there…almost

Well, Im about done with my first project, the 2D Space shooter game. I have been working my way towards completing this, what seems like months, for two and a half weeks. I was hoping to finish up today but there were a couple of hurdles to jump over and I was stumped for a while. The last thing that is left is having the enemies come in waves with the boss at the end. I left it tonight with the Boss ship. I almost have it working to spawn up top then come to the middle of the screen and then fly side to side while shooting fireballs in my direction wherever I am. It is all coming together pretty well and I have been learning quite a bit. It is amazing how much horrible information that is on the internet to sift through until you can come across a clear explanation of some of the methods used in C# and Unity. I feel I spend most of my research time figuring out that what Im reading either wont work for my situation or it is too outdated to work at all.

This has been my journey in coding. While frustrating at times, it is exciting and rewarding when you can make it work. I am loving making games, its a bit more exciting and enjoyable than web development. I can truly see my creations coming to life. In web development, alot of the times, the creations are static and it is just the aesthetics that are nice. Im excited to finish this part of the course and dive into cinematography. I have seen some of the work my teammates are doing that are ahead of me and it looks truly amazing. They are good at what they do as well.

Today I had some challenges trying to figure out how to make a homing missile. I chose to animate an orb for my homing device. It was tough trying to figure out how to do it. At first my orb was just shooting straight up and kept going. Then it would start towards the target but would only go diagonally in one direction and back on the same angle. I finally got it to work properly to where it would rotate and follow the target until contact. Here is the code:

I used the Vector3.Cross method which uses the cross product of two vectors. This worked really well and shows a nice smooth movement with my orb.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store