Sin Curves and Laser Beams

Ive tackled a bit less than I imagined today. I am almost done with my space shooter game but there are a few hills to climb still. I was hoping to finish up today but I ran into a few roadblocks in figuring out how to make some things work. Aside from the fine tuning that is needed, I still need to introduce the enemies in waves, create a boss, and set up a homing missile powerup. I introduced a cool movement for one of my spaceships using Mathf.Sin(). It makes an interesting curvy zigzag up and down and bounces back and forth between the two sides of the screen. Here is the code I used:

It worked out pretty great. I have this spaceship shooting a long electrified laser beam out. At this point my game is hard because I dont have the waves set up so they are all coming at once. I have some flying diagonally at me with shields on and some coming down the scene that ram me when im close. There are lasers flying everywhere and I still have to create a boss which Im going to have throw fireballs at me all over the screen. I just started working with Raycast and trying to figure out how to use it for a couple of different challenges I have on this project where I feel it will be useful.

It has been really great learning to use these different methods and working with the Unity game engine. It is pretty amazing what can be created from this. I have been watching trailers from games like Rust and series like Adam. Both of which are pretty amazing. The uses are limitless. Im hoping to I am excited for the next step hopefully in the next day or so when I can start on the cinematography portion.



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