Mastering Unity 2D game development master everything you need to build a 2D game using Unity 5 by developing a complete RPG game framework!

Master everything you need to build a 2D game using Unity 5 by developing a complete RPG game framework! About This Book Explore the new features of Unity 5 and recognize obsolete code and elements. Develop and build a complete 2D retro RPG with a conversation system, inventory, random map battles,...

Descripción completa

Detalles Bibliográficos
Otros Autores: Godbold, Ashley, author (author), Jackson, Simon, author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing 2016.
Edición:Second edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630097606719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Credits
  • About the Authors
  • About the Reviewer
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 1: Overview
  • Getting assets
  • Unity's 2D features
  • 2D mode versus 3D mode
  • Working with sprites
  • Sprite Renderer
  • Sprite Editor
  • Sprite sheets
  • Texture atlases
  • Physics 2D
  • Changes to Unity 5
  • Licensing
  • Component access
  • Animator changes
  • Audio mixing
  • Summary
  • Chapter 2: Building Your Project and Character
  • Project overview and structure
  • Project overview
  • Structure
  • Asset naming
  • Creating the project
  • Creating a scene
  • Sprite system
  • Importing sprites
  • Texture Type - Sprite (2D and UI)
  • Sprite Mode - Single/Multiple/Polygon
  • Packing Tag
  • Pixels Per Units
  • Pivot
  • Generate Mip Maps
  • Filter Mode
  • Default settings and per-platform overrides
  • Sprite Editor
  • Sprite slicer
  • Automatic
  • Grid By Cell Size and Grid By Cell Count (Manual)
  • View controls
  • Sprite region manipulation
  • Importing our main character
  • GameObjects and components
  • Sprite GameObjects
  • Bringing our hero into the scene
  • Classes
  • MonoDevelop
  • The object-orientated design
  • The game structure
  • The common game object
  • The player object
  • Planning behaviors
  • Behaviors for the common game object
  • Coding with components
  • Accessing components
  • Referencing a component
  • Controlling the hero
  • Going further
  • Summary
  • Chapter 3: Getting Animated
  • Fundamentals of sprite animation
  • Animation clips
  • Animation Dope Sheet
  • The time/recording controls (1)
  • Animation drop-down selection (2)
  • The sample rate (frames per second) (3)
  • Animation properties (4)
  • Timeline (5)
  • Curve view (6)
  • The Animation Controllers
  • The Animator component
  • Animating the main character
  • Adding your first Animation Clip.
  • Setting up the Animator and default state
  • Adding the other Animation Clips
  • Planning the animation transitions
  • Connecting the animation states
  • Accessing controllers from a script
  • Making her stop animating and face the correct direction
  • Going further
  • Summary
  • Chapter 4: The Town View
  • Backgrounds and layers
  • To slice or not to slice
  • The town background
  • The town buildings and roads
  • The extra scenery
  • Building the scene
  • Adding the town background
  • Sprite sorting layers
  • Sprite Sorting Order
  • Updating the scene sorting layers
  • Building out the scene
  • Working with the camera
  • Comparing Update, FixedUpdate, and LateUpdate
  • Moving our camera with the player
  • The perils of resolution
  • Setting our aspect ratio and camera parameters
  • Transitioning and bounds
  • Towns with borders
  • Journeying onward
  • Going further
  • Summary
  • Chapter 5: Working with Unitys UI System
  • UI Canvas
  • EventSystem
  • Canvas Render Mode
  • Screen Space - Overlay
  • Screen Space - Camera
  • World Space
  • Using multiple Canvases
  • UI Text and Images
  • UI Text
  • UI Image
  • UI Layout and Rect Transform
  • Rect Tool
  • Pivot
  • Anchors
  • UI Buttons
  • Transition types
  • Text child
  • On Click ()
  • Going further
  • Summary
  • Chapter 6: NPCs and Interactions
  • Considering an RPG
  • Advanced programming techniques
  • Singletons and managers
  • The manager approach - using empty GameObjects
  • The singleton approach - using the C# singleton pattern
  • Communicating between GameObjects
  • Delegates
  • The configurable method pattern
  • The delegation pattern
  • Compound delegates
  • Events
  • Messaging
  • A better way
  • Background tasks and coroutines
  • Enter coroutines
  • IEnumerator
  • Yielding
  • Starting coroutines
  • Closing the gap
  • Serialization and scripting
  • Saving and managing asset data.
  • Using the serialized files in the editor
  • Accessing the .asset files in the code
  • Adding NPCs and a conversation system to our game
  • Let the player walk around the NPC
  • Stopping the player from walking through the NPC
  • Getting the NPCs talking
  • The conversation object
  • Saving and serializing the object for later
  • The conversation component
  • Building a basic conversation system
  • The manager
  • Starting a conversation
  • Preparing the UI
  • Displaying the conversation
  • Connecting the dots
  • Going further
  • Summary
  • Chapter 7: The World Map
  • The larger view
  • Types of map
  • Fixed maps
  • Generated maps
  • In-game generated maps
  • Going procedural
  • Creating our game's map
  • Adding the world map
  • Adding a player prefab to the overworld
  • Adding places of interest
  • Leaving town
  • Creating a NavigationManager script
  • Blocking off paths
  • Updating build settings to include new scenes
  • Changing scenes
  • Returning to town
  • Updating the NavigationManager script
  • Going further
  • Summary
  • Chapter 8: Encountering Enemies and Running Away
  • Event systems
  • Exploring randomness
  • True randomness
  • Planning for random code/generation
  • Basic Artificial Intelligence
  • State machines
  • Defining states
  • Simple singular choice
  • Planning for multiple cases
  • State managers
  • Sensors
  • Setting up your battle scene
  • Building the new scene
  • Adding the first enemy
  • Spawning the Dragons
  • Creating the BattleManager
  • Allowing the player to run away
  • Starting the battle
  • Saving the map position
  • Stop immediately re-entering battle
  • Going back to town
  • Going further
  • Summary
  • Chapter 9: Getting Ready to Fight
  • Setting up our battle state manager
  • The battle state manager
  • Getting to the state manager in the code
  • Starting the battle
  • Introductory animation.
  • Efficient RPG UI overlays
  • The adventurer's overlay
  • A context-sensitive overlay
  • Modern floating UI approach
  • Balancing the need
  • Bring on the GUI
  • Laying out the HUD
  • Displaying the correct buttons
  • Going further
  • Summary
  • Chapter 10: The Battle Begins
  • Designing an interesting battle system
  • Leveling up
  • Balancing
  • Preparing to attack a single enemy
  • Beefing up the enemy AI
  • The enemy profile/controller
  • Updating the Dragon prefab
  • Setting up the enemy profile in the code
  • Selecting an attack
  • Adding a visual effect to attack selection
  • Selecting a target
  • The selection circle prefab
  • Adding selection logic to the EnemyController class
  • Attack! Attack!
  • Using particle effects to represent an attack
  • Creating the materials for the particle effects
  • Adding the particles
  • Displaying the particles upon attack
  • Finishing up the battle
  • Going further
  • Summary
  • Chapter 11: Shopping for Items
  • Why do we shop?
  • The power of an item
  • Building your shop
  • Laying out your inventory
  • Rule of 99'
  • Encumbrance systems
  • Slot-based systems
  • A mini game
  • Real world
  • Creating a shop and inventory
  • Gathering shop assets
  • Building the shop scene
  • Creating inventory items
  • Managing the shop
  • Updating the player inventory definition
  • Stocking the shop
  • Linking up the buttons
  • Turning off the Buy Button
  • Entering the shop
  • Leaving the shop
  • Managing your inventory
  • Adding objects to the player's inventory
  • Going further
  • Summary
  • Chapter 12: Sound and Music
  • Choosing the appropriate sound and music
  • Where to get sound and music for your game
  • Free resources
  • Audio listeners and audio sources
  • Adding background music
  • Creating a splash screen
  • Adding the audio source
  • Transitioning to the next scene.
  • Keeping the music after the scene transition
  • Adding sound effects
  • Adding a sound to the buy button
  • Muting/unmuting audio
  • Going further
  • Summary
  • Chapter 13: Putting a Bow on It
  • Building in-game menu structures
  • The screens
  • Splash screens
  • Loading screens
  • The main menu
  • Save slots/level selections
  • Settings pages
  • The About screen
  • Privacy policy
  • Pause screens
  • Additional menus (purchasing, achievements, leaderboards, and so on)
  • Social
  • The flow
  • Finishing our splash screen
  • Building our start screen
  • Extending the editor
  • The property drawers
  • Examples property drawers
  • Built-in property drawers
  • Custom property drawers
  • Custom editors
  • The editor window
  • Gizmos
  • Building your editor menus
  • Adding a MenuItem attribute
  • Enabling/disabling a MenuItem attribute
  • Adding shortcut keys to a MenuItem attribute
  • Adding contextual MenuItems
  • Running scripts in the Editor folder
  • Alternative approaches
  • The [InitialiseOnLoad] attribute
  • Editor application callbacks
  • Mixing it up
  • Working with settings
  • Using PlayerPrefs
  • Serializing your data
  • Saving data to disk
  • Backing up to the Web
  • Going further
  • Summary
  • Chapter 14: Deployment and Beyond
  • Handling platform differences
  • Preprocessor directives
  • Pushing code from Unity
  • Processing assets
  • Processing the build
  • Building your assets
  • Packaging gotchas
  • Distributing to mobile
  • Social network integration
  • Monetization
  • Paid
  • Paid with trial
  • Ad supported
  • In-app purchases
  • In-game currency
  • Going further
  • Summary
  • Index.