Monday, October 19, 2015

Unity Day 24 (Space Shooter Project)

What I Did:

     So today I figured out that the problem from last day was simply me dragging the asteroid prefabs to the wrong location, I needed to drag them directly onto the array that war created in the inspector. So now that this problem was fixed, in play mode 3 different types of asteroid models are now spawned. So now I began making it so that the background would scroll during the game play. To do this I first started by adding the star field particle effect by dragging its prefab into the hierarchy from assets/prefabs /VFX. The star field effect was already set upon taking it so I left it as is. I then duplicated the background and tweaked the duplication's y position to -1 so it is exactly touching the previous background. I also made the duplication a child of the original so that the script i was going to create and attach to the original would also apply to the duplicated background. Then I created a new script on the first background and named it BGScroller. Upon doing that I added code telling it how to make it move. This simple code gave me two variables to tweak in the inspector. The tile size was set to 30 because its the same as the background and the scroll speed was set to -0.25. Now the background scrolls along, and stars twinkle along with it.\



Tutorial Started: 00:12:01
Tutorial Stopped: 00:34:20

What I Learned:

     I Learned how to make a cinematic background with different effects.

What I'm Doing Next Day:

     Next day I will be implementing enemy ships into the game that shoot and dodge.


No comments:

Post a Comment