Learn Unity 3D Programming with UnityScript: Unity's JavaScript for Beginners

Book description

Learn Unity Programming with UnityScript;is your step-by-step guide to learning to make your first Unity games using UnityScript. You will move from point-and-click components to fully customized features. You need no prior programming knowledge or any experience with other design tools such as PhotoShop or Illustrator - you can start from scratch making Unity games with what you'll learn in this book.

Through hands-on examples of common game patterns, you'll learn and apply the basics of game logic and design. You will gradually become comfortable with UnityScript syntax, at each point having everything explained to you clearly and concisely. Many beginner programming books refer to documentation that is too technically abstract for a beginner to use - Learn Unity Programming with UnityScript will teach you how to read and utilize those resources to hone your skills, and rapidly increase your knowledge in Unity game development.

You'll learn about animation, sound, physics, how to handle user interaction and so much more. Janine Suvak has won awards for her game development and is ready to show you how to start your journey as a game developer. The Unity3D game engine is flexible, cross-platform, and a great place to start your game development adventure, and UnityScript was made for it - so get started game programming with this book today.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Introduction
  11. Chapter 1: Getting Started with Unity
    1. What Is UnityScript?
    2. Prerequisites
    3. Meet Unity
    4. Setting Up the Development Environment
    5. Getting Started with AngryBots
      1. Game View (+2)
      2. Hierarchy View (+4)
      3. Scene View (+1)
      4. Inspector (+3)
      5. Project Panel (+5)
      6. Console (SHIFT++C)
    6. Summary
  12. Chapter 2: Game Programming 101
    1. MonoDevelop
    2. Variables and Functions
    3. Conditionals
      1. Boolean Logic and Conditionals
    4. Loops
      1. The for Loop
      2. The while Loop
      3. The do-while Loop
    5. Coordinate Geometry and Vectors
    6. Summary
  13. Chapter 3: Making a Simple Scene
    1. New Project, New Scene
    2. The Game Object
    3. Components
    4. The Main Camera
      1. Transform
      2. Camera
      3. GUILayer
      4. Flare Layer
      5. Audio Listener
    5. Light
      1. Common Light Properties
      2. Other Properties
    6. The Cube
      1. Transform
      2. Mesh Filter
      3. Box Collider
      4. Mesh Renderer
      5. Material
    7. Prefabs
    8. Summary
  14. Chapter 4: Using Scripts and the GameObject
    1. Scripts as Behavior Components
    2. Getting the Game Started
      1. Awake
      2. Start
      3. Update
      4. Scripting in Start
      5. Color
      6. Frame Rates
      7. Time.deltaTime
      8. Scripting in Update
      9. User Input
      10. Cleaning Up Your Code
      11. Enabling and Disabling Components
      12. Destroying Game Objects
    3. Instantiation
    4. Summary
  15. Chapter 5: Moving the GameObject
    1. Rotate
      1. Editing Properties While Playtesting
      2. Add User Interaction
    2. Translate
      1. Transform.position
    3. Smoothing It Out with Lerp
    4. Mecanim
    5. I’m a Doctor, Not a . . . !
    6. Modeling, Rigging, and Skinning
    7. The Asset Store
    8. Import a Character Model
    9. Create and Configure the Avatar
    10. Import the Animation
    11. Create an Animator Controller
    12. Run Zombie Run
    13. Run Like a Zombie
    14. More Animations
    15. Configure the Animations
    16. Root Motion
    17. OnAnimatorMove
    18. Transitions
    19. Any State
    20. User Input and the Input Manager
    21. Blend Trees
    22. Don’t Reinvent the Wheel
    23. Summary
  16. Chapter 6: Starting with Coding Physics
    1. Rigidbodies
      1. Rigidbody Properties
      2. Controlling a Rigidbody with Forces
    2. Colliders
      1. OnCollision
      2. The Other GameObject
    3. Target Practice
    4. Physic Materials
      1. Bounciness
    5. LookAt
      1. Accessing Other Game Objects
    6. Triggers
      1. OnTrigger
    7. Rapid Prototyping
    8. Spawning and Spawn Points
    9. Changing the Character Model
    10. Summary
  17. Chapter 7: Using Advanced Physics Concepts
    1. Setting Up the Obstacle Course
    2. Lowering Platform Obstacle
    3. Joints and the Pendulum Obstacle
      1. Fixed Joint
      2. Hinge Joint
      3. Build the Pendulum Chain
      4. Character Joint
      5. Spring Joint
      6. Configurable Joint
    4. Raycasting
      1. Tags
    5. Layers
    6. Character Controller
    7. Summary
  18. Chapter 8: Particle Emitters and Special Effects
    1. The Shuriken Particle System Engine
    2. The Grand Entrance
    3. Puff of Dust
    4. Energy Burst
    5. Particle Effect
    6. Land With Force
    7. Bomb Obstacle
    8. Blizzard Obstacle
    9. Laser Obstacle
    10. Laser Emitter
    11. Laser Beam
    12. Tracer Fire Obstacle
    13. Projectile Prefab
    14. Projectile Launcher
    15. Summary
  19. Chapter 9: Game Design and Logic—The Blueprint
    1. Game
    2. Games, Minigames, and Microgames
    3. Game Design Considerations
      1. Target Audience and ESRB Ratings
      2. Game Genres
      3. Themes
    4. Fun and the Game Experience
      1. Maps
      2. Pacing
      3. Balance
      4. Progression
      5. Punishments and Rewards
    5. The Game Design Document
      1. The Game Development Team
      2. The One-Sheet
      3. The Concept Overview
      4. The GDD
    6. Summary
  20. Chapter 10: Putting the Pieces Together and Building Your Game
    1. Implementing the Design
    2. Playtesting and Cheat Codes
      1. Land Mine Zone
      2. Moving Platform Zone
      3. Cannon Zone
      4. Pendulum Zone
      5. Laser Zone
      6. Blizzard Zone
      7. Enemy Zone
    3. Debugging
      1. Compiler Errors
      2. Warnings
      3. Runtime Errors
      4. Exception Handling
    4. Summary
  21. Chapter 11: Enhancing The User Experience: GUI and Sound
    1. Creating GUI Controls
      1. Display Text
      2. Text Input
      3. More Controls
      4. Customizing Controls
    2. Audio
      1. Audio Listener
      2. Audio Source
      3. 3D vs. 2D Sound Properties
      4. Audio Clip
      5. Audio Settings
      6. Audio Testing
    3. Adding Audio to the Obstacle Course
      1. Permission and Credits
      2. Music
      3. Sound Effects
    4. Summary
  22. Chapter 12: Optimizing Your Game
    1. Target Performance
    2. Tracking Your Target
    3. When and Where to Optimize
    4. Design Phase
    5. Development Phase
    6. Creating a Build Log
    7. Scripts
      1. Static Typing and #pragma strict
      2. Caching Component Lookups
    8. More Scripting Optimization Alternatives
      1. Use Triggers
      2. Object Pooling
      3. Coroutines
    9. Mecanim Optimization Tips
    10. Project Settings
      1. Quality Settings Manager
      2. Physics Manager
      3. Time Manager
      4. Audio Manager
      5. Player Settings Manager
      6. Tags and Layers Manager
      7. Project Settings Classes
    11. More Graphics Optimizations
    12. Cameras
    13. Textures
    14. Shaders
    15. Publishing
    16. Changing Scenes
    17. Summary
  23. Chapter 13: Where to Go from Here
    1. Scripting and Other Technical Resources
    2. Technical Forums
    3. Other Developer Forums
    4. Platform-Specific Developer Resources
    5. Casual Groups, Organizations, and Gatherings
    6. Game Jams
    7. Contests and Awards
    8. Contests
    9. Awards
    10. Code Sources
    11. More Than a Hobby
      1. Portfolio
      2. Web Site
      3. Tailor Your Presentation
      4. Get Honest Feedback
      5. Murphy Is Everywhere
    12. Job Boards
    13. Summary
  24. Index

Product information

  • Title: Learn Unity 3D Programming with UnityScript: Unity's JavaScript for Beginners
  • Author(s):
  • Release date: August 2014
  • Publisher(s): Apress
  • ISBN: 9781430265870