Done already for your convenience! Telerik School Academy Unity 2D Game Development.

Slides:



Advertisements
Similar presentations
Windows Basic and Dynamic Disk Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator Marian Marinov CEO of 1H Ltd.
Advertisements

Amazon S 3, App Engine Blobstore, Google Cloud Storage, Azure Blobs Svetlin Nakov Telerik Software Academy academy.telerik.com.
RPN and Shunting-yard algorithm Ivaylo Kenov Telerik Software Academy academy.telerik.com Technical Assistant
Shortest paths in edge-weighted digraph Krasin Georgiev Technical University of Sofia g.krasin at gmail com Assistant Professor.
Telerik Software Academy Telerik School Academy.
Asynchronous Programming with C# and WinRT
Unleash the Power of JavaScript Tooling Telerik Software Academy End-to-end JavaScript Applications.
Touch and Gestures with Xamarin Forms
Telerik School Academy ASP.NET MVC.
Character sequences, C-strings and the C++ String class, Working with Strings Learning & Development Team Telerik Software Academy.
Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
Processing Sequences of Elements Telerik School Academy C# Fundamentals – Part 1.
C# Fundamentals – Part I
Telerik Software Academy Telerik School Academy Creating E/R Diagrams with SQL Server.
The Business Plan and the Business Model Margarita Antonova Volunteer Telerik Academy academy.telerik.com Business System Analyst Telerik Corporation.
What are ADTs, STL Intro, vector, list, queue, stack Learning & Development Team Telerik Software Academy.
Making JavaScript code by template! Learning & Development Team Telerik Software Academy.
Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training Who, What, Why?
Marketing Mix, SWOT Analysis and Stages of Developing an Idea Margarita Antonova Volunteer Telerik Academy academy.telerik.com Business System.
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Processing Matrices and Multidimensional Tables Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Learning & Development Telerik Software Academy.
Reading and Writing Text Files Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Telerik Software Academy ASP.NET Web Forms.
Classical OOP in JavaScript Classes and stuff Telerik Software Academy
Optimization problems, Greedy Algorithms, Optimal Substructure and Greedy choice Learning & Development Team Telerik Software.
Using Selenium for Mobile Web Testing Powered by KendoUI Telerik QA Academy Atanas Georgiev Senior QA Engineer KendoUI Team.
NoSQL Concepts, Redis, MongoDB, CouchDB Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
New features: classes, generators, iterators, etc. Telerik Academy Plus JavaScript.Next.
Creating E/R Diagrams with SQL Server Management Studio and MySQL Workbench Svetlin Nakov Telerik Software Academy Manager Technical.
Throwing and Catching Exceptions Tran Anh Tuan Edit from Telerik Software Academy
Loops, Conditional Statements, Functions Tran Anh Tuan Edit from Telerik Academy
With C# or “JavaScript” Telerik School Academy Unity 2D Game Development.
Private/Public fields, Module, Revealing Module Learning & Development Team Telerik Software Academy.
Building Data-Driven ASP.NET Web Forms Apps Telerik Software Academy ASP.NET Web Forms.
Course Introduction Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Telerik Software Academy End-to-end JavaScript Applications.
General and reusable solutions to common problems in software design Vasil Dininski Telerik Software Academy academy.telerik.com Intern at Telerik Academy.
Planning and Tracking Software Quality Yordan Dimitrov Telerik Corporation Team Leader, Team Pulse, Team Leader, Team Pulse, Telerik Corporation,
What you need to know Ivaylo Kenov Telerik Corporation Telerik Academy Student.
Data binding concepts, Bindings in WinJS George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer itgeorge.net.
Pavel Kolev Telerik Software Academy Senior.Net Developer and Trainer
Objects, Properties, Primitive and Reference Types Learning & Development Team Telerik Software Academy.
When and How to Refactor? Refactoring Patterns Alexander Vakrilov Telerik Corporation Senior Developer and Team Leader.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Doing the Canvas the "easy way"! Learning & Development Telerik Software Academy.
Creating and Running Your First C# Program Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Creating Graphics for the Web Learning & Development Team Telerik Software Academy.
Course Overview Doncho Minkov Telerik Software Academy Technical Trainer
Data Types, Primitive Types in C++, Variables – Declaration, Initialization, Scope Telerik Software Academy academy.telerik.com Learning and Development.
The past, the present, the future Learning & Development Team Telerik Software Academy.
Learn to Design Error Steady Code Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Connecting, Queries, Best Practices Tran Anh Tuan Edit from Telerik Software Academy
Processing Sequences of Elements Telerik Software Academy C# Fundamentals – Part 2.
Telerik JavaScript Framework Telerik Software Academy Hybrid Mobile Applications.
Building Rock-Solid Software Nikolay Kostov Telerik Software Academy academy.telerik.com Senior Software Developer and Technical Trainer
Telerik Software Academy Databases.
Things start to get serious Telerik Software Academy JavaScript OOP.
Learning & Development Mobile apps for iPhone & iPad.
Processing Matrices and Multidimensional Tables Telerik Software Academy C# Fundamentals – Part 2.
Nikolay Kostov Telerik Software Academy academy.telerik.com Team Lead, Senior Developer and Trainer
Functions and Function Expressions Closures, Function Scope, Nested Functions Telerik Software Academy
Implementing Control Logic in C# Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical trainer
Inheritance, Abstraction, Encapsulation, Polymorphism Telerik Software Academy Mobile apps for iPhone & iPad.
Mocking tools for easier unit testing Telerik Software Academy High Quality Code.
What why and how? Telerik School Academy Unity 2D Game Development.
Windows Security Model Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator
Done already for your convenience!
Presentation transcript:

Done already for your convenience! Telerik School Academy Unity 2D Game Development

1. 2D Physics Overview 2. RigidBody 2D 3. Colliders 2D 1.Circle Collider 2D 2.Box Collider 2D 3.Polygon Collider 2D 4.Edge Collider 2D 4. Forces 2

Rigidbodies, Colliders, Joints, etc.

 All physics elements are normal components  Just add them to a game object  Set all needed properties  The physics engine will start using them  Enjoy the effects  Enjoy the effects 4

 Rigidbodies Rigidbodies  Main component for the Physics Engine to start  With Rigidbody the object will start to respond to gravity  If you enable Rigidbody, you should not try to change the Transform part of the object  Instead, you should apply forces and let the engine do the heavy lifting  If you need non-moving by the engine Rigidbody, check “Is Kinematic” option 5

 Colliders Colliders  Define the shape of an object in terms of physical collisions  Most of the time invisible  Use Box Collider and Circle Collider whenever possible for performance reasons  Otherwise use Polygon Collider  Colliders with Rididbody are dynamic colliders  Colliders without Rigidbody are the static environment in your game – walls, floor, etc. 6

 Physic Materials Physic Materials Physic Materials  Materials define the physics collision effect  For example – ice is slippery, rubber has friction  Usually parameters are found by trial-error  In 2D there are two parameters  Friction – friction coefficient  Bounciness – the degree to which collisions rebound from the surface  0 – no bounce effect  1 – full bounce effect with no loss of energy 7

 Joints Joints  Attaching two rigidbodies to a fixed point  Allow restricted movement  Rotation by the three axes  Translation by the three axes  Stretching like a spring  You can set joint to break if certain force is applied 8

 Different Types of Colliders  Trigger Collider – does not respond to physics calculations but sends event to which you can subscribe from the scripts  OnCollisionEnter2D / OnTriggerEnter2D – when two colliders starts colliding for the first time  OnCollisionStay2D / OnTriggerStay2D – when two colliders are colliding  OnCollisionExit2D / OnTriggerExit2D – when colliders are no longer colliding  Simply select “Is Trigger” 9

 Different Types of Colliders  Static Collider – object with collider but no Rigidbody  Used for level geometry and should never move  Should not be disabled or enabled  If you do, major performance decrease may occur  Also – calculation errors in the engine may occur  If you want to alter it – add Rigidbody to it 10

 Different Types of Colliders  Rigidbody Collider – object with collider and Rigidbody  Most common case  Fully simulated by the physics engine  Reacts to collisions  Reacts to forces from script  Collide with all other objects 11

 Different Types of Colliders  Kinematic Rigidbody Collider – object with collider and Kinematic Rigidbody  Has “Is Kinematic” property set  Does not react to collisions and forces from the engine  Should be moved by a script  They behave like static colliders but can be enabled/disabled/moved when needed 12

How to use it?

 Rigidbody 2D Rigidbody 2D Rigidbody 2D  Attach it to objects controlled by the physics  In 2D only the XY plane takes effect for translation and the Z axis for rotation 14

 Properties of RidigBody 2D  Mass – mass of the object  Linear Drag / Angular Drag – coefficient for movements  Gravity Scale – whether the gravity should be more or less on this object  Fixed Angle – can be rotated or not?  Is Kinematic – is the body moved by forces and collisions 15

How to use it?

 Box Collider 2D Box Collider 2D Box Collider 2D  Rectangular shaped collider  Attached to an game object  With or without a sprite 17

 Properties of Box Collider 2D  Material – the material to use for the collider  Is Trigger – whether events should be sent  Offset – local offset of the collider geometry  Size – the size of the rectangular shape 18

How to use it?

 Circle Collider 2D Circle Collider 2D Circle Collider 2D  Circular shaped collider  Attached to an game object  With or without a sprite 20

 Properties of Circle Collider 2D  Material – the material to use for the collider  Is Trigger – whether events should be sent  Offset – local offset of the collider geometry  Radius – the radius of the circular shape 21

How to use them?

 Polygon Collider 2D and Edge Collider 2D Polygon Collider 2DEdge Collider 2D Polygon Collider 2DEdge Collider 2D  Complex shaped collider  Attached to an game object  With or without a sprite  Difficult to compute – performance impact 23

 Properties of Polygon Collider 2D and Circle Collider 2D  Material – the material to use for the collider  Is Trigger – whether events should be sent  Offset – local offset of the collider geometry 24

How to use them?

 Two types of forces  Constant Force 2D Constant Force 2D Constant Force 2D  Effectors (Area Effector 2D for example) Area Effector 2DArea Effector 2D  They both are added to a Rigidbody 2D  Applied every Update of the game  Good for in-game mechanics  Have acceleration options 26

 Rigidbody – component used by the physics engine for calculations  Colliders – components to register any colliding objects in the game  Different types of colliders – static, kinematic, etc.  Other physics elements – joint, forces, etc. 27

форум програмиране, форум уеб дизайн курсове и уроци по програмиране, уеб дизайн – безплатно програмиране за деца – безплатни курсове и уроци безплатен SEO курс - оптимизация за търсачки уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop уроци по програмиране и уеб дизайн за ученици ASP.NET MVC курс – HTML, SQL, C#,.NET, ASP.NET MVC безплатен курс "Разработка на софтуер в cloud среда" BG Coder - онлайн състезателна система - online judge курсове и уроци по програмиране, книги – безплатно от Наков безплатен курс "Качествен програмен код" алго академия – състезателно програмиране, състезания ASP.NET курс - уеб програмиране, бази данни, C#,.NET, ASP.NET курсове и уроци по програмиране – Телерик академия курс мобилни приложения с iPhone, Android, WP7, PhoneGap free C# book, безплатна книга C#, книга Java, книга C# Николай Костов - блог за програмиране

 C# Telerik Academy  csharpfundamentals.telerik.com csharpfundamentals.telerik.com  Telerik Software Academy  academy.telerik.com academy.telerik.com  Telerik Facebook  facebook.com/TelerikAcademy facebook.com/TelerikAcademy  Telerik Software Academy Forums  forums.academy.telerik.com forums.academy.telerik.com