Bubble Destroyer

This is a new tutorial so you can learn to use the LWRP and Slab Fondler in a fulldome environment

  • Downloads

    During this tutorial, you’re going to learn to build a game for fulldome display with point mechanics, an intro and exit system, and an environment. We’re going to use the native animation system to make some simple animations that change the environment through the course of the game. No prior knowledge of Unity or game design is required to follow this tutorial, but it would help if you at least do the built in tutorial on how to use the Unity IDE and the names of the parts of it if you’re starting at no prior knowledge.

    It uses a LWRP fulldome camera for Unity that I’ve made publicly available on Github to produce a fisheye render for display on an appropriate system. It also lets players use their phones to participate in the game, so up to 24 players can compete. This is done through an open source web server you’ll set up on a secure free cloud provider service. I’ll explain how to set that up on a free Github account and a free Heroku instance.

    I love to code and I build things in a variety of coding languages. I know that most of you don’t feel that way though. I included some code I wrote to make this and other game demos work. You’re free to use this code in your own projects. The fulldome industry needs as many Open Source tools available as possible to create interactive immersive experiences. If you develop a novel solution based on this, please consider sharing it the same way.

    Most of the components here are free, built into the Unity framework, Asset Store, or provided in the asset package. The exception to this rule is BestHTTP, a Unity plugin which is available on the Asset Store. It’s a great asset for interacting with a variety of servers but is particularly good with websocket, which is used by the multiplayer server. You’ll need to buy that on the asset store to follow this tutorial to completion. Yes, it’s possible to script all the websocket data transfers without that package, but it is way more difficult. Another handy download is Particles - Bubbles from Playmint. It’s free and includes some way better bubble textures than the ones I photoshopped. I also used a free Sound Asset called Fun & Games that I found on the Asset Store.

    If you’re watching this tutorial and following along, make sure you have everything downloaded and installed that you’re going to need ahead of time, and remember to subscribe, and click the bell to get future updates. I put the full text instructions up on my website CosmicOrbiters.com.

    Preparation:

    1. Add BestHTTP/2 (Unity Asset Store) to project
    2. Download Bubble Destroyer game assets as unitypackage
    3. Download Camera
    4. Install Latest Unity (2019.2.6 in this tutorial)
    5. Name the new project, I suggest Bubble Destroyer
    6. Select New LWRP Project in startup (or add LWRP package later)
    7. Add LWRP Fulldome Camera to project (github)
    8. Add the BubbleDestroyer.unitypackage to the project
    9. Add SD Sound Tracks Music - Fun & Games (Unity Asset Store)

    Package Manager:

    Add LWRP if you didn’t get it before

    Optional:

    • Add Keijiro’s Klak packages to stream output locally or over the network with Siphon, Spout, and NDI
  • Add Visual Effects Graph (remember to enable pre release packages)

Setup:

  1. Edit > Project Settings > Graphics > Scriptable Render Pipeline Settings > EACLightweightRenderPipelineAsset provided in the camera
  2. CMD+Shift+B for Build settings, Set Architecture to Win64
  3. Project Settings > Player > Other Settings > Color Space > Linear
  4. Project Settings > Physics > Gravity X:0 Y:1 Z:0
  • Create New Folder - Scenes (If it doesn’t exist)
  • Create Main Scene in /Assets/Scenes
  • Open Main
  • Add Fulldome Camera - 360_Camera prefab
  • Find the pivot object in 360_Camera and set transform>Rotation to X:-90 Y:0 Z:0
  • Select all the Cameras
    1. Set Background Type to Solid Color
    2. Set Background to black
    3. Remove Default Camera
    4. Add Fulldome 220 degree camera prefab
    5. Create display layer at layer 30- cameras and meshes are already configured to use
  • Add a Light > Reflection Probe
  • Change Type to realtime
  • Set Refresh to every frame
  • Set the Box size to X:500 Y 500 Z500
  • Clear Flags Solid Color
  • Background Black
  • Select DomeMaster_Camera_Output_220
  • Set the Field Of View to 110
  • Select PerspectiveSphereMeshes in DomeMaster_Camera_Output_220
  • Deactivate SizeToOrtho
  • Floor And Roof

    The floor and roof have a stylized Caustics effect that we’ll build in Shader Graph, just to get a little bit of familiarity with this tool. Since we’re using LWRP, Shader Graph is already part of the project.

    In the Hierarchy:

    1. Create a new plane, name it Floor
    2. Resize it to scale 100 in each direction
    3. Position at Y -30
  • Create a new plane, name it Roof
  • Resize it to scale 5000 in each direction
  • Position at Y100
  • Rotate X180
  • In the Project

    1. Add a new directory, name it Materials
    2. In Materials, Create a new Unlit Shader Create New / Shader / Unlit Graph named Caustics
    3. Create the Caustics Shader Graph as outlined in Shader Instructions <>
    4. Create two new Materials in Assets/Materials: SeaFloor, SeaRoof
    5. Assign the new shader to each material,
    6. Assign the materials to the Floor and Roof Panes
    7. Set color/tiling/density/offset on materials according to taste

    Fog

    There’s no fog in the LWRP but we can use a trick to make a linear fog imitation in the scene. This multi-layered curtain can also contain user defined textures for radial visual effects. We’ll make dark expanses to give the game environment a deep underwater feel.

    In the Project

    1. Create a new Material in /Assets/Materials named Fog, use the LWRP unlit shader
    2. Set the unlit shader to transparent mode with alpha channel transparency
    3. Set the Render Face to Back
    4. Set the color to R0 G0 B0 A90
    5. In Advanced Priority should be 5

    In the Hierarchy

    1. Create a new GameObject - Name it FogContainer - reset transform
    2. Create a new Cylinder in GameObject and name it FogLayer
    3. Remove the collider
    4. Set the Scale on FogLayer to X100 Y500 Z100
    5. Set the material on the FogLayer Cylinder to the Fog Material you created earlier
    6. Duplicate the FogLayer Cylinder 5 times
    7. Set Scale on the FogLayer (2) to X200 Y500 Z200
    8. Set Scale on the FogLayer (3) to X300 Y500 Z300
    9. Set Scale on the FogLayer (4) to X400 Y500 Z400
    10. Set Scale on the FogLayer (5) to X500 Y500 Z500
    11. Set Scale on the FogLayer (6) to X600 Y500 Z600
    12. Save Your Game

    Environment Bubbles

    In Project

    1. Create ParticleBubble material in Assets/Materials
    2. Set shader to LWRP/Particles/Unlit
    3. Surface Transparent
    4. Set Base Map to Bubble Texture

    In Hierarchy

  • Create 3DObject>WindZone / Reset transform Set as directional
  • Create 3DObject>WindZone / Reset transform Set as Spherical
  • Add Particle Engine, Name it BubbleRing
  • Set Position Y to -5
  • Set Rotation X to -90
  • Assign the ParticleBubble Material to renderer
  • Duration: 10
  • Looping: Yes
  • Start Lifetime: 5 - 20
  • Start Speed .375 - .75
  • Start Size: .5 - .1
  • Gravity Modifier .1
  • Simulation Space World
  • Check Play On Awake
  • Max Particles 1000
  • Check Shape
  • Shape: Circle
  • Radius: 10
  • Radius Thickness: .1
  • Check External Forces
  • Check Color Over Lifetime
  • Create New Gradient
  • Emission
  • Rate Over Time: 100
  • Outer Bubbles

  • Duplicate BubbleRing, name the duplicate OuterBubbleRing
  • In Particle System change Start Size to .5 - .2
  • In Particle System > Shape, change the radius to 20
  • Transform Position X: 0 Y-12 Z0
  • Audio Setup

    We’re gonna do the audio setup before making any prefabs that contain Audio Source objects. That way, we don’t have to go back at the end and change the ones we make. This is a super simple audio setup for a game.

    1. Create New Main Mixer named BubbleMixer
    2. Add Two Groups, SFX and BGM
    3. Set BGM to -14 Attenuation
    4. Add Duck Volume to BGM
    5. Add Sender to SFX
    6. Set Receive to the BGM/DuckVolume at -40dB
    7. Add SFX Reverb to Master Set Dry Level to -300
    8. Add Normalize to Master, leave basic settings

    Optional: Set up Surround Sound output in Project Settings > Audio > Default Speaker Mode

    Player Prefab Setup

    In this game, each player is a pointer, and the player object will reorient in the game scene as the user reorients their phone. In any multiplayer game, it’s a good idea to build a player prefab. This makes sure that everyone is defined according to the same rules. There’s a couple parts that we don’t use much in this game but are useful for building more advanced interactions for users than popping bubbles, like multi-touch and a physical interaction hinge for picking things up and moving them around in the game interface.

    In Project

    1. Create a new Material in Assets/Materials/ called PingRings
    2. Set the Shader to LWRP/Unlit
    3. Surface Type Transparent
    4. Click on the texture input and set to /Textures/PingRings.png

    In Hierarchy

    1. Add a GameObject, reset the transform and rename to Player
    2. Add Player Controller and Color Things scripts to Player
  • Add 3DObject/3DText to Player, rename to Symbol
  • Set transform>position to x0, y0, z5
  • Set transform>scale to x.1, y.1, z.1
  • Set the Symbol
    1. text to @
    2. middle center anchor
    3. center alignment
    4. font size 20
  • Drag the Symbol object onto the Symbol Container property of the Player Controller
  • Drag the Symbol object onto the Objects To Color array of the ColorThings script
  • Set ColorThings Color Attribute to _BaseColor
  • Add an empty object to Player, rename the object hinge
  • Add a Hinge Joint Component to hinge, this will also add a Rigidbody
  • Check all the boxes in Constraints
  • Drag the hinge object onto the Player Controller script’s hinge property in the Inspector
  • Add a 3DObject > Quad in Player Rename it PingMarker
  • Drag the PingRings Material onto PingMarker
  • Remove the Collider Component
  • Set the PingMarker Transform Position to X:0 Y:0 Z:5
  • Set the PingMarker Transform Scale to X:0 Y:0 Z:0
  • Add an ActivationTimer Script, set Duration to 1
  • Add an Audio Source
  • Add a Pitch Ranger
  • Drag the Audio Source onto the Pitch Ranger Audio Source
  • Set AudioClip to Assets/Sounds/38700_argitoth_archi-sonar-01.ogg
  • Output to SFX on your Mixer
  • Check Play On Awake
  • Drag Spatial Blend to far right (3D)
  • Set Max Distance in 3D sound settings to 20
  • Drag the PingMarker object onto Player/PlayerController/Ping Object
  • Drag the PingMarker object onto Player/ColorThings/ObjectsToColor
  • Uncheck the PingMarker, making it inactive
  • In Animation

    1. Create a new Animation Clip in Assets/Animations/ called PingMarker
    2. Press record button in the animator
    3. Change a value on Scale to 1 and back to 0 again, this is recorded as PingMarker Scale set to 0
    4. Change the frame setting to 10
    5. Set PingMarker Transform Scale to X:1 Y:1 Z:1
    6. Change the frame setting to 20
    7. Set PingMarker Transform Scale to X:2 Y:2 Z:2
    8. Change the frame setting to 30
    9. Set PingMarker Transform Scale to X:1 Y:1 Z:1
    10. Change the frame setting to 50
    11. Set PingMarker Transform Scale to X:2 Y:2 Z:2
    12. Change the frame setting to 60
    13. Set PingMarker Transform Scale to X:0 Y:0 Z:0
    14. Click record again to end recording

    In Project

    1. Create a folder called Prefabs
    2. Drag the Player into the Prefabs folder, creating the Player prefab
    3. Select Assets/Animations/PingMarker and Uncheck Loop Time
    4. Delete the Player object in Hierarchy
    5. Save Your Game

    Score Canvas Setup

    This will contain the current scores for the game. When each player spawns, their score canvas will be added. When they despawn, it will be removed.

    In Hierarchy

    1. Create a New UI/Canvas, name it ScoreCanvas
    2. Set Render Mode to World Space
    3. Set Pos X to 50
    4. Set Pos Y to -6
    5. Set Width to 1000 Height to 100
    6. Set Rotation Y to 90
    7. Set Scale to X 0.1 Y0.1 Z0.1
    8. Add a Horizontal Layout Group Component, Set Child Alignment to Middle Left

    PlayerPanel Prefab Setup

    This is the individual player score display. It will be a prefab that is instantiated for every player that joins.

    In Project View

    1. Create a new material in Assets/Materials, name it UIText
    2. Set the Shader in UIText to UI/Unlit/Transparent
    3. Change the Render Queue to 3050

    In Hierarchy

    1. Create a New Game Object in the Score Canvas, Name it PlayerPanel
    2. Set Width 100 Height 50
    3. Add Player Canvas Controller script to PlayerPanel
    4. Set Haptic Multiplier to 100
    5. Add Color Things script to Player Panel
  • Add a UI/Text Object to PlayerPanel rename it Symbol
  • Hold Control + Alt + Shift and click on the positioning box, select the lower right corner option
  • Set Left to 50
  • Change the Text to @
  • Check Best Fit
  • Set the color to white
  • Set the material to UIText
  • Add an Outline component to Symbol, set outline to full alpha black
  • Set Vertical Alignment to Center
  • Duplicate Symbol rename the duplicate Score
  • Set Left to 0
  • Set Right to 50
  • Change the Text to 000
  • Drag Symbol onto PlayerPanel >PlayerCanvasController>Player Symbol
  • Drag Score onto PlayerPanel >PlayerCanvasController>Player Points
  • Drag the PlayerPanel Object into the Project Assets/Prefabs folder to create a prefab
  • Delete the PlayerPanel from the scene
  • Save Your Game
  • Bubble Targets Prefab Setup:

    This game uses four different colors of bubble, each worth different point scores. We’re gonna build one of them, then make duplicates of it, and tweak the settings on the duplicates to make each target unique. We’re also going to use a new feature called shader graph to build the bubble texture, to learn a bit more about building reflective objects like the bubbles.

    In Project

    1. Create a new Shader > PBR Graph in Assets/Materials/ Name it LitBubbles
    2. Edit LitBubbles in ShaderGraph <>
    3. Create a new Material in Project/Materials based on LitBubbles shader named BlueBubble
    4. Set the Color on BlueBubble Material to light aqua
    5. Create a new Material in Project/Materials based on LitBubbles shader named GreenBubble
    6. Set the Color on GreenBubble Material to light green
    7. Create a new Material in Project/Materials based on LitBubbles shader named RedBubble
    8. Set the Color on RedBubble Material to light red
    9. Create a new Material in Project/Materials based on LitBubbles shader named YellowBubble
    10. Set the Color on YellowBubble Material to yellow

    In Hierarchy

    1. Create a new Game Object name it TargetBubbleBlue
    2. Reset the transform of TargetBubbleBlue
    3. Change the Scale to X1.2 Y1.2 Z1.2
    4. Add Selection Controller Component
    5. Add a Rigidbody Component
    6. Set Mass to .01
    7. Set Drag to .5
    8. Check Use Gravity
    9. Add Activation Timer Component
    10. Set Duration to 30
    11. Add a sphere collider
    12. Add Player Points
    13. Set Reward Points to 1
    14. Set Cooldown to 1
    15. Add Zig Zag Physics Component
    16. Set Max Deviation to .1
    17. Set Force Direction to X1 Y0 Z1
    18. Add Animator Controller Component
    19. Add an AnimatorOnEnable Script Component
    20. Create a 3DObject > Sphere in TargetBubbleBlue
    21. Remove the Collider
    22. Drag the BlueBubble material onto the Mesh Renderer of Sphere
    23. Add a 3DObject > Wind Zone
    24. Set the Wind Zone Mode to spherical with a radius of 3
    25. Create a new Effects/ParticleSystem in TargetBubbleBlue, rename it TrailingBubbles
    26. Check Looping
    27. Duration: 4
    28. Lifetime: 5
    29. Start Speed: .375 - .75
    30. Start Size: .01 - .1
    31. Gravity Modifier 0.1
    32. Simulation Space World
    33. Check Play On Awake
    34. Set Emission Rate to 10
    35. Check Shape
    36. Shape is Sphere
    37. Radius is .5
    38. Radius Thickness is .01
    39. Check Color Over Lifetime
    40. Make a fade-out gradient on last 5%
    41. Check Size over lifetime
    42. Set Random Two Constants to .5 - 1.5
    43. Check Noise
    44. Set Noise Position Amount to .75
    45. Set Noise Size Amount to .2
    46. Set the Renderer Material to BubbleParticle
  • Duplicate TrailingBubbles
  • Rename the duplicate to TargetBubblesHover
  • Change the Emission Rate over Time to 0
  • Click the + in Bursts to add a burst, Count 30
  • Uncheck looping
  • Duplicate TargetBubblesHover
  • Rename the duplicate TargetBubblesPop
  • Set the start color to light blue
  • Set Duration to 1.2
  • Set Start Lifetime to .2 - 1.2
  • Set start speed 5 - 2
  • Gravity Modifier 1
  • Simulation Space World
  • Max particles 500
  • Set the Emission Burst Count to 100
  • Check Limit Velocity over Lifetime
  • Set Dampen to .1
  • Set Size Over Lifetime to down curve
  • Add an Audio Source Object to TargetBubblesPop
  • Set the Audio Source Audio Clip to 192501__murraysortz__bubbles-quick
  • Set the Output to SFX
  • Set the Spatial Blend to full 3D
  • Set Max Distance to 100
  • Add a Pitch Ranger Component
  • Drag the Audio Source onto the Pitch Ranger
  • Set Pitch Range to .15
  • Deactivate TargetBubblesHover and TargetBubblesPop
  • Drag TargetBubblesHover onto the Selection Controller Component of TargetBubbleBlue
  • Select the TargetBubbleBlue
  • In the Animation window

  • Create a new animation, name it TargetBubbleDeathAnimation
  • With the frame counter set to 0, press record on the animation window
  • Deactivate the Collider in TargetBubbleBlue
  • Deactivate the Sphere object
  • Deactivate the emission on TrailingBubbles
  • Press record again to stop recording
  • Copy the animation frames by selecting them and Control C
  • Set Frame Counter to 120, Control V Paste the frames
  • Click on TargetBubbleDeathAnimation in the Animation Window and select Create New Clip…
  • Name the new clip TargetBubbleIdleAnimation
  • With the frame counter at 0, press record
  • Toggle Activate the collider in TargetBubbleBlue
  • Toggle Activate the Sphere
  • Toggle Activate the emitter on TrailingBubbles
  • Press record again to stop recording
  • Click on TargetBubbleIdleAnimation in the Animation Window and select Create New Clip…
  • Name the new clip TargetBubbleTouchAnimation
  • With the frame counter at 0, press record
  • Deactivate the Sphere Collider in TargetBubbleBlue
  • Deactivate the Sphere
  • Activate TargetBubblesPop
  • Press record again to stop recording
  • Select the animation values, Control + C to copy
  • Set Frame Counter to 120
  • Control V to paste the settings
  • Select TargetBubbleBlue in the Hierarchy
  • Open the Animator window (note that is different from Animation window)
  • Add trigger Params: hover, touch, end, spawn
  • Set TargetBubbleIdleAnimation as default layer state
  • Make a transition from Any State to TargetBubbleIdleAnimation
  • Make the transition require the spawn trigger
  • Make a transition from Any State to TargetBubbleTouchAnimation
  • Make the transition require the touch trigger
  • Make a transition from TargetBubbleTouchAnimation to TargetBubbleDeathAnimation
  • Drag the Animator Component onto TargetBubbleBlue > AnimatorOnEnable > Animator
  • Drag the Animator Component onto TargetBubbleBlue > AnimatorController > Animator
  • Drag the TargetBubbleBlue from the Hierarchy into Project Assets/Prefabs
  • Duplicate TargetBubbleBlue prefab three times
  • Rename a duplicate TargetBubbleRed
  • Double Click TargetBubbleRed to open it in the prefab editor
  • Set transform Scale to X:1 Y:1 Z:1
  • Change the material on the Sphere to RedBubble
  • Change the Rigidbody > Drag to .3
  • In TargetBubblesPop object set the ParticleSystem Start Color to light red
  • Set PlayerPoints > Reward Points to 2
  • Rename a duplicate TargetBubbleYellow
  • Double Click TargetBubbleYellow to open it in the prefab editor
  • Set transform Scale to X:.9 Y:.9 Z:.9
  • Change the material on the Sphere to YellowBubble
  • Change the Rigidbody > Drag to .25
  • In TargetBubblesPop object set the ParticleSystem Start Color to yellow
  • Set PlayerPoints > Reward Points to 3
  • Rename a duplicate TargetBubbleGreen
  • Set transform Scale to X:.8 Y:.8 Z:.8
  • Double Click TargetBubbleGreen to open it in the prefab editor
  • Change the material on the Sphere to GreenBubble
  • Change the Rigidbody > Drag to .1
  • In TargetBubblesPop object set the ParticleSystem Start Color to light green
  • Set PlayerPoints > Reward Points to 5
  • Introduction Sequence:

    Save Your Game

    We’ve got all the prefabs built, it’s time to set the scene for the players and explain to them what they need to do to play. We’re going to build a canvas with text that has a fade-in-out animation.

    DetailCanvas:

    In The Hierarchy

    1. Create a new UI > Canvas Object, Rename it DetailCanvas
    2. Change the Canvas to World Space
    3. Reset the Rect Transform
    4. Set Pos Z to 30
    5. Set Width to 1000, Height to 200
    6. Set Scale to X:0.1 Y:0.1 Z:0.1
    7. Add a UI > Text Object to DetailCanvas
    8. Hold CTRL ALT and shift and click on the position set to lower right corner stretch
    9. Change the text to read “A fulldome game by InsertYourName”
    10. Set the Font to Arise / Bold
    11. Set the Font Size to 50
    12. Set Horizontal and Vertical to center
    13. Set the Material to UIText
    14. Set the Color to light aqua
    15. Drop the Alpha of the Color to 0

    In the Animation Window

    1. Add an animation to the Text Object, name the animation /assets/animations/TextFadeInOut5s
    2. Press the Record Button
    3. Set the Frame Counter to 0
    4. Set the alpha of the text to 1 and then back to 0
    5. Set the Frame Counter to 30
    6. Set the alpha of the text to 255
    7. Set the Frame Counter to 270
    8. Set the alpha of the text to 0 and then back to 255
    9. Set the Frame Counter to 300
    10. Set the alpha of the text to 0
    11. Press record to finish recording

    GameIntro:

    Now that there’s animated text which will display for 5 seconds in each Detail Canvas, we need to make another animation which will cycle those Detail Canvas objects. That’s going to be another GameObject named GameIntro.

    1. Create a New Empty Game Object, reset the transform, name it GameIntro
    2. Add new Audio Source object to GameIntro, name it IntroMusic
    3. Change the IntroMusic source to Assets/Fun & Games 1min 3s
    4. Check Play On Awake
    5. Deactivate DetailCanvas
    6. Make DetailCanvas a child of GameIntro
    7. Duplicate DetailCanvas 11 times
    8. Change the text in all the canvases to introduce the game and acknowledge contributions. Here’s my suggestions:
    1. “BUBBLE DESTROYER”
    2. “A fulldome game by InsertYourName”
    3. “Built with Unity3D”
    4. “Go to the url and press start to play”
    5. “Lock your phone rotation”
    6. “Press reset while pointing forward”
    7. “SFX freesound.org argitoth / baidnovan”
    8. “Music Fun & Games SD Sound Tracks”
    9. “Bubble point values vary by color”
    10. “Point your cursor and tap your screen”
    11. “The url capitalization is important.”
    12. “Ping your icon with the target button”
  • There are now 12 canvasses, each is set to display for 5 seconds, and the text starts as invisible since its alpha is 0. This means the introduction is 12 X 5 = 60 seconds in length.
  • Select GameIntro
  • Add a new animation to GameIntro, call it Animations/GameIntro
  • In the Animation Window, Press the Record Button
  • Set the frame counter to 0
  • In Hierarchy select all the Detail Canvas Game Objects
  • Activate and then disable
  • In Hierarchy select Detail Canvas and enable it
  • Set the Animation frame counter to 300 (5 seconds)
  • Select Detail Canvas and disable it
  • Select Detail Canvas(1) and enable it
  • Set the frame counter to 600
  • Toggle Detail Canvas(1) and Detail Canvas(2)
  • Set the frame counter to 900
  • Toggle Detail Canvas(2) and Detail Canvas(3)
  • Keep toggling Canvases though frames 1200, 1500, 1800, 2100, 2400, 2700, 3000, 3300, 3600
  • Click record to finish recording
  • Save Your Game
  • Game Operations:

    The game operation controller handles the spawning of items during game play and limits the time for each sequence of bubble popping. It also turns on and off the intro to match the game play.

    In the Hierarchy

    1. Create a new empty Game Object, reset the transform, rename it GameContainer

    Background Music:

  • Create a new Audio Source Game Object in GameContainer rename it BackgroundMusic
  • Change the Audio Clip to Fun & Games - 1min LOOP Vs
  • Set the Output to BGM
  • Check Play On Awake
  • Check Loop
  • Set Volume to .5
  • Deactivate BackgroundMusic
  • EndGame Screen:

  • Create a new empty UI/Canvas in GameContainer, rename it EndGame
  • Reset the transform
  • Set Pos Z to 30
  • Set Width to 1000 Height to 200
  • Rotation X:-33
  • Scale X:0.1 Y:0.1 Z:0.1
  • Add a GameEnd Component to EndGame
  • Drag an instance of the PlayerPanel prefab into the EndGame and rename it to WinnerPanel
  • Make a copy of GameIntro > Detail Canvas
  • Drag copy of DetailCanvas from GameIntro into EndGame
  • Change the text to “The Winner Is”
  • Deactivate EndGame
  • Spawners:

  • Create a new empty Game Object in GameContainer, rename it Spawners
  • Set the transform position to X:0 Y:-2 Z: 0
  • Create a new empty Game Object in Spawners, rename it SpawnRotatorBlue
  • Create a new empty Game Object in SpawnRotatorBlue, rename it SpawnLocationNear
  • Set the transform position to X:0 Y:0 Z: 3
  • Create a new empty Game Object in SpawnRotatorBlue, rename it SpawnLocationMid
  • Set the transform position to X:0 Y:-3 Z: 7
  • Create a new empty Game Object in SpawnRotatorBlue, rename it SpawnLocationFar
  • Set the transform position to X:0 Y:-5.5 Z: 11.5
  • Add a Spawner Component to SpawnRotatorBlue
  • Drag each of the SpawnLocationNear, SpawnLocationMid, SpawnLocationFar on to the Spawn Locations array on SpawnRotatorBlue
  • Set Spawn Item to /Assets/Prefabs/TargetBubbleBlue
  • Set Spawn Count to 15
  • Set Min Spawn Time to 1
  • Set Max Spawn Time to 10
  • Select the SpawnRotatorBlue Game Object
  • In the Animation Window

  • Create a new animation called Animations/SpawnRotator
  • Click record
  • Change the transform rotation value and set it back to 0 to record a 0 value
  • Set the frame counter to 30
  • Set the rotation X:0 Y:45 Z:0
  • Set the frame counter to 60
  • Set the rotation X:0 Y:-45 Z:0
  • Set the frame counter to 90
  • Set the rotation X:0 Y:0 Z:0
  • Click record again to end animation recording
  • In the Hierarchy

  • Deactivate the SpawnRotatorBlue
  • Make 3 duplicates of SpawnRotatorBlue
  • Rename a copy SpawnRotatorRed
  • Change the Spawner>Spawn Item to TargetBubbleRed
  • Rename a copy SpawnRotatorYellow
  • Change the Spawner>Spawn Item to TargetBubbleYellow
  • Rename a copy SpawnRotatorGreen
  • Change the Spawner>Spawn Item to TargetBubbleGreen
  • Make GameIntro a child of GameContainer
  • Select GameContainer
  • In Animation Window

  • Create New Animation Animations/GameRunner
  • Click Record
  • Set the Frame Counter to 0
  • Toggle BackgroundMusic (on then off again)
  • Toggle EndGame
  • Lock the animation window
  • Select all the Spawn Rotator GameObjects in Spawners and toggle them
  • Set the Frame Counter to 3600
  • Deactivate GameIntro
  • Set Background Music to active
  • Select all the Spawn Rotator GameObjects in Spawners and enable them
  • Set the Frame Counter to 10800
  • Deactivate All the Spawn Rotator GameObjects
  • Deactivate Background Music
  • Activate EndGame Object
  • Set the Frame Counter 11400
  • Deactivate EndGame
  • Click record button to end animation recording
  • Unlock animation window
  • Game Controller Setup:

    The Game Controller connects to the server and allows players to send their input through their phones. There’s an example server set up at https://firedome.herokuapp.com You can set up your own server for your data or use the example.

    In the Hierarchy

    1. Create a new GameObject, name it GameController
    2. Add a GameController Script, this will automatically also add Game Data and SocketIONetwork components to the GameController object
    3. Click the arrow next to Player Colors and set it to 12, then pick 12 distinct, bright colors
  • Create a new 3D Object/3DText in GameController, name it ControlURL
  • Set the transform on ControlURL:
    1. Position: X-20 Y-6 Z0
    2. Rotation: X0 Y-90 Z 0
    3. Scale: X0.1 Y0.1 Z0.1
    4. Set the font size to 200
    5. Set the anchor to Middle Center
    6. Change the color to aqua
    7. Drag the ControlURL object onto the SocketIONetwork Show Url property
    8. Drag the Assets/Prefabs/Player prefab onto the Player Property of the Game Controller Component
  • Create a new GameObject reset the transform rename to PlayerSpawn
  • Drag PlayerSpawn on to GameController > Spawn Container property
  • Drag the Assets/Prefabs/PlayerPanel prefab onto the GameController > Player Canvas Property
  • In the Hierarchy, find the WinnerPanel in GameContainer/EndGame/WinnerPanel and drag it onto the Winner Canvas Property
  • Drag the Score Canvas object onto the GameController > Player List Property
  • Cleanup:

    1. Create a new Game Object reset transform and name it GameEnvironment
    2. Drag Directional Light, Floor, Roof, FogContainer, BubbleRing, OuterBubbleRing, Windzone, Windzone(1), and Reflection Probe into Game Environment
    3. Build Lighting in Lighting Window