My Account Log in

3 options

Learning C# 7 by developing games with Unity 2017 : learn C# programming by building fun and interactive games with Unity / Micael DaGraca, Greg Lukosek.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
DaGraça, Micael, author.
Lukosek, Greg, author.
Language:
English
Subjects (All):
Unity (Electronic resource).
Video games--Programming.
Video games.
C# (Computer program language).
Physical Description:
1 online resource (266 pages) : illustrations (some color)
Edition:
Third edition.
Place of Publication:
Birmingham, England : Packt, 2017.
System Details:
text file
Summary:
Develop your first interactive 2D and 3D platform game by learning the fundamentals of C# About This Book Learn the fundamentals of C# 7 scripting to develop GameObjects and master the basics of the new UI system in Unity 2017 Build and develop your 2D game right from scratch and extend it to 3D while implementing the principles of object-oriented programming and coding in C# 7 Get to grips with the fundamentals of optimizing your game using the latest features of Unity 2017 Who This Book Is For This book is for game developers and enthusiasts who want to get started with game development with Unity 2017. No prior experience of C# is required. What You Will Learn Create your first 2D and 3D games in Unity Understand the fundamentals of variables, methods, and code syntax in C# Use loops and collections efficiently in Unity to reduce the amount of code Develop a game using object-oriented programming principles Implement simple enemy characters into the game to learn point-to-point movement and Tree behaviors Avoid performance mistakes by implementing different optimization techniques Export 3D models and animations and import them inside a Unity project In Detail Do you want to learn C# programming by creating fun and interactive games using the latest Unity 2017 platform? If so, look no further; this is the right book for you. Get started with programming C# so you can create 2D and 3D games in Unity. We will walk you through the basics to get you started with C# 7 and its latest features. Then, explore the use of C# 7 and its latest functional programming capabilities to create amazing games with Unity 2017. You will create your first C# script for Unity, add objects into it, and learn how to create game elements with it. Work with the latest functional programming features of C# and leverage them for great game scripting. Throughout the book, you will learn to use the new Unity 2017 2D tool set and create an interactive 2D game with it. You will make enemies appear to challenge your player, and discover some optimization techniques for great game performance. At the end, you will learn how to transform a 2D game into 3D, and you will be able to skill up to become a pro C# programmer with Unity 2017! Style and approach The book takes a practical, step-by-step approach where you learn C# coding while developing fun and interactive games.
Contents:
Cover
Title Page
Copyright
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Chapter 1: Discovering Your Hidden Scripting Skills and Getting Your Environment Ready
Prerequisite knowledge to use this book
Dealing with scriptphobia
Downloading Unity
Obtaining a free license
Teaching behavior to GameObjects
Using Unity's documentation
The Unity community - asking others for help
Working with C# script files
Creating a C# script file
Introducing the MonoDevelop code editor
Opening LearningScript in MonoDevelop
The namespace - highlighted in blue
Watching for possible gotchas while creating script files in Unity
Fixing synchronization if it isn't working properly
Adding our script to GameObject
Lots of files can create a mess
Why does my Project tab look different?
Instance? What is this?
Summary
Chapter 2: Introducing the Building Blocks for Unity Scripts
Understanding what a variable is and what it does
Naming a variable
A variable name is just a substitute for a value
Creating a variable and seeing how it works
Declaration
Assignment
Click Play!
Changing variables
Watching for a possible gotcha when using public variables
What is a method?
Using the term "method" instead of "function
Method names are substitutes, too
Introducing the class
Inheritance
The Start(), Update(), and Awake() methods, and the execution order
Components that communicate using dot syntax
What's with the dots?
Making decisions in code
Using the NOT operator to change the condition
Checking many conditions in an if statement
Using else if to make complex decisions
Making decisions based on user input
Pencil and paper are powerful tools.
Summary
Chapter 3: Getting into the Details of Variables
Writing C# statements properly
Understanding component properties in Unity's Inspector
Variables become component properties
Unity changes script and variable names slightly
Changing a property's value in the Inspector panel
Displaying public variables in the Inspector panel
Private variables
Naming your variables properly
Beginning variable names with lowercase
Using multiword variable names
Declaring a variable and its type
The most common built-in variable types
Assigning values while declaring a variable
Where you declare a variable is important
Variable scope - determining where a variable can be used
Chapter 4: Getting into the Details of Methods
Using methods in a script
Naming methods properly
Beginning method names with an uppercase letter
Using multiword names for a method
Parentheses are part of the method's name
Defining a method the right way
The minimum requirements for defining a method
Understanding parentheses - why are they there?
Specifying a method's parameters
How many parameters can a method have?
Returning a value from a method
Returning the value
Example
Chapter 5: Lists, Arrays, and Dictionaries
What is an array?
Declaring an array
Storing items in the List
Common operations with Lists
List &lt
T&gt
versus arrays
Retrieving the data from the Array or List&lt
Checking the size
ArrayList
Dictionaries
Accessing values
How do I know what's inside my Hashtable?
Chapter 6: Loops
Introduction to loops
The foreach loop
The for loop
An example
The while loop
while versus for loops
Loops in statements
Modulo
Searching for data inside an array
Breaking the loop
Summary.
Chapter 7: Object, a Container with Variables and Methods
Working with objects is a class act
A few facts
Instantiating an object
Bored yet?
Using methods with objects
Custom constructors
Overloading
Chapter 8: Let's Make a Game! - from Idea to Development
Your first game - avoiding the trap of the never-ending concept
What do I need to learn before I start creating my own game?
The concept
Game mechanics and core components
Breaking the concept into smaller parts
Testing the mechanics
Level design
An animated 2D character
Physics
Mouse and touch controls
Collectables and obstacles
Scoring
UI - the user interface
Target platform and resolution
Target screen resolution
Chapter 9: Starting Your First Game
Setting up a new Unity project for our game
Backup
Keeping your project clean
Preparing the player prefab
Rigidbody2D
CircleCollider2D
PlayerController
User input
Jump
Animator
Running
Code
PlayerController.cs
Chapter 10: Writing GameManager
Gameplay loops
Singleton class
Starting the game
Setting up input keys
Using triggers
Restarting the game
Setting up the player starting position
Code in this chapter
Chapter 11: The Game Level
Designed levels versus generated levels
Creating a designed level
Creating a generated level
Planning the LevelGenerator class
Writing the script LevelGenerator
Creating a copy of the level piece
Instantiating
Vector3
Testing LevelGenerator
Extending the level
The code used in this chapter
Chapter 12: The User Interface
Introducting the Unity UI
Views
Constructing the view UI - how to keep things clean
Recognizing events
Buttons.
Basic button
The image
The Button component
Interaction
The Button action
Hiding and showing the Canvas
Reference exceptions
GameView
Game over
The code in this chapter
Chapter 13: Collectables
Collectables
The coin prefab
The Collectable class
High score and persisting data
Health Points and Health bar
Magic Points and Magic bar
Chapter 14: Enemies
What makes an enemy?
Movement
Movement by animation
Trigger movement
Making it an enemy
Chapter 15: Audio, 3D Games, and Export
How to add sound effects and music
Where to find sound effects and music
Adding music
Adding sound effects
Through animation
Through script
How to create a 3D game
3D models
3D animations
How to export and make it playable
Index.
Notes:
Includes index.
Description based on online resource; title from PDF title page (ebrary, viewed February 5, 2018).
OCLC:
1021887822

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account