Search Unity

Minigames Inside a 3D Third Person Game

Discussion in 'Editor & General Support' started by krisian, Dec 2, 2013.

  1. krisian

    krisian

    Joined:
    Nov 22, 2013
    Posts:
    8
    First of all I want to thank Unity for providing a free yet wonderful application for creating apps.

    I am a graduating IT student who is creating a game for my thesis. I am completely new to game development but I am very eager to learn and dedicate lots of hours per day to create and finish my thesis. By the way I am from the Philippines.

    My proposed thesis is a Philippine Inspired 3d adventure educational game. I have been trying to learn the basics for two weeks now and had great progress.

    My questions would be

    How can I make mini-games inside my 3rd person game? like jigsaw picture puzzle and answer the questions?
    How can I trigger them?
    How can i make a portal for like ex from stage 1 up to stage 2?

    Thanks in advance. I would really appreciate it!
     
  2. sti4thewin

    sti4thewin

    Joined:
    Apr 21, 2013
    Posts:
    31
    Can you explain in a bit more detail exactly what you want to achieve?

    You can trigger "mini-games" however you want to.
    If you shoot me some more details of exactly what you want, I might be able to give a pointer or two.
     
  3. krisian

    krisian

    Joined:
    Nov 22, 2013
    Posts:
    8
    Sorry for not being specific, what I want to achieve is to be able to access a minigame(for ex a multiple choice quiz game) inside a 3d game world

    For example when I approach this crate and would press e, the minigame will start.
    $sample.jpg

    Sorry for my bad english..
     
  4. krisian

    krisian

    Joined:
    Nov 22, 2013
    Posts:
    8
    bump..
     
  5. Plaban

    Plaban

    Joined:
    Jan 23, 2014
    Posts:
    16
    Hello Guys...

    I am in similar situation like Krisian...

    I want to build a game where users can create and publish game. I will provide and actions they just need to put them together. When they publish others can play.

    Is it possible ?

    Thanks for any help In advance...
     
  6. MDragon

    MDragon

    Joined:
    Dec 26, 2013
    Posts:
    329
    @Plaban: That's a tad bit too different to cover under this topic. I'd suggest asking in the scripting section, but it would consist of making your own in-game editor, defining "game" and the limits of the editor, serializing the data properly, a bit of networking for publishing (depending on how you aim to share the data), and more. Possible but quite a bit of work.

    @krisian: If you want to, say, approach a box and press e, it would take a few steps. First, I'm about to assume these things will be needed:
    1) Need to approach a set distance of the box, will assume don't need to look at it for simplicity
    2) The mini-game will not have its own scene- for simplicity for getting right back into the 3D world.

    There are many ways to do this, but the way I would do this is the following
    1) Place a script on the box to check for player in a set distance
    2) If player is in a set distance, give prompt to press certain button to start the game
    3) If button is pressed, the player's movement/controls and anything associated with the "3D" main world is disabled
    4) Either the main camera is disabled and another is reenabled, or the current player camera position would be saved and the main camera would be moved to the mini game location
    5) Here's the trick for simplicity: the mini-game would exist in the current scene. I'd put it below ground, use a second camera pointing at the mini-game, and switch between the cameras. Just in case, if I'm not really using layers much, I'd set the entire minigame on its own layer and set the main camera through culling options to ignore that layer and the second camera to only see that layer
    6) Once the player is disabled and the camera is moved/disabled and another is reenabled, I would activate all the objects for that mini-game. Basically, either instantiate the entire thing at once (not my preference) or.... (in steps)
    a) Have box either already have the entire mini-game (under its own empty GameObject let's call "MiniGame") already in a public variable and do SetActive(false) on "MiniGame" to not start the MiniGame before hand or have it do GameObject.Find to find teh MiniGame (not my preference)
    b) Have the box ACTIVATE that MiniGame one way or another. The MiniGame would have its own controls, GUI, etc for the MiniGame feel or whatever you need
    c) After MiniGame is done, reactivate a function in the box to turn off the MiniGame however (Destroy, SetActive(false) again, etc), reactivate the player, move the camera back/activate the right one and turn off the second camera, etc.

    You would most likely change these steps to suit your specific minigame and environment (say you want the minigame to be replayable, you may need a system to instantiate or reset the minigame while maybe keeping old scores), but this should provide a basic outline.

    Good luck, and feel free to ask for clarifications!
     
  7. CoreyLyman

    CoreyLyman

    Joined:
    Feb 9, 2019
    Posts:
    1

    Im doing this same thing ive gotten all the steps set up including the secondary camera and the player disable. Heres my issue all the 3d Objects are in the play space already and can only be clicked on when the new camera is activated. However i can not seem to grasp how to get a drag and drop type of situation going on the objects. I have all the colliders, triggers, sets, and mechanics set up.....i just cant figure out the drag and and drop. Any Help would be awesome
     
  8. Marcela38

    Marcela38

    Joined:
    Apr 10, 2019
    Posts:
    1
    Unity Answers is more for help on a specific question or problem you are having. For more discussion related topics, I'd suggest posting on the Unity forums at http://forum.unity3d.com/forum.php/TTRockStars

    But to give you an indication...

    1. You can add a minigame as a prefab with it's own camera, then instantiate the prefab and render it on top of your 3D scene.

    2. This is a very simple question and you should be at least be doing a few weeks of tutorials that will teach you this rather than asking people to show you how to do it.

    3. Same answer as #2