13

Bonus: Other Unity Tools!

Across this book, we have gone through a third-person environmental puzzle vertical slice. This is a specific genre of game with its own unique problems in development, and this does mean that a lot of Unity’s great tools weren’t mentioned, so we wanted to take a small section and write about what other offerings Unity could provide for your next project. We will cover an introductory-level understanding of the following:

  • Multiplayer
  • XR
  • Machine Learning Agents
  • Bolt visual scripting

Unity Gaming Services

We’ve explored a group of tools named Unity Gaming Services, or UGS. These tools are designed to provide solutions that would take a significant amount of time to develop and can be integrated into your project in much less time. These tools can help directly with setting up multiplayer, XR (which is a mixture of virtual reality and augmented reality), visual scripting (known as Bolt), and finally a group of creative workflow tools. Let’s first look into the multiplayer tools available.

Multiplayer tools

Unity provides a surplus of services, ranging from pivotal tools and education to successfully implementing that multiplayer factor into your project. Breaking down the category of multiplayer, Unity divides the focus into three pillars: Creation, Connection, and Communication.

Creation

Unity considers this the foundation of your game and introduces the options of Netcode for GameObjects and Netcode for Entities. Netcode for GameObjects is a new networking library built for the Unity game engine that contains libraries, tutorials, and samples that are customizable and extensible to meet the needs of your next multiplayer project.

Netcode for Entities takes advantage of Unity’s new Data-Oriented Technology Stack (DOTS). This new, high-performance, multithreaded DOTS allows you to take full advantage of multicore processors to create richer user experiences and iterate faster with C# code that’s easier to read and reuse across other projects. DOTS provides an intuitive sandbox for programmers to create safe, multithreaded code for an array of multiplayer development advantages.

Focusing on streamable data, DOTS allows for the flexibility of reusing code, helps others to understand it, and improves collaboration. Having these various capabilities, DOTS transforms pre-existing workflows into the conversion workflow. This workflow converts your GameObjects to entities with a single click. At runtime, the Entity Preview Inspector visualizes how DOTS transforms your GameObjects into entities. In tandem, using the Unity Live Link feature will allow you to iterate instantly in Play Mode without creating a new build every time. Harnessing a faster iteration without having to create a new build every time allows you and your team to test game experiences on target devices in real time.

Unity has created DOTS packages for use with their stack of usable assets. They highly recommend that you use preview packages for testing and pre-production phases of your projects at this time as they verify packages to become production-ready.

Connection

User experiences in multiplayer gameplay are often associated with matchmaking, pre-and post-game lobbies, and queue times. Unity has developed services to complement these cooperative engagements through Lobby, Relay, Multiplay, and Matchmaker.

Unity Lobby grants players the ability to connect before or during a game session. Public lobbies can be created by the players using simple game attributes. These lobbies can be searched, discovered, and joined by other players. Private lobbies can allow players to create exclusive spaces for invite-only guests.

Relay is a service-to-service tool offered by Unity that pairs well with Lobby. When a player disconnects from a game, Relay will automatically remove the disconnected players and will notify you of the unexpected disconnects. In addition, you can access a reliable foundation for your cooperative game with Netcode for GameObjects.

Multiplay offers a resilient, multi-cloud hybrid game server through Unity. This service allows you to access server hosting and matching without having to build and maintain your own backend infrastructure. Focused on delivering smoother player experiences, Unity has invested in the creation of over 190 data centers that are designed for resilience and performance at scale. These servers operate across the globe, upholding a standard of Quality of Service (QoS). The QoS locates the optimum region for match connectivity, giving your players the most stable connection wherever they’re playing from, thereby maximizing player engagement, reducing downtime, and delivering new content to your players regardless of platform.

Matchmaker is created through an open source collaboration with Google called Open Match. Matchmaker is also part of Unity’s dedicated game server hosting solution, Multiplay, offering out-of-the-box integration for Unity’s Enterprise customers that can scale to various player base capacities. Matchmaker contains developer-configured match logic, a customizable evaluator, and a matchmaking loop with scheduled match function execution as its hosting solutions to match your players in the right place, at the right time.

Communication

Player engagement and retention happens when experiences are healthy, immersive, and have a solid quality of interaction with each other. Unity offers player engagement tools to support positive social experiences through Vivox and Community and Safety.

Vivox is an easy-to-implement and dependable feature that supports a feature-rich voice and text chat service for your game. Trusted by industry-leading titles such as Valorant, League of Legends, Rainbow Six Siege, and PUBG, Vivox delivers the best comms service to their players. Operational with any platform, around the globe, and on any game engine, Vivox can be integrated in less than two days and scaled to millions of players.

Coming soon is Unity’s latest addition to its communication arsenal, Community and Safety. Unity’s focus with this platform is player safety analysis and game management.

XR plugin

XR is an umbrella term that encompasses the following applications: Virtual Reality (VR) and Augmented Reality (AR). VR creates a unique environment completely around its user. AR overlays digital content over the real world through the lenses of technical devices. XR applies a combination of both environments of the user’s real world and the digital world to interact with one another.

Unity has developed a new plugin framework called XR SDK. This framework enables XR providers to successfully integrate with the Unity engine and all its features for optimization of each application mentioned previously.

Unity supports these platforms for XR:

  • ARKit
  • ARCore
  • Microsoft HoloLens
  • Windows Mixed Reality
  • Magic Leap
  • Oculus
  • OpenXR
  • PlayStation VR

Unity does not currently support XR on WebGL.

This plugin-based approach allows Unity to adapt with quick bug fixes, distribute SDK updates from platform partners, and support new XR devices without having to modify the core engine.

Machine Learning Agents

Unity understands that the advancement of Artificial Intelligence (AI) research depends on resolving tough problems in existing environments using current benchmarks for training AI models. When a game becomes complex, developers will need to create intelligent behaviors, which may lead to writing tons of code with highly specialized tools.

Unity has created a Machine Learning Agents (ML-Agents) toolkit that means that you no longer need to “code” emergent behaviors, but instead teach intelligent agents to “learn” through a combination of deep reinforcement and imitation learning.

Therefore, this allows developers to create AI environments that are more physically, visually, and cognitively rich, along with more compelling gameplay and enhanced game experiences.

Bolt visual scripting

Develop gameplay mechanics with interaction logic visually. Bolt allows you to create visual, graph-based systems, instead of writing out traditional lines of code. Through visual scripting, Bolt promotes seamless collaboration between teams of designers, artists, and programmers for faster prototyping and iteration.

More technical team members can empower non-programmers with custom nodes to encourage productivity regardless of the level of programming knowledge. Bolt offers Flow Graphs, State Graphs, Live Editing, Debugging and Analysis, Codebase Compatibility, and Ease of Use, which we will describe below.

Flow Graphs

Flow Graphs will be the main tool for interaction in your projects. Using node-based actions and values, these graphs will let you dictate logic in any order you specify.

State Graphs

State Graphs allow you to create self-contained behaviors that command objects what actions to execute when they achieve a particular state. State Graphs are compatible with high-level logic such as AI behaviors, scene or level structure, or any behaviors to transition between states.

Live Editing

Live Editing can be done in real time to graphs in Play Mode. Quickly iterate and test ideas without needing to recompile project changes.

Debugging and Analysis

Debugging and Analysis can be found during Play Mode across the visual scripted graph. Bolt will highlight which nodes are being executed and then, if an error is to occur, the node will be easily identifiable.

Codebase Compatibility

Codebase Compatibility allows for any third-party plugin or custom scripts to be used within your graphs. Visual scripting accesses your code base directly via reflection and is always up to date, irrespective of whether it is a method, field, property, or event from Unity.

Ease of Use

Ease of Use visual scripting is designed to be accessible by less technical creators through user-friendly features, commenting, and searchable capabilities.

Summary

This chapter’s purpose was to show some of the capabilities that Unity can offer you on your next game design ventures. They weren’t used in our project, which is why we left them to a bonus chapter. The multiplayer tools are an incredible source to have for making multiplayer games. By bringing together the plugins from AR and VR into an XR plugin, we now have a nice, centralized plugin for all of the altered realities regardless of the hardware you are using. Then, to conclude this book, we talked about Bolt’s visual scripting. If programming isn’t easy for you to work with, consider checking that out.

We hope you learned some things from this book and had a good time while doing so. We mentioned at the beginning and throughout the book that the community on Discord is a good place to be if you want to engage with others who have purchased this book or other Packt-published, Unity-centric books. We would love to see you there and help with your next great idea.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.118.95