1 / 15

Unity Game Development

Unity Game Development. Unity2D & Advanced Unity features. Class overview. Class 14 Revision Unity2D Spritesheets 2D Movement using Rigidbody2D Animating Sprites 2D Triggers & Collisions 2D Enemy AI Advanced: Extra Features Profiler Performance Optimization Unity Services

dsteve
Télécharger la présentation

Unity Game Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unity Game Development Unity2D & Advanced Unity features

  2. Class overview • Class 14 Revision • Unity2D • Spritesheets • 2D Movement using Rigidbody2D • Animating Sprites • 2D Triggers & Collisions • 2D Enemy AI • Advanced: Extra Features • Profiler • Performance Optimization • Unity Services • Entity Component System (ECS)

  3. Revision • UNet Mirror • Multiplayer Cameras • NetworkAnimator • [Command] • [ClientRpc] • SyncVar

  4. Unity2D • Unity2D = Intended for 2D games, different features & functionality. • Several components have a 2D version such as: Rigidbody2D, BoxCollider2D, …

  5. Spritesheets • A sprite sheet is a bitmap image file that contains several smaller graphics in a tiled grid arrangement. • Allows applications to use the graphics while only needing to load a single file.

  6. 2D Movement using Rigidbody2D • CharacterController is not available in Unity2D, use Rigidbody2D instead. • Calculating movement using input is similar, now using Vector2

  7. Animating Sprites • Name Sprites using Spritesheet Editor • Setup Animator Controller for Player Sprite • Open Animation window and setup Sprites in order

  8. 2D Triggers & Collisions • Setup BoxCollider2D around character • Mark as Trigger • Activate during Attack using View Direction • Deactivate after Attack

  9. 2D Enemy AI • NavMesh and NavMeshAgent are unavailable in Unity2D • For pathfinding a custom implementation is required (A* pathfinding?) • Movement similar to player  Determine Attack Direction & Move Rigidbody2D • On impact change direction

  10. Advanced: Extra Features • Add UI to display player Health • Implement PlayerDeath and PlayerVictory conditions • Implement Audio effects • Setup Sprite Animations • Add Level restart functionality • Controller & Keyboard support

  11. Profiler • Profiler allows you to monitor the performance of your Unity project. • Including CPU Usage, Rendering (with Frame Debug) and Memory.

  12. Performance Optimization • Determine Performance issues using Profiler • Use Static Batching when possible • Reduce & Reuse Textures • Use Culling to reduce Rendered Objects • Optimize objects using LOD • Compress all assets if possible (e.g. lower resolution, lower samplerate, …) • Optimize Physics calculations using LayerMasks • Use simple colliders and don’t overuse Rigidbodies • Cache data instead of re-calculating same results

  13. Unity Services • Use Unity Services to: • Implement Ads • Analyze data • Build in the cloud • Collaborate • Setup in-app purchases • Setup Multiplayer settings

  14. Entity Component System (ECS) • ECS & Job System is a new way of programming  massive performance gains

  15. Q&A • Do you have any questions related to the topics mentioned?

More Related