Section 39: BobmerMan How-To

Similar documents
Creating Bullets in Unity3D (vers. 4.2)

Experiment 02 Interaction Objects

CMSC 425: Lecture 3 Introduction to Unity

Space Invadersesque 2D shooter

Adding in 3D Models and Animations

PoolKit - For Unity.

EVAC-CITY. Index. A starters guide to making a game like EVAC-CITY

Save System for Realistic FPS Prefab. Copyright Pixel Crushers. All rights reserved. Realistic FPS Prefab Azuline Studios.

Unity Game Development Essentials

Spell Casting Motion Pack 8/23/2017

Unity 3.x. Game Development Essentials. Game development with C# and Javascript PUBLISHING

Game Design Comp 150GD. Michael Shah 3/6/15

Shooting in Unity3D (continued)

Creating a First Person Shooter (FPS) Part 2

Sword & Shield Motion Pack 11/28/2017

Instructions for using Object Collection and Trigger mechanics in Unity

Building Augmented Reality Spatial Audio Compositions for ios Introduction and Terms Spatial Audio Positioning

COMPASS NAVIGATOR PRO QUICK START GUIDE

GAME:IT Junior Bouncing Ball

The purpose of this document is to outline the structure and tools that come with FPS Control.

TATAKAI TACTICAL BATTLE FX FOR UNITY & UNITY PRO OFFICIAL DOCUMENTATION. latest update: 4/12/2013

Unity Certified Programmer

First Steps in Unity3D

Crowd-steering behaviors Using the Fame Crowd Simulation API to manage crowds Exploring ANT-Op to create more goal-directed crowds

Shoot It Game Template - 1. Tornado Bandits Studio Shoot It Game Template - Documentation.

Macquarie University Introductory Unity3D Workshop

Attack of Township. Moniruzzaman, Md. Daffodil International University Institutional Repository Daffodil International University

Foreword Thank you for purchasing the Motion Controller!

3D Top Down Shooter By Jonay Rosales González AKA Don Barks Gheist

Texas Hold Em Poker Unity Asset Store Project Multiplayer Version

Tutorial: Creating maze games

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Workshop 4: Digital Media By Daniel Crippa

Introduction. Modding Kit Feature List

The Archery Motion pack requires the following: Motion Controller v2.23 or higher. Mixamo s free Pro Longbow Pack (using Y Bot)

Beginning 3D Game Development with Unity:

Easy Input For Gear VR Documentation. Table of Contents

Game Maker Tutorial Creating Maze Games Written by Mark Overmars

Building Spatial Audio Compositions for Smartphones A Guide for Relative and Absolute Locative Audio Apps on ios and Android v 1.2

Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game

2D Platform. Table of Contents

Low Pass Filter. Short instruction for quick action. Vatio

Gesture Control FPS Horror/Survivor Game Third Year Project (COMP30040)

Heavy Station Kit base 2

VACUUM MARAUDERS V1.0

An Approach to Maze Generation AI, and Pathfinding in a Simple Horror Game

Learn Unity by Creating a 3D Multi-Level Platformer Game

Z-Town Design Document

Game demo First project with UE Tom Guillermin

CS 387/680: GAME AI DECISION MAKING. 4/19/2016 Instructor: Santiago Ontañón

GAME:IT Junior Bouncing Ball

INTRODUCTION GUIDE TO BLOXELS

..... l ss t h t an an $100,000 of 000 of ann an u n al u al gross r evenu n e

Achieving High Quality Mobile VR Games

Before displaying an image, the game should wait for a random amount of time.

GameMaker. Adrienne Decker School of Interactive Games and Media. RIT Center for Media, Arts, Games, Interaction & Creativity (MAGIC)

C# Tutorial Fighter Jet Shooting Game

Kings! Card Swiping Decision Game Asset

Kismet Interface Overview

By Chris Burton. User Manual v1.60.5

SteamVR Unity Plugin Quickstart Guide

2014 DigiPen Institute of Technology 2013 Valve Corporation.

GAME:IT Bouncing Ball

SPACESHIP (up to 100 points based on ranking)

Meteor Game for Multimedia Fusion 1.5

A tutorial on scripted sequences & custsenes creation

USER MANUAL Version (draft) Pit Vetterick

Words Mobile Ready Game Documentation

BE SURE TO COMPLETE HYPOTHESIS STATEMENTS FOR EACH STAGE. ( ) DO NOT USE THE TEST BUTTON IN THIS ACTIVITY UNTIL THE END!

Creating Dynamic Soundscapes Using an Artificial Sound Designer

"!" - Game Modding and Development Kit (A Work Nearly Done) '08-'10. Asset Browser

Step 1 - Setting Up the Scene

Magic Leap Soundfield Audio Plugin user guide for Unity

Battlefield Academy Template 1 Guide

True bullet 1.03 manual

Slime VISIT FOR THE LATEST UPDATES, FORUMS & MORE ASSETS.

A. creating clones. Skills Training 5

Procedural Level Generation for a 2D Platformer

Raven: An Overview 12/2/14. Raven Game. New Techniques in Raven. Familiar Techniques in Raven

TOON RACER v1.3. Documentation: 1.3. Copyright Sperensis Applications Page 1

VR Easy Getting Started V1.3

Moba Storm Multiplayer Arena Framework Documentation JmgDigital All rights reserved. Table of Contents

Overview. The Game Idea

INTRODUCTION TO GAME AI

Multiple Quests using the ScriptEase II Story System

Unbreaking Immersion. Audio Implementation for INSIDE. Wwise Tour 2016 Martin Stig Andersen and Jakob Schmid PLAYDEAD

Create a game in which you have to guide a parrot through scrolling pipes to score points.

Final Project Specification

How hard are computer games? Graham Cormode, DIMACS

Speechbubble Manager Introduction Instructions Adding Speechbubble Manager to your game Settings...

PROJECT HIGHRISE by SomaSim

Create Your Own World

NWN ScriptEase Tutorial

Annex IV - Stencyl Tutorial

Ball Color Switch. Game document and tutorial

BF2 Commander. Apply for Commander.

ZumaBlitzTips Guide version 1.0 February 5, 2010 by Gary Warner

Abandon. 1. Everything comes to life! 1.1. Introduction Character Biography

04. Two Player Pong. 04.Two Player Pong

Transcription:

Section 39: BobmerMan How-To 1. Getting Started 1. Download, unzip, and open the Starter files 2. Test it out 2. Dropping Bombs 1. Edit the script file Player.cs 1. Edit the method DropBomb(), inside the existing IF statement add: 1. Instantiate(bombPrefab, mytransform.position, bombprefab.transform.rotation); 2. Instantiate creates an instance of a PreFab in code, as opposed to dragging and dropping prefabs in the editor. 2. Test it out. 3. Snapping 1. Edit the script file Player.cs 1. Edit the method DropBomb(), the Instantiate call: 1. Instantiate(bombPrefab, new Vector3(Mathf.RoundToInt(myTransform.position.x), bombprefab.transform.position.y, Mathf.RoundToInt(myTransform.position.z)), bombprefab.transform.rotation); 2. We round off any floats (decimals) to round numbers, creating a grid bombs can drop on. This grid aligns with walls, corners etc. 2. Test it out. 4. Adding Explosions 1. Create a new script, Bomb 2. Assets > Prefabs > Bomb > Add Component > Bomb.cs 3. Edit the script Bomb.cs 1. Add the following variable to the class: 1. public GameObject explosionprefab; 2. Inside the Start() method, add: 1. Invoke( Explode, 3f); 2. Invoke triggers a method. Invoke(<methodName>, <delayinseconds>);

3. Save and Return to Unity. 4. Assets > Prefabs > Bomb > Inspector > Explosion Prefab = Prefabs > Explosion 5. Add the following method: 1. void Explode() Instantiate(explosionPrefab, transform.position, Quaternion.identity); GetComponent<MeshRenderer>().enabled = false; transform.findchild( Collider ).gameobject. SetActive(false); Destroy(gameObject, 0.3f); 1. Spawns an explosion at the bomb location 2. Make bomb invisible 3. Disable colliders so players can walk through explosions 4. Destroy bomb after 0.3 seconds, giving time for explosions to spawn 6. Save, return to Unity, test it out 5. BIGGER Explosions!!! 1. Edit the script Bomb.cs 1. Add the following method: 1. private IEnumerator CreateExplosions(Vector3 direction) return null; //placeholder for now 2. In Explode(), just AFTER Instantiate(), add: 1. StartCoroutine(CreateExplosions(Vector3.forward)); 2. StartCoroutine(CreateExplosions(Vector3.right)); 3. StartCoroutine(CreateExplosions(Vector3.back)); 4. StartCoroutine(CreateExplosions(Vector3.left)); 3. Coroutines essentially pause execution to do something else, then return to executing. 4. In CreateExplosions(), remove the return line, replace with:

1. for(int i = 1; i < 3; i++) RaycastHit hit; Physics.Raycast(transform.position + new Vector3(0, 0.5f, 0), direction, out hit, i, levelmask); if(!hit.collider) Instantiate(explosionPrefab, transform.position + (i * direction), explosionprefab.transform.rotation); else break; yield return new WaitForSeconds(0.05f); 2. Raycast, if not hitting a wall then create an explosion, if hitting wall then don't create explosion, wait a very short time before creating the next explosion in line, giving the illusion the explosion is spreading. 3. Create the class variable: 1. public LayerMask levelmask; 5. Save and return to Unity 2. Unity > top-right > Layers > Edit Layers 1. Layer 8 = Blocks 3. Hierarchy > Map > Blocks 1. Layer = Blocks 2. Yes, change children. 4. Assets > Prefabs > Bomb > Inspector > Level Mask = Blocks 5. Save and test 6. Chain Reactions in Explosions 1. Edit the script Bomb.cs 1. Add the variable: 1. private bool exploded = false; 2. Add the method:

1. public void OnTriggerEnter(Collider other) if(!exploded && other.comparetag( Explosion )) CancelInvoke( Explode ); Explode(); 2. Explodes the bomb but cancels any other invocations of Explode on the same bomb. 3. In Explode(), AFTER GetComponent<MeshRenderer>... 1. exploded = true; 4. Save, return to Unity, test 7. Player Death 1. Edit the script Player.cs 1. Add the variables: 1. public bool dead = false; 2. public GlobalStateManager GlobalManager; 2. In OnTriggerEnter(), UNDER Debug.Log, add: 1. dead = true; 2. GlobalManager.PlayerDied(playerNumber); 3. Destroy(gameObject); 3. Save and return to Unity 2. Hierarchy > select BOTH Player objects > Inspector > Global Manager = Hierarchy > Global State Manager 3. Save and test 8. Ending the Game 1. Edit the script GlobalStateManager.cs 1. Add the variables: 1. private int deadplayers = 0; 2. private int deadplayernumber = -1; 2. In PlayerDied(), add: 1. deadplayers++;

2. if(deadplayers == 1) deadplayernumber = playernumber; Invoke( CheckPlayersDeath, 0.3f); 3. There is a delay in the check to allow for draws 3. Add the using statement: 1. using UnityEngine.SceneManagement; 4. Create a new method: 1. void CheckPlayersDeath() if(deadplayers == 1) if (deadplayernumber == 1) Debug.Log( Player 2 is the winner! ); else Debug.Log( Player 1 is the winner! ); else Debug.Log( The game ended in a draw! ); SceneManager.LoadScene( Game ); 5. Save, return to Unity, and Play!