Search Unity

A few general questions developing specific game features

Discussion in 'Scripting' started by mangustas, Mar 7, 2014.

  1. mangustas

    mangustas

    Joined:
    Oct 11, 2013
    Posts:
    15
    Hi all. First of all sorry if I'm in the wrong section of the forum. Sorry for that. If I really am in the wrong place, I will change it immediately.

    So I'm developing a 2D Infinite/Endless runner game, which is kinda similar to games like Banana Kong or other endless runner mobile game (yes, I'm developing a game for Android/iOS). I working alone so I'm doing scripting, designing and all the other stuff in game development. For now I have basic prototype game with very basic 2D endless runner game features, but I want to improve the game. So I have a few questions which I cannot decide how to make those features by my own. I do not ask that you write code for me or something that specific. I just want you guys to maybe explain a bit or maybe give me a link to tutorial or something like that.

    1. As I said it is a 2D endless runner game (similar to Banana Kong). And what I really want to implement is parallel gameplay sections. This is a feature like in the mentioned Banana Kong game, where if you collect that much bananas you may can to go through more section in the game (like from Jungle to Underground, or from Jungle to Underwater). Is there any tutorial link to make this kind of feature? For my part I think that maybe I just need to make different scenes with a whole different playground but I don't know how to make that transition between those scenes if for example if I got caught in Underwater scene, when somehow I need to back to the main scene (Jungle, for example). Any ideas?

    2. Is there any way to make different death animations? For example if I collide with a knife, I would make a cut animation to the main character, if I collide with a rock, I got a bump animation, and so on. I actually don't even have any ideas for this :(

    As I said before, I really appreciate any tutorial link (or other type of information) and ideas. Hope someone could help me with these two questions. Thank you.

    P.S. Hopefully everyone understand my English. It's not my primary language but I tried hart to not make any mistakes.
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    re 2)

    yes, you would need to use something like an enum to create a value for each of the deathTypes and use those values in the mechanim system to move to the correct animation to play. So instead of having a transition with a condition of just "die == true" you would have a transition of "die == true and deathType == bump" this would go to the animation for the deathBump, you'd have another transition for "die == true and deathType == knife" going to the animation for deathKnife etc.
     
  3. mangustas

    mangustas

    Joined:
    Oct 11, 2013
    Posts:
    15

    Thank you for the answer. I'm gonna check out what I could do with ENUM. Sounds like a nice idea!

    Maybe someone know how to make parallel game sections (or maybe multiple scenes within a scene) ? :)