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

Similar documents
COMPASS NAVIGATOR PRO QUICK START GUIDE

Experiment 02 Interaction Objects

Space Invadersesque 2D shooter

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

Adding in 3D Models and Animations

VACUUM MARAUDERS V1.0

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

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

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

Foreword Thank you for purchasing the Motion Controller!

True bullet 1.03 manual

Overview. The Game Idea

Using Adobe Photoshop

Workshop 4: Digital Media By Daniel Crippa

Ball Color Switch. Game document and tutorial

COPYRIGHT NATIONAL DESIGN ACADEMY

We recommend downloading the latest core installer for our software from our website. This can be found at:

By Chris Burton. User Manual v1.60.5

First Steps in Unity3D

Create a Vector Glass With Layered Reflections to Create Depth

Using Dynamic Views. Module Overview. Module Prerequisites. Module Objectives

Chapter 6 Title Blocks

Creating a Maze Game in Tynker

Pong! The oldest commercially available game in history

Scratch Coding And Geometry

Training Guide 1 Basic Construction Overview. (v1.1)

The Beauty and Joy of Computing Lab Exercise 10: Shall we play a game? Objectives. Background (Pre-Lab Reading)

Kodu Lesson 7 Game Design The game world Number of players The ultimate goal Game Rules and Objectives Point of View

Spell Casting Motion Pack 8/23/2017

SteamVR Unity Plugin Quickstart Guide

Instructions for using Object Collection and Trigger mechanics in Unity

Managing images with NewZapp

CAD Orientation (Mechanical and Architectural CAD)

Battlefield Academy Template 1 Guide

PV-ezDesign Introduction training for ground mount project

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

Introduction. Modding Kit Feature List

Start from Scratch Open Photoshop.

Unity Game Development Essentials

In this lesson, you will learn:

BSketchList 3D. BSoftware for the Design and Planning of Cabinetry and Furniture RTD AA. SketchList Inc.

How to Create Animated Vector Icons in Adobe Illustrator and Photoshop

14 - Dimensioning. Dimension Styles & settings. Arrows tab.

BCC Optical Stabilizer Filter

PoolKit - For Unity.

Heavy Station Kit base 2

Resizing Images for Competition Entry

fautonomy for Unity 1 st Deep Learning AI plugin for Unity

How to Make Games in MakeCode Arcade Created by Isaac Wellish. Last updated on :10:15 PM UTC

Creo Revolve Tutorial

Instructions.

2. Creating and using tiles in Cyberboard

Part II Coding the Animation

InfoSphere goes Android Angry Blob

GEO/EVS 425/525 Unit 3 Composite Images and The ERDAS Imagine Map Composer

Symbols and Standards (Architectural CAD)

CHEAP GOLF EDITOR MANUAL. v 0.11

Okay, that s enough talking. Let s get things started. Here s the photo I m going to be using in this tutorial: The original photo.

Easy Input For Gear VR Documentation. Table of Contents

Game Maker Tutorial Creating Maze Games Written by Mark Overmars

Pong! The oldest commercially available game in history

Silhouette Connect Layout... 4 The Preview Window... 5 Undo/Redo... 5 Navigational Zoom Tools... 5 Cut Options... 6

Macquarie University Introductory Unity3D Workshop

Creating Accurate Footprints in Eagle

How to Make Smog Cloud Madness in GameSalad

Apex v5 Assessor Introductory Tutorial

A quick note: We hope that you will find something from the Tips and Tricks that will add a little pizazz to your yearbook pages!

Alright! I can feel my limbs again! Magic star web! The Dark Wizard? Who are you again? Nice work! You ve broken the Dark Wizard s spell!

Scrivener Mac: shortcut keys, ordered by cipher

Connecting radios all over the world. Configuring and using SoftRadio on the dispatcher PC

Table of contents. Table of contents 2 Introduction 4 Overview 4

DESIGN A SHOOTING STYLE GAME IN FLASH 8

Hello Champions. I have added some bubble brushes to the resources that I found on Deviantart that are by Jennyle88.

33-2 Satellite Takeoff Tutorial--Flat Roof Satellite Takeoff Tutorial--Flat Roof

Tutorial: Creating maze games

Release Notes - Fixes in Tekla Structures 2016i PR1

OTHER RECORDING FUNCTIONS

Exploring Photoshop Tutorial

2.1 - Useful Links Set Up Phaser First Project Empty Game Add Player Create the World 23

Modeling Basic Mechanical Components #1 Tie-Wrap Clip

Architecture 2012 Fundamentals

Photoshop Backgrounds: Turn Any Photo Into A Background

GIMP WEB 2.0 ICONS. Web 2.0 Icons: Paperclip Completed Project

Part 1- Fundamental Functions

Graphics packages can be bit-mapped or vector. Both types of packages store graphics in a different way.

Introduction to Layers

1. Exercises in simple sketches. All use the default 100 x 100 canvas.

Chapter 14 Inserting Bitmapped Images

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

A tutorial on scripted sequences & custsenes creation

Drawing Layouts Paper space & Model Space

Getting Started with. Vectorworks Architect

PDI Aide-memoire. The same image may not be used for both the print competition and the PDI competition.

Starting a New Drawing with a Title Block and Border

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

04. Two Player Pong. 04.Two Player Pong

REVIT - RENDERING & DRAWINGS

Quilt Pro 6 Lesson Quilt in a Quilt

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

ENGINEERING CO., LTD.

Transcription:

Table of Contents Speechbubble Manager Introduction... 2 Instructions... 2 Adding Speechbubble Manager to your game... 2 Settings... 3 Creating new types of speech bubbles... 4 Creating 9-sliced speech bubbles... 4 Creating scale-to-fit speech bubbles... 5 Structure of package... 6 Introduction 1

Introduction Speechbubble Manager is a system that creates and manages speech bubbles through one line of code. It works in 2D and 3D. It will adapt the size of the speech bubble to fit the text it needs to contain. It uses object pooling to keep down garbage generation. It comes with a set of four types of speech bubbles and more can be created without too much hassle. TL;DR; : Speech bubbles through one line of code 2D and 3D Adapts size to fit text Object pooling 4 types of bubbles The system is useful not only for talking characters but also as a debugging tool; instead of printing to the debug console, let the character tell you its debugging message in person! This is especially useful for debugging AI as the character can actually talk you through his or her thinking. There is a Behaviour Designer integration package included so that speech bubbles can be easily created through an action. As mentioned there are four types of speech bubbles included. Two of them are using 9-sliced sprites (normal and serious) while two of them are scaled to fit their content (angry and thought). The 9-sliced work for all sizes of content, scaled images work best if the height and width are somewhat similar as they can look a bit strangely stretched otherwise. Test the demo to see this in action. To keep the ratio as close as possible introduce a linebreak here and there for the very best visuals when using angry and thought bubbles. In unity 5.5 beta there are a new type of sprite, tiled. These will be included in this package in the future and will make it possible to create new, better looking, bubbles to replace the scaled to fit - type. For questions, suggestions or feedback, don t hesitate to contact me at: Instructions This section describes how to use the Speechbubble Manager package. Adding Speechbubble Manager to your game In order to add Speechbubble Manager to your game, drag the prefab SpeechbubbleManager to your gameplay scene. From one of your scripts on one of your game objects add this line of code: Introduction 2

VikingCrewTools.SpeechbubbleManager.Instance.AddSpeechbubble( Hello world!, transform); If your game is 2D then tick the Is 2D box. If it is 3D untick it. This is for performance reasons, read more in Settings. There are several overloads of the AddSpeechbubble-method to caterin for your specific needs: public void AddSpeechbubble(Transform objecttofollow, string text, SpeechbubbleType type = SpeechbubbleType.NORMAL) AddSpeechbubble(Transform objecttofollow, string text, SpeechbubbleType type, float timetolive, Color color, Vector3 offset) public void AddSpeechbubble(Vector3 position, string text, SpeechbubbleType type = SpeechbubbleType.NORMAL) public void AddSpeechbubble(Vector3 position, string text, SpeechbubbleType type, float timetolive, Color color) And should these not be enough for you the code is well commented and easily extendible. Settings See Figure 1 Speechbubble Manager settings. Default Color The default color to tint speech bubbles with unless a color is specified in parameters. Default Time To Live The default time a speech bubble will be shown before it disappears. When it has less than a second left it will begin to fade out. Is 2D Set accordingly. If the scene is in 2D then the speech bubble will be drawn by one single canvas which is good for performance. They will be internally sorted so that the newest one is drawn on top in case two bubbles intersect. Size Multiplier (from version 1.0.1 and forward) - Depending on the scale, camera distance or other things in your scene you may want to edit the size speech bubbles in the scene. As this can be done on a scene per scene basis using this variable it is better to use this than to edit the scale of the speech bubble prefabs. If you re still on version 1.0 you can instead change the scale of the Speech Bubble Manager game object in the current scene to achieve a similar effect. If the scene is 3D then one world space canvas is created for each speech bubble so that their draw order is dependent on their world space positions. Instructions 3

Figure 1 Speechbubble Manager settings (Version 1.0, in 1.0.1 a new parameter was added to adjust size of speechbubbles in scene called Size Multiplier) Creating new types of speech bubbles As of Unity 5.4 there are two types of sprites that can be used for speechbubbles, 9-sliced and simple. 9-sliced works best for fitting text but it will stretch the edges of the sprite and if those edges are not uniform (e.g. jagged like the angry bubble) the stretching will look horrible. So if the edges contain features you need to use simple sprites and have them be scaled to fit their content instead. Creating 9-sliced speech bubbles See Figure 2 9-slice sprite setup. Start out by duplicating the normal speech bubble prefab. Edit your spritesheet so that your bubble is exactly contained within the rectangle, blue color in the image. Next, set the border values (the green rectangle) to be as large as possible but still containing only those parts of the image that can be stretched without looking bad. E.g. the arrow of the bubble in the image would look bad if it was stretched and thus is in one of the corners and will have the same size regardless of how much content is in the bubble. Apply changes to the spritesheet. Next, assign the sprite to your new prefab s image child. Drag the prefab to your Speechbubble Manager game object in the scene in order to make it a child. Write a message in the text component of your prefab. Adjust the padding settings in the Horizontal Layout Group to fit the text with proper borders. Instructions 4

Creating scale-to-fit speech bubbles See Figure 3 Scale-to-fit sprite setup. Start out by duplicating the angry bubble prefab. Figure 2 9-slice sprite setup In this case we do not adjust the borders. Instead, consider where in the image text should fit. In the figure this is marked with a red rectangle. The setup of this prefab will be similar to that of the 9- sliced one with one difference: Instead of a Horizontal Layout Group where you set the padding in pixels, this type of prefab has a Ratio Layout Fitter in which you set the ratio of the image to use as padding when scaling to fit the content. So in our example with the angry bubble some trial and error has led to using 23% padding on the left, 17% on the right, 20% on top and 25% on the bottom. See Figure 4 Ratio Layout Fitter settings for an example. You might need some trial and error to get this just right. Even so, you still might want to make sure text gets linebreaked so that you do not end up with too stretched out bubbles. Figure 3 Scale-to-fit sprite setup Instructions 5

Figure 4 Ratio Layout Fitter settings Structure of package The folder VikingCrewTools/Speechbubble Manager contains everything you need. There is also an Assets/Demo folder that contains showcases of a 2D and a 3D demo scene. This is not at all needed to be kept in your project once you feel confident in using this system. The demo scenes use some general scripts in the VikingCrewTools folder that you can also delete once you don t need the demo scene any more. There is nothing that assumes any specific location of any files in the package so feel free to move everything around as you feel fit your structure. The code is namespaced (this should not need mentioning, but, alas, many packages out there seem to not bother about this) using VikingCrewTools namespace for core functionality like the Speechbubble Manager and VikingCrewDevelopment for demo-specific scripts. Structure of package 6

3d speechbubbles scripted dialogue As several people have asked for it I have added a simple scene where the characters follow a predetermined dialogue. The script is attached to the Speech Bubble Manager object in that scene. This can be set in the editor as follows: Each element can be set to Speaker, the transform that the speech bubble should follow, Delay, the delay from the script was started until that particular line in the dialogue should be spoken, and Line, the text that should be spoken. Although this is a fairly trivial script it might have its uses in cutscenes or the like. Structure of package 7