Search Unity

Space Shooter tutorial

Discussion in 'Getting Started' started by paddyrao, Apr 27, 2015.

  1. paddyrao

    paddyrao

    Joined:
    Apr 16, 2015
    Posts:
    5
    I was able to complete the Space Shooter tutorial with Unity 5.

    First, these tutorials are great.

    Second, with Unity 5, please use the AudioSource class instead of the Audio class. Worked like a charm.

    Third, I use the iMac, and found that "Fire1" button translated to the "control" key on the iMac. May be obvious to many folks, but I had to experiment with various keys and was relieved the control key actually began firing shots. For a while, I thought my code did not work.

    Last, a small bug in the (or could have been only with my) code, and my 10 year old son pointed it out right away. The score increments even when the hazard hits the player object, and that was fixed easily with this change in the DestroyByContact script:

    Instantiate (explosion, transform.position, transform.rotation);
    if (other.tag == "Player") {

    Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
    gameController.GameOver ();
    }
    else
    {

    gameController.AddScore (scoreValue);
    }
    Could anyone please point me to the tutorial that adds more hazards and changes to the Space Shooter game?

    Thanks,

    Paddy
     
  2. Sylvir

    Sylvir

    Joined:
    Mar 21, 2015
    Posts:
    396
    what kinds of hazards and changes are you looking to make? if you give me some specifics on what your wanting to add to it i could probably help you out with some ideas, feel free to shoot me a private message and we can talk about it there if youd like. I am still fairly new as well, but am learning too!
     
  3. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    The tutorials are there to give you a start. You should feel encouraged and empowered to extend them with additional features as you see fit!

    Always save your tutorial projects. As you go through other tuts, come back to ones you've completed and see what new things you've learned you can apply to improve and add to the project. If you have an idea for something but aren't quite sure how to do it, check out the API documentation and try to suss your way through it.
     
    Hamzey and Sylvir like this.
  4. paddyrao

    paddyrao

    Joined:
    Apr 16, 2015
    Posts:
    5
    Sylvir, Schneider21, thank you for the replies.

    Sylvir, the first lesson shows how the game should look, and it has more objects than just the asteroids. In fact, subsequent lessons state that you will be adding more to the project. However, the Unity website does not seem to have those links. I have been able to successfully add the asteroids and test.

    Schneider21, my projects are saved, so there are no worries on that front.

    That said, I have moved on to the next lesson on the Unity website.
     
    Sylvir likes this.
  5. Sylvir

    Sylvir

    Joined:
    Mar 21, 2015
    Posts:
    396
    awesome, I am glad to hear that you got it figured out. The unity website lessons, and live training video archives have been immensely helpful for me as i am too learning the software, and C#