Beginner Game Development Tau Ceti Labs Play with
Beginner Game Development Tau Ceti Labs Play with Science Updated Sep 2017
Recommended Downloads Unity 3 D personal (free) https: //store. unity. com/products/unity-personal Visual Studio Community (free) https: //www. visualstudio. com/vs/community/
• A little bit about Tau Ceti Labs About us Unity Interface Introduction • Introduction into the main windows of the Unity Editor • General introduction and best practices when scripting a game What this will cover Scripting Introduction • Walking through and building upon a Unity demo Demo walkthrough Extending Unity Editor
About Tau Ceti Labs Engineering Entertainment
Founders Christian Moe Multi-physics simulation developer Masters in Mechanical Engineering, UC Merced Julie Ann Emery Actor, story writer, producer Better Call Saul – Betsy Kettleman Preacher – Lara Featherstone Kevin Earley Actor and producer Broadway x 3 Then We Got Help!
Simulations + Science Fiction
Science based Sci-Fi games Rich Sci-Fi story from professional writers Interactive simulations from Engineers Great graphics (coming soon) Play with Science… Hiring@Tau. Ceti. Labs. com
Why we chose Unity 3 D minimizing dependencies, maximizing flexibility
Using a few powerful and flexible programs Unity 3 D Development, version control and multi-platform targeting Visual Studio Script editing and debugging Maya More rapid asset generation and animation …and they have been checked out to play very nice together
Why we chose Unity 3 D Easy to approach Flexible and powerful Very active development Broad user base
Unity Interface The main tabs
Toolbar Move, Rotate, Play, Collaborate
Scene/Game Views Scene Visualization and Testing Window
Hierarchy Scene Tree View
Project Game Assets
Inspector Object customization
Scripting Introduction Programming the game
Scripting Overview Developing a game is different than traditional programming All pieces of executing code is connected to an object in scene Update functions are where most code execution is initiated Code needs to be efficient/performant to reach 60 FPS
Scripting Good Habits Break out code into minimally containable form Objects can have many scripts attached to them Making the scripts into small independent entities makes for easy reuse of code Easier to maintain smaller pieces of code Use provided functions as much as possible Phys. X functions in unity run orders of magnitude Quaternions for rotations are easy to use Functions are documented at docs. unity 3 d. com
Tank Demo Move and shoot
General Script Structure Awake() Start() Update() Fixed. Update() Runs when the script is initialized Runs before the first Update Runs every frame Runs every physics frame Useful for initialization code Useful for getting the script ready for the first update Useful for updating visual information before a frame is rendered Useful for updating location, collision, physics forces etc.
Rigidbody Collider Camera Audio Listener Audio Source • Defines a body that will respond to physics forces as a rigid object • Defines the shape of the physics collider this object will use • This is simply the object that is set to create a view of the scene during gameplay • This listens to audio sources in the scene, taking into account distance form the source • This projects a specified audio file in the scene from a predetermined location Some Used Object Components
Script Structure Game Tank Shell • Managers • Health • Movement • Shooting • Explosion
Tank Demo This demo is found on the Unity 3 D website Under learning These demos are great ways to get your feet wet I will be using this tank demo as: An example of coding techniques A base to build upon A way to introduce some slightly more advanced Unity development tools
Tanks Destructible Environment Design Goals Shooting a building a few times causes it to collapse The collapse should remove the building The collapse ‘animation’ should look ‘good’ Able to select if buildings respawn after each round or game
Adding and modifying scripts Add a Building. Health script Keep track of health Control death animation Modify Shell. Explosion script Apply damage to buildings Modify Game. Manager Reset buildings each round
Building. Health
Building. Health
Building. Health
Shell Explosion
Game Manager
Game Manager
Extending the Editor Custom Editor Any script inheriting from Mono. Behaviour can have a customized editor in the inspector Property Drawer Any class that is Serializable can have a customized drawer in the inspector Both are useful for: Grouping up sets of variables Displaying custom information/warnings Generating simple visuals
Building Health Editor
Building Health Editor
Tank Manager Drawer
- Slides: 36