Build Your Own Metaverse with Unity

Book description

Unlock the power of creating your own multiplayer virtual world and explore infinite possibilities by following practical examples on building, designing, and implementing various features in this part-color guide

Key Features

  • Create your own Metaverse from scratch with detailed and practical instructions
  • Use Firebase tools to create a distinctive and feature-rich virtual world
  • Compile and distribute the finished project to various platforms
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Build Your Own Metaverse with Unity is a practical guide for developers with step-by-step explanations, practical examples, and screenshots to guide them through essential concepts.

You’ll start by learning how to install Unity and create a character that can move around the virtual world. Next, you’ll learn how to integrate multiplayer functionality, user identification, and registration in your game universe. You’ll explore how to create interactive characters dealing with different attributes of the virtual world, including acquiring homes and decorating them with various features. Additionally, you’ll understand how to use Firebase tools to make your Metaverse unique. By following the expert advice, you’ll be able to create a feature rich Metaverse where players can interact with NPCs, acquire homes, and interact with other players online. Finally, you’ll discover how to compile and distribute the finished project to various platforms, while acquiring with necessary skills and knowledge to create a unique and groundbreaking Metaverse.

By the end of this book, you’ll be well-equipped to create a Metaverse with infinite possibilities.

What you will learn

  • Master Photon SDK to construct a universe with multiplayer capabilities
  • Familiarize yourself with the benefits of Firebase services when working with Unity3D
  • Store data and settings in a cloud-based database
  • Acquire the skills to create NFTs using Unity3D and C#
  • Explore dynamic object generation from cloud data and manage game character mechanics
  • Incorporate Oculus quest 2 into your Metaverse
  • Allow gamers to register or log in through Firebase authentication for safe gameplay

Who this book is for

This book is perfect for beginners as well as seasoned game developers alike. With its help, you’ll learn valuable skills in idea planning, construction, compilation, and distribution, ensuring a holistic understanding of metaverse development.

Table of contents

  1. Build Your Own Metaverse with Unity
  2. Contributors
  3. About the author
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Conventions used
    6. Get in touch
    7. Share Your Thoughts
    8. Download a free PDF copy of this book
  6. Part 1: Getting Started
  7. Chapter 1: Getting Started with Unity and Firebase
    1. Technical requirements
    2. Installing Unity Hub
      1. Installing the Unity editor
      2. Creating and managing Unity projects
      3. Basics of using the Unity editor
      4. Creating a new scene
    3. Organizing your project assets
    4. Choosing an input handler
    5. Understanding the different Firebase services
      1. What is Firebase for?
      2. Configuring a new Firebase project
      3. Installing the Firebase SDK
    6. Summary
  8. Chapter 2: Preparing Our Player
    1. Technical requirements
    2. Creating a third-person controller
      1. Testing our player
    3. Working with colliders
    4. Changing the default avatar
    5. Adding Mobile Support
    6. Summary
  9. Chapter 3: Preparing Our Home Sweet Home: Part 1
    1. Technical requirements
    2. Understanding the Hub concept
    3. Designing the scene
      1. Customizing the floor
      2. Downloading the buildings
      3. Assembling the buildings
      4. Customizing sidewalks
      5. Customizing the sky
      6. The village fountain
      7. Expanding the horizon
      8. A greener town
      9. Order and cleanliness
    4. Summary
  10. Chapter 4: Preparing Our Home Sweet Home: Part 2
    1. Technical requirements
    2. Case study on the need for optimization
    3. Understanding optimizations
      1. Static/dynamic GameObjects
      2. Camera occlusion (culling)
      3. Light baking
      4. Colliders
    4. Adding the first world to the Firebase database
    5. Summary
  11. Chapter 5: Preparing a New World for Travel
    1. Technical requirements
    2. Designing the Scene
      1. Creating the scene
      2. Creating the floor
      3. Creating houses
      4. Applying order
      5. Limiting the Scene
      6. Adding sidewalks
      7. Adding trees
      8. Customizing the sky
    3. Adding the world to the Firebase database
    4. Adding objects dynamically
      1. Identifying ourselves in the system
    5. Optimizing a dynamic Scene
    6. Summary
  12. Part 2: And Now, Make It Metaverse!
  13. Chapter 6: Adding a Registration and Login Form for Our Users
    1. Technical requirements
    2. Creating a sign-up screen
      1. Understanding Vertical Layout Group
    3. Creating a sign-in screen
    4. Placing the player
    5. Summary
  14. Chapter 7: Building an NPC That Allows Us to Travel
    1. Technical requirements
    2. Choosing an aspect
    3. Bringing the NPC to life
    4. Triggering when we are close
    5. Showing the available worlds in a window
      1. Mobile support
    6. Traveling to the selected world
      1. Canvas
      2. NPC
      3. PlayerInstance
    7. Summary
  15. Chapter 8: Acquiring a House
    1. Technical requirements
    2. The concept of home
    3. Enabling a user to obtain a home
      1. Adding a trigger to the Prefab of the house
      2. Programming script to acquire a house
      3. Linking a house to a player
    4. Understanding what an NFT is
      1. Converting a house to an NFT
      2. IPFS
      3. Goerli
      4. ChainSafe
      5. MetaMask
      6. Mining cryptocurrencies
      7. Programming the generation of the NFT
    5. Summary
  16. Chapter 9: Turning Our World into a Multiplayer Room
    1. Technical requirements
    2. Getting started with Photon SDK
      1. Pricing
      2. Signing up for Photon SDK
      3. Creating a new application
      4. Installing Photon SDK
      5. Photon life cycle
      6. Regions
      7. Rooms
      8. Lobby
    3. Synchronizing movements and animations in the network
      1. Preparing the player Prefab
      2. Disabling other players’ scripts
      3. Creating the network logic script
      4. Adapting login for multiplayer support
      5. Adapting world navigation for multiplayer support
      6. Testing the changes
    4. Testing synchronization with another user
      1. Introducing ParrelSync
      2. Installing ParrelSync
    5. Summary
  17. Chapter 10: Adding Text and a Voice Chat to the Room
    1. Technical requirements
    2. Getting started with Photon Chat
      1. Introduction to the Photon Chat SDK
      2. Creating a Photon Chat project
      3. Configuring the project connection in Unity
    3. Creating a chat window
      1. Copying the essentials
    4. Getting started with Photon Voice
      1. Introduction to the Photon Voice SDK
      2. Creating a Photon Voice project
      3. Installing the Photon Voice SDK
      4. Configuring the project connection in Unity
    5. Transmitting your voice to the network
    6. Summary
  18. Part 3: Adding Fun Features Before Compiling
  19. Chapter 11: Creating an NPC That Allows Us to Change Our Appearance
    1. Technical requirements
    2. Choosing an aspect
    3. Bringing the NPC to life
    4. Triggering the NPC when we are close
    5. Showing the available avatars in a window
    6. Persisting the new appearance
    7. Summary
  20. Chapter 12: Streaming Video Like a Cinema
    1. Technical requirements
    2. Introducing the VideoPlayer class
    3. Designing our screen
    4. Playing videos
      1. Online reproduction
      2. Local reproduction
    5. Summary
  21. Chapter 13: Adding Compatibility for the Meta Quest 2
    1. Technical requirements
    2. Understanding what Meta Quest is
      1. Technical requirements for the VR goggles
      2. Cost of the Meta Quest 2 goggles
    3. Getting started with the Meta Quest SDK
      1. Preparation of the glasses
      2. Developer Mode
      3. Configuring our project
      4. Adding VR compatibility to our project
      5. Testing in Meta Quest 2
      6. Preparing the other scenes
    4. Summary
  22. Chapter 14: Distributing
    1. Technical requirements
    2. Optimizing textures
    3. Compiling for different platforms
      1. Windows, Mac, and Linux
      2. Android
      3. iOS
    4. Summary
    5. Next steps
  23. Index
    1. Why subscribe?
  24. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Build Your Own Metaverse with Unity
  • Author(s): David Cantón Nadales
  • Release date: September 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781837631735