万本电子书0元读

万本电子书0元读

顶部广告

Getting Started with Unity 5.x 2D Game Development电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Francesco Sapio

出  版  社:Packt Publishing

出版时间:2017-02-01

字       数:638.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build a tower defense game and earn delectable C# treats by baking cupcakes and fighting fearsome sweet-toothed pandas About This Book Build a complete and exciting 2D Tower Defense game from scratch. Understand and learn to perform each phase of the game development pipeline Homework and exercises to improve your skills and take them to the next level Who This Book Is For If you are looking forward to get started with 2D game development, either if you are a newcomer to this world, or you came from 3D games or other game engines, this book is for you. Although there are many references to other resources throughout the book, it is assumed that you have a general understanding of C# and its syntax and structure. What You Will Learn Import and set up assets for 2D game development Design and implement dynamic and responsive User Interfaces Create and handle complex animation systems Unlock all the potentiality of the physics engine Implement Artificial Intelligence algorithms to give intelligence to your NPCs Script gameplay and overall bring your ideas to life In Detail Want to get started in the world of 2D game development with UnityThis book will take your hand and guide you through this amazing journey to let you know exactly what you need to build the games you want to build, without sacrificing quality. You will build a solid understanding of Unity 5.x, by focusing with the embedded tools to develop 2D games. In learning about these, along with accurate explanations and practical examples, you will design, develop, learn how to market and publish a delectable Tower Defense game about cupcakes versus pandas. Each chapter in this book is structured to give you a full understanding on a specific aspect of the workflow pipeline. Each of these aspects are essential for developing games in Unity. In a step-by-step approach, you will learn about each of the following phases: Game Design, Asset Importing, Scripting, User Interfaces, Animations, Physics, Artificial Intelligence, Gameplay Programming, Polishing and Improving, Marketing, Publishing and much more. This book provides you with exercises and homework at the end of each chapter so that you can level up your skills as a Unity game developer. In addition, each of these parts are centered on a common point of discussion with other learners just like you. Therefore, by sharing your ideas with other people you will not only develop your skills but you will also build a network. Style and approach This is a fun step-by-step approach in the whole pipeline of 2D game development in Unity, which is explained in a conversational and easy-to-follow style. Each topic is explained sequentially, allowing you to experience both basics and advanced features of Unity. By doing this, the book is able to provide you with a solid grasp on each of the topics. In this way, by engaging with the book’s content, exploring the additional references to further readings and completing the homework sections, you are able to challenge yourself and apply what you know in a variety of ways. Once you have finished reading this book, you will be well on your way to developing games from start to finish!
目录展开

Getting Started with Unity 5.x 2D Game Development

Getting Started with Unity 5.x 2D Game Development

Credits

About the Author

Acknowledgment

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. A Flat World in Unity

Learning game development

Tower defense games

Designing our game

Getting ready

Remembering the past to build the future

Organizing the project

A 2D world

Sprites

Sprite Renderer

Importing new friends

The Sprite Editor

Manual mode

Automatic mode

Polygonal mode

Sprite Editor for UI-9-slice scaling

Preparing the assets

Scenes as levels

Setting proportions

There is more about the Unity interface

Homework

Summary

2. Baking Cupcake Towers

2D objects

Parenting game objects

Difference between world coordinates and local coordinates

Ordering the different layers with Z-Buffering

Unfolding the map

Layers and tags

Prefabs

The game view

Math background

Scripting in Unity

Creating new scripts

Basics about scripts

Variables

Attributes

Functions

Comments

Execution order

Making sprinkles

The projectile class

Scripting the projectile mother class

Tons of sprinkles through Prefabs

Baking cupcakes towers

What a cupcake tower does

Scripting the cupcake tower

Shooting to the pandas

Upgrading the cupcake tower, making it even tastier

A pre-baked cupcake tower through Prefabs

More about coding in Unity

Static variables

Inheritance

Random numbers in Unity

Homework

Summary

3. Communicating with the Player – the User Interface

Getting ready

Designing the user interface

Programming the user interface

User interface system

Canvas

Screen space – Overlay

Screen space – Camera

World space

Draw order of UI elements

Visual components

The Image component

The Text component

Basic transformations

The Rect Tool

The Rect Transform

Layout components

Fitters

Layout groups

The layout element component

Interaction components

The selectable base class

Interactable option

Transition options

Navigation options

Button

Toggle and Toggle Group

Slider

Scrollbar

Dropdown

Input Field

Scroll Rect

More about UI rendering

The canvas renderer

More visual components

UI effect components

UI and lights

The canvas components

Canvas group

Event system

Scripting user interfaces

Designing the interface for our game

Preparing the scene for the UI

Creating a health bar

Creating and placing the health bar

Scripting the health bar

Implementing the sugar meter

Creating and place

Scripting the sugar meter

More about UI scripting – handlers

What about all the rest?

Homework

Summary

4. No Longer Alone – Sweet-Toothed Pandas Strike

Getting ready

Animations

A historical overview

Animations in video games

Workflow for animations

Animations clips and the Animator component

Creating Animation clips with a controller

The Animator component

Creating the other animation clips

The Animator

The Animator window

The Animator state machine

The Animator states

Special states

The animator parameters

The animator transitions

Transition settings

Transition graph

Transition conditions

Testing transitions

The panda's Animation State Machine

Testing the panda's Animation State Machine

Scripting Animations

State machine behaviours

The destroy behaviour

The panda script

More about Animations

Avatars

Sub-state machines

The hierarchical location menu

Layers in the Animator

Blending trees

Animator Override Controller

Culling Mode in the Animator component

Root motion

Inverse Kinematic

Animator component information box

Legacy animation

Get animated!!

Homework

Summary

5. The Secret Ingredient Is a Dash of Physics

Getting ready

Physics in video games

Physics – basics

World coordinates and local coordinates

Velocity

Mass

Centre of mass

Kinematics

Dynamics

Force and torque

Collisions

Rigid body

Friction – linear and angular drag

The Unity Physics engine

Understanding Physics in Unity

Physics settings in Unity

Physics components

Rigidbodies

How a Rigidbody 2D works

Body types

Rigidbody properties

Dealing with rigidbodies

Colliders

Dealing with colliders

Joints

Main properties of Joints

The other rigidbody

Breaking joints

Specific joints

Distance Joint 2D

Fixed Joint 2D

Friction Joint 2D

Hinge Joint 2D

Relative Joint 2D

Slider Joint 2D

Spring Joint 2D

Target Joint 2D

Wheel Joint 2D

Effectors

Constant Force 2D

Area Effector 2D

Buoyancy Effector 2D

Point Effector 2D

Platform Effector 2D

Surface Effector 2D

Physics Material 2D

Dealing with physics in Unity

Other things about Physics

The Simulate setting on rigidbodies

Physics Raycaster 2D component

The other Physics settings

Gizmos for colliders

Physics for our game

Set up Pandas as a rigidbodies

Set up projectiles as rigidbodies

Detect sprinkles

Homework

Summary

6. Through a Sea of Sprinkles – Navigation in Artificial Intelligence

Getting ready

Introduction to artificial intelligence

The importance of artificial intelligence in video games

Navigation

Aspects of navigation

Pathfinding and its techniques

Waypoints for enemies

Getting the waypoint coordinates

Implementing waypoints – the first/static way

Implementing waypoints in the Game Manager

Moving along the designed path – static

Implementing waypoints – the second/dynamic way

Implementing waypoints as separate entities

Moving along the designed path – dynamic

More about artificial intelligence in games

Other techniques for navigation at the pathfinding level

Navigation at the level of steering behaviours

Navigation at the level of pathfinding/decision making – belief-driven pathfinding

Beyond navigation

Homework

Summary

7. Trading Cupcakes and the Ultimate Battle for the Cake – Gameplay Programming

Getting ready

What does gameplay programming mean?

Planning what is left to implement for our game

Trading cupcake towers

The trading parent class

Modifying the CupcakeTowerScript

Buying cupcake towers

Selling cupcake towers

Upgrading cupcakes towers

Adding the trading options to the user interface

Placing the towers

Sketching the idea of how it works

Allowed areas

Scripting the placement script

Selecting the towers

The Game Manager

Game over conditions

Game over feedback

The GameOver function

Keeping track of the game's progress

Panda invasion – spawning Pandas

What is a coroutine?

Sketching the idea of how it works

Setting up the spawning system

Managing waves

The single wave

The main menu

Designing the main menu

Creating the main menu in another scene

Loading scenes through scripts

Techniques we learnt in this chapter

Homework

Summary

8. What Is beyond the Cake?

Enhancing and improving your game

Improving cupcake towers

Shooting policies

Special sprinkles

Aging and pricing model

Improving the user interface

Improving levels

Multilevel

Large maps

Many paths

Many Pandas

Multiphase bosses

A better spawning system

Switching difficulty at runtime

Training and extending your Unity skills to become a better game developer

Making things easier for other team members

Exposing events

Sprinkles pooling

Saving your data

Debugging

Remote Logs

Cleaning the release version

More about communication between scripts

Documenting the code

Protecting your game

Building for more than one platform

Input/output devices

Virtual reality in Unity

Balancing the game

Extending the Unity editor

Multiplayer and networking

Practice makes perfect

Improving the atmosphere of the game

Visuals

Color schemes

Homework

Lighting

Lights in Unity

Homework

Environment

Homework

Special effects

Particle systems

Post processing

Other visual effects

Audio

Music

Sound effects

Eliciting emotions

Homework

Audio in Unity

External audio systems

Teamwork

It is not just about you, it is about working in a team

Sharing a common vision

Managing expectations

Collaboration and communication are key

Ways to communicate

Version control

Make a GDD and stick to it

Keeping it tidy with project management tools

Slack

HacknPlan

Drive

Dropbox

Trello

Redbooth

GitHub

BitBucket

Calendar

Pinterest

Hootsuite

Polishing your game

Processing the power

Checking the build size

Texture optimitation

Stats and profiling

Other optimization tips

Playtesting

Why are you even playtesting?

Exercise

Whom do you need to playtest?

The solo test run

Making it a social occasion

Putting it within boundaries

Reaching out to family and friends

Those who are strangers

Those who you want to play your game

When

Where

What

A little goes a long way

How

Methods of playtesting

Observe

Question and explain

Reflect and follow up

Creating your online presence

Do your research

Conducting an audit

Engaging with your audience

Rewarding engagement

Marketing on social media

Blog about it

Twitter

Exercise

Instagram

Facebook

MailChimp

Getting ready to publish

Crowdfunding campaigns

Building in Unity

Clearing the air

Accepting terms and conditions

Localization

Ethical considerations

Summary

Final notes and goodbye

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部