Tuesday, November 17, 2015

Week 8 Blogpost#7 Another assignment begins !

For this week’s class we started working on our final gam 111 projects, which is due in week 12.We would be making a game like the “South Park Let's Go Tower Defense Play! ”.Though making the game would be a challenge I am looking forward to completing it.


While in class we learnt how to splice 2d sprites and use multiple sprites to create animation so it would look like the sprites were walking but at first we learnt of a way to color our Debug.Logs in the console window with in unity.

Coloring debug.Logs is very simple all you would have to do is add <Color=your color> within the hyphen before you type in your debug.log message and to remove the color you can type </color> before the words you would like the log not to be colored .


Example of code used  :-





Splicing the 2d sprite may be challenging for some people at first but it is very simple if you get used to doing it. . Here is a step-by-step way on how to splice and animate and move based on your animation.


-You will need to get the sprite sheet of the sprite you would like to animate and drag it into unity, after which change its texture type to sprite (2d and UI) and the sprite mode to multiple.






-You must splice the images in the sprite editor and the automatic slicing should take care of it, if not you may need to manually splice the images.

-You must drag each animation and drag it into the unity hierarchy and unity will make the animation for each direction.

-You would have 4 spirits and 4 animations, which you can rename to top, left, right and down as the unity naming conventions are very long.

-You must go into the animator and create state machines for every movement but the first one will be made for you thus you must create only 3 more and name them the same way you named the sprites.

-You must add states and then add the animation of each animation in the correct states ex right movement in the right state. After you are done with the states go into the parameters section and create a int parameter and name it anything you like for my version I will name it Direction and set it to zero by default.

-After you are done making the states you must connect them to each other by making transitions by right clicking and selecting transitions and assign each transition a number under the conditions in the inspector windows.

 -Once you are done with the states and transition make sure all the right animations are in place and create a new script to control the players animation based on key controls. First start with a new script in which you must declare Animator; in order to use get component and access the animator component after which you must use the numbers associated with the transition to move which is shown in the screenshot shotshot below .


My goals for this week is to work on the GUI for the game and complete the player movement and firing projectiles .

No comments:

Post a Comment