UFCEKU-20-3Web Games Programming Creating and Updating a Graphical Heads-Up Display (HUD)

Slides:



Advertisements
Similar presentations
Java Script Session1 INTRODUCTION.
Advertisements

UFCFSU-30-13D Technologies for the Web Creating and Updating a Graphical Heads-Up Display (HUD)
StarLogoTNG 101 Treasure Hunt Game Unit Lesson 9: Variables.
UFCFSU-30-13D Technologies for the Web Creating and Using GUI Components.
UFCEKU-20-3Web Games Programming Overview of the Shockwave 3D API used in the Game Scenario.
UFCEKU-20-3Web Games Programming Unity 3D Physics Colliders and Object Collisions.
Sage CRM Developers Course
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
UFCEKU-20-3Web Games Programming Unity 3D Basic Concepts Using and Creating Prefabs.
3D Game Programming All in One By Kenneth C. Finney.
1 Creation versus Evolution. 2 Creation versus Evolution The Theory of Intelligent Design holds that certain aspects of the Universe are best explained.
Web Games Programming An Introduction to Unity 3D.
242/102/49 0/51/59 181/172/166 Primary colors 248/152/29 PMS 172 PMS 137 PMS 546 PMS /206/ /227/ /129/123 Secondary colors 114/181/204.
Web Games Programming Unity Scripting Fundamentals.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
Learning Unity. Getting Unity
SE 320 – Introduction to Game Development Lecture 3: Unity’s Interface and Concepts Lecturer: Gazihan Alankuş Please look at the last two slides for assignments.
SE 320 – Introduction to Game Development Lecture 7: Programming Lecturer: Gazihan Alankuş Please look at the last two slides for assignments (marked with.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
Unity GUI Creating and Using GUI Components. Agenda GUI Components GUI Layout Using Styles and Skins for Design ‘Look and Feel’ Scripting GUI Communication.
LESSON #10: Digital Playtesting & Introduction to Character Animation with Mecanim DGMD E-70 Principles of Game Design.
Scanners. Using a Scanner Scanners are used to digitize any flat object. Several types of scanners- flatbed, sheet fed, handheld, film. Most common is.
JavaScript II ECT 270 Robin Burke. Outline Functions Events and event handling Form validation.
UFCFX5-15-3Mobile Device Development Unity 3D Development for Android Unity Mobile Assets.
UFCEKU-20-3Web Games Programming Instantiating World Objects.
UFCFSU-30-13D Technologies for the Web An Introduction to Unity 3D.
JavaScript Tutorial First lecture 19/2/2016. Javascript is a dynamic computer programming language. It is lightweight and most commonly used as a part.
DB Implementation: MS Access Forms. MS Access Forms: Purpose Data entry, editing, & viewing data in Tables Forms are user-friendlier to end-users than.
1 Visual Basic: An Object Oriented Approach 7 – The User interface.
Section 10.1 Define scripting
Architecture Review 10/11/2004
X3DOM : Integrating 3D content seamlessly into webpage
JavaScript, Sixth Edition
Quick Intro to Unity Lecture 2.
Internet Made Easy! Make sure all your information is always up to date and instantly available to all your clients.
3D Technologies for the Web
OVERVIEW Objectives Follow a design document to prepare images for inclusion in a Web page Run a batch process to prepare multiple images in one step Use.
QTP Training (Advanced)
Program Management Portal (PgMP): What’s New in R8 for the Client
3GB3 Game Design Unity 3D Basics.
More (C#) Scripting Day 2, Lesson 1.
CARA 3.10 Major New Features
Chapter Lessons Understand the Macromedia Flash workspace
Web Games Programming Creating Split-View Cameras and Camera Overlays.
Graphical Output Graphical Text.
22-INTEGRATION HUB
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Understanding an App’s Architecture
The enhancement concept allows you to add your own functionality to SAP's standard business applications without having to modify the original applications.
DB Implementation: MS Access Forms
Displaying Form Validation Info
Predefined Dialog Boxes
Data Migration to DOORS DNG Presented By Adam Hammett
Practical guide to build Modern Intranet sites with SharePoint Communication Sites Asish Padhy.
Engineering Workbench Version 2.0
DB Implementation: MS Access Forms
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Game Loop Update & Draw.
Using Cascading Style Sheets (CSS)
Week 6: Time and triggers!
HP ALM – General Navigation
Fundaments of Game Design
Unity Game Development
Programming Basics Review
MVC overview Model, View, Controller is MVC
Games Development 2 Tools Programming
Standard Version of Starting Out with C++, 4th Edition
Chapter 4 Enhancing the Graphical User Interface
Infokall Enterprise Solutions
Presentation transcript:

UFCEKU-20-3Web Games Programming Creating and Updating a Graphical Heads-Up Display (HUD)

UFCEKU-20-3Web Games Programming Agenda The Typical Role of a Heads-Up Display (HUD) Steps required in implementing a HUD Creating the HUD Artwork Components Positioning HUD Components using GUI Coordinate System Declaration and Initialization of Components via Scripts Updating the HUD Based on 3D World States and Events

UFCEKU-20-3Web Games Programming Role of a Head-Up Display Inform user of character’s state, e.g. health, power, number of lives Information on capabilities –provide real-time update of collectable items that aid progression in the scenario Timers – typically time down to zero or total time value General information about other elements states in the world Camera ‘birdseye’ viewpoints to aid navigation in a complex world Menu items to access change options and settings.

UFCEKU-20-3Web Games Programming Steps Required to Establish a HUD Acquire or create art work in an appropriate format Import the HUD artwork via Asset- Import New Asset Create a GUI Texture Game Object and associate the artwork with the texture object Position the HUD components in the interface Create scripts which initialize and update the HUD based on world states and events Attach scripts to objects that change world state and trigger events which update values in the appropriate HUD script

UFCEKU-20-3Web Games Programming Creating the HUD Components Create custom artwork to suit the given scenario ( images text and numeric type if required etc.) Use.psd for content creation to retain high quality originals Export to Portable Network Graphic format with 32 bit depth to retain alpha transparency (.png 32)

UFCEKU-20-3Web Games Programming Positioning HUD Components HUD components use the same coordinate positioning as Camera Overlays. The x position in between 0..1 and the y position is between

UFCEKU-20-3Web Games Programming GUI Texture in Default Position Texture centered at x = 0.5, y = 0.5

UFCEKU-20-3Web Games Programming GUI Texture in Default Position Texture left positioned at x = 0.1, y = 0.37

UFCEKU-20-3Web Games Programming HUD Declaration and Initialization public variables associated with textures

UFCEKU-20-3Web Games Programming Updating the HUD via Scripts (BatteryCollect.js) // static variable is accessible by other scripts i.e. its // variable scope is global static var charge:int = 0; var charge1tex:Texture2D; var charge2tex:Texture2D; var charge3tex:Texture2D; var charge4tex:Texture2D; var charge0tex:Texture2D; // initialise GUI texture to false (don't display it) function Start(){ guiTexture.enabled = false; charge = 0; } This script is attached to the GUI Texture GameObject

UFCEKU-20-3Web Games Programming /* the Update function checks status of charge variable which is increased via an external script each time the player collides (collects) with a battery */ function Update () { /* first battery collected assign the first texture image to guiTexture and enable (display) texture */ if(charge == 1){ guiTexture.texture = charge1tex; guiTexture.enabled = true; } // display subsequent textures to indicate power collected else if(charge == 2){ guiTexture.texture = charge2tex; } // etc. Updating the HUD via Scripts

UFCEKU-20-3Web Games Programming Updating the HUD via Scripts (PlayerCollisions.js) function Start () { } function Update () { } function OnTriggerEnter(collisionInfo : Collider){ if(collisionInfo.gameObject.tag == "battery"){ BatteryCollect.charge++; Destroy(collisionInfo.gameObject); } This script is attached to the First Person Controller

UFCEKU-20-3Web Games Programming Island HUD example

UFCEKU-20-3Web Games Programming Summary Heads Up Displays are an important aspect of the user experience and enhance usability. HUDs in Unity 3D are easy to setup but often require artwork HUD content to be created which is often the most time consuming stage. The artwork is imported as a new asset(s) and associated with a GUI Texture GameObject via public variables. The script which directly changes the HUDs elements will be attached to the GUI Texture GameObject. The script which triggers events communicates with the GUI texture script via a static variable. This script is typical attached to the First Person Controller