Transcript Powerpoint

Game Design Comp 150GD
Michael Shah
3/6/15
Topics
1.
2.
3.
4.
Digital Game Testing
C# Scripting Tips
GUI
Music Room
Part 1 - Digital Game Testing
PLAYTEST ROUND #3 (20 minutes):
1. Observers stay to manage playtest, Players find
other games to play.
2. If team chose 1-3 instructions, give them.
3. Players attempt to play prototype (5-10 min).
Observers take notes!
4. Players fill out questionnaire (5 minutes).
5. Time permitting, discuss answers.
Part 2 - Team Meeting
1. Convene at your team table to discuss
observations and questionnaire answers.
2. Discuss Production goals for the next week
(next top priority Backlog items, potentially
influenced by tester experience/
observations) and divide work equitably.
3. Give yourself a score of 1-5
Part 3 – C# Scripting
• Best place to get help:
– http://unity3d.com/learn/tutorials/modules/begi
nner/scripting
– http://unity3d.com/learn/resources/talks
– http://docs.unity3d.com/
• Ctrl+’ or Cmnd + ‘ on MonoDevelop
Part 3 – C# Scripting
Part 3 – Filling in the Knowledge Gaps
•
•
•
•
•
All of my scripts in Unity are ____?
What are the three Access Modifiers?
DataTypes: Value versus Reference?
What are these?
What does static do? In what contexts?
•
•
•
•
•
FixedUpdate() versus Update()
Left or Right hand Rule? And what is it?
Time.DeltaTime?
Mathf.Lerp versus Vector3.Lerp
GetComponent<what_am_I>()
•
•
•
•
•
Culling? (Hint: Clip Plane)
2 different Projections?
Have you explored Edit/Project Settings?
Shortcut for the Asset Store?
Are you familiar with the gizmos panel, and
real-time changes?
• Are you e-mailing your team daily?
• What project management tools are you
using?
• Do you need help with git?
• Lab suggestions? (Special FX & Music next)
• I will be here during Spring Break!
• What is PlayerPrefs?
• System.Collections.Generics? List<String>()
• What game mechanic might you use
generics for?
• What is Inheritance?
• What is an example of Inheritance?
C# example of Inheritance
Another example:
https://www.eecs.tufts.edu/~mshah08/comp/150GD/notes/office_hours_2_25_15.txt
•
•
•
•
•
Awake versus Start?
Should I use power of two sized textures?
What is a Co-routine?
How do I implement one?
Can we do an example?
C# Coroutine Example
• Yes, we will do an example in our project
called Music Room
• Coroutines are functions that execute in
intervals
• Needs to override IEnumerator. Why?
C# Coroutine Example
• // Demonstrate passing a function.
• StartCoroutine (restart ());
– C# also supports anonymous functions (lamdas)
• So we can do some really cool things right?
– Case study of MusicRoom code shows we have to be
very very careful!
• I spent hours trying to get an example working, I suggest not
optimizing quite yet! (Root of the problem is in threading)
– For now, great for one off events, to keep your code
clean and fast.
Start a coroutine
Part 4 – Music Room
Good and Bad Menus: http://kotaku.com/5960230/the-tencommandments-of-video-game-menus-sinners-and-saints
Part 4 – Goals
• Build a simple menu using the GUI
– Add an animation, learn about sizing
• Use the GUI components in
– 2D Screenspace
– WorldSpace (2D or 3D)
• Experiment with mechanim
– Play music in different rooms
• Borrow and learn from my code
Music Room
• Setup triggers, align them with mechanim,
play them smoothly while
Some Things to Note on the Design
• Lots of simple prefabs for geometry
– Look at the hallways
• Hierarchy (Project and Scene) is kept fairly
clean
– Save yourself from headaches
• Using multiple scenes
– Keep your game organized
Scripts Included
• CameraScript – Follows the player around
• DestroyScript – Moves player from out of
bounds area back to start
• GameController – Handles events in the game
• Menu – Loads a Scene
• NPC – Makes a gameobject an NPC, inherits
from Human.
• Player1 – Moves object around
Part 4 – Tasks
• The scene is built so you have it.
• We’re going to rebuild it live so you can see
how parts of it are done.
– GUI Main Menu
– Handling button clicks
– Adding a Coroutine
– Setting up mechanim to handle events
• We will add music if we have time, or in the next lab
Part 4 – Items I won’t demonstrate but
you can notice
• Directional lighting, using hard shadows on very in-organic
shapes.
• Particle System on both the main menu and the game.
– Lots of fun options to play with
• NPC script shows one very simple example of inheritance.
• Falling off the boundary of the map returns the player to their
initial position (mario cart style) and we turn the box collider
off so we can go through walls.
• Clicking on objects and raycasting
Notes on GUI
• 2D Images need to be converted from
‘Texture’ to ‘2D and UI’
• Can position in the 3D space.
• Can use Sprite Editor to make sure rect
transform aligns properly
Other
• GameObject.Find("GameController").GetCom
ponent<Animator>().SetBool(o.gameObject.n
ame,true);