
A Cloud Gaming Framework for Dynamic Graphical Rendering Towards Achieving Distributed Game Engines James Bulman Peter Garraghan Lancaster University Lancaster University Abstract within a Virtual Machine (VM), whereby game state is ma- nipulated and resulting frames are encoded and streamed to a Cloud gaming in recent years has gained growing success in consumer client device based on user input [8]. This approach delivering games-as-a-service by leveraging cloud resources. is necessary primarily due to the game engine architecture: Existing cloud gaming frameworks deploy the entire game en- Monolithic systems with multiple subsystems tightly coupled gine within Virtual Machines (VMs) due to the tight-coupling with each other and the underlying operating system to facili- of game engine subsystems (graphics, physics, AI). The ef- tate aspects of graphics, physics, audio, and AI [9]. fectiveness of such an approach is heavily dependant on the cloud VM providing consistently high levels of performance, However such a design results in limitations within cloud availability, and reliability. However this assumption is diffi- gaming due to a strong dependence on performance and de- cult to guarantee due to QoS degradation within, and outside pendability of the cloud game instance and its connection to of, the cloud - from system failure, network connectivity, to client devices. In the cloud, game instances deployed within consumer datacaps - all of which may result in game service VMs are exposed to a plethora of detrimental datacenter be- outage. We present a cloud gaming framework that creates a haviors, spanning interference [10], resource contention [11], distributed game engine via loose-coupling the graphical ren- and failures [12]. Such behaviors - in isolation or in tandem derer from the game engine, allowing for its execution across - result in Quality of Service (QoS) degradation in terms of cloud VMs and client devices dynamically. Our framework lower interactivity and frames per second (FPS), lower graph- allows games to operate during performance degradation and ical quality (lower resolution, bitrate), as well as reduced cloud service failure, enabling game developers to exploit availability and reliability [13]. While various approaches heterogeneous graphical APIs unrestricted from Operating have been proposed to alleviate such issues [4, 14, 15], they System and hardware constraints. Our initial experiments all assume a stable network connection established between show that our framework improves game frame rates by up to the client device and the cloud game instance. Thus, such 33% via frame interlacing between cloud and client systems. approaches are unable to tolerate cloud outages, prolonged network disconnection, or consumer data caps, resulting in consumers unable to access games entirely. 1 Introduction One approach to overcome these limitations would be to dynamically distribute all game engine subsystems across Video games are now the largest entertainment industry in the cloud - and is the overarching research vision for our the world, growing to $143.5b revenue in 2020 [1] with the work. A distributed game engine would allow for dynamic PC distribution platform; Steam, reaching over 22 million deployment and reconfiguration of all subsystems across both concurrent players alone [2]. Cloud gaming - a paradigm cloud and client systems in response to the specified QoS re- whereby gaming is delivered as a service by leveraging cloud quirements. However this is currently not possible in existing resources [3] - has begun to gain increasing popularity in game engine architectures due to tight-coupling with their society, providing advantages over traditional desktop and underlying platforms [16]. Taking graphical rendering (a core console gaming including lower installation times, reduced game subsystem) as an example, game systems are developed hardware cost, greater device portability, and the ability to to use specific graphics APIs (OpenGL, Vulkan, etc.), and leverage cloud resources for higher graphical quality [3]. require specialized developer knowledge to take advantage A design principle shared across all existing cloud gaming of advanced hardware features (e.g. real-time ray-tracing). frameworks [3–7] is that service is provisioned by deploy- Thus it is not possible to transition to other graphics APIs and ing a game instance (an instantiation of a game program) platforms without significant development effort and time. In this paper we present a cloud gaming framework that Game Instance enables loose-coupling between the game engine and the graphical renderer, representing the first distributed game en- Update Render Handle Swap Game Game gine designed for the cloud. Our approach allows for dynamic Input Buffers run-time rendering across cloud and client systems using het- State State erogeneous graphics APIs (Vulkan, OpenGL) in response to Game Code changing performance and network conditions. Our specific contributions are as follows: Graphic API Operating System • Creation of a distributed cloud gaming framework Hardware whereby graphical rendering is performed by the game Figure 1: Depiction of standard game loop. instance via submitting generic graphics commands to the framework which automatically converts commands into specific graphics API function calls in cloud and graphics hardware. Graphics hardware (such as GPUs) fol- client systems based on QoS and hardware constraints. low a strict computation pipeline, as shown in Figure2, with Our design reduces game engine graphics development each graphics API using a different method to manipulate or complexity across heterogeneous platforms. interface graphics pipeline stages. If the graphics API can- • Empirical demonstration that our framework enhances not modify a specific stage (i.e. proprietary), the hardware game instance performance and fault-tolerance via ren- is responsible for performing the specific stage. Operating derer hot-swapping and frame interlacing. Our results System support for a given graphics API is determined by show that cooperative client and cloud-based rendering the organization that defines it, leading to reduced portability can improve game frame rates by 33% against client-side between platforms as a graphics API may only work for a or cloud-side rendering whilst using 1.1-4.0 Mbps subset of hardware vendors, and is especially true for Game Consoles APIs, DirectX [27] and Metal [29]. Thus, it takes considerable developer experience and effort to build games 2 Background to be Operating System agnostic. Specific graphics features (such as real-time raytracing) are currently only accessible on Game Engines: A term popularized in the 1990’s [17, 18], specific hardware architectures [30]. game engines are a composition of subsystems working in Cloud gaming: Cloud gaming is a paradigm whereby tandem to facilitate real-time interactive simulation for enter- cloud-resources are provisioned as a service for gaming pur- tainment purposes [19]. Game engines are used to instantiate poses, interacted by users via a thin client [31]. Cloud gaming a game instance, which provide coded gameplay logic that uti- enables game engines to be deployed and executed entirely lizes generic data-driven systems provided by the game engine within the cloud, running as a cloud game instance within to perform a game loop [19]. As shown in Figure1, the game an isolated environment such as a VM [3,5–7]. As depicted loop includes a set of distinct stages, each executed once per in Figure3, user inputs are streamed from a device to the frame, and will interact with the operating system and hard- cloud game instance, which are used to update and render the ware in different ways. Handle Input polls input events from game state. Once the frame has been rendered in the cloud, user devices, Update Game State advances virtual world state it is compressed via a video codec algorithm and streamed to the next frame and prepares for rendering loading for any to the client to be displayed on the screen. Cloud gaming required assets, Render Game State interacts with the graphics provides several key advantages over traditional gaming on hardware via the graphics API to generate an image to be dis- dedicated consumer hardware, including greater device and played on the screen, ending with Swap Buffers displaying the game instance portability [32], reduced location restrictions computed image. Modern game engines are designed as fully- and power consumption for consumer devices, and access to fledged frameworks, such as Unity [20] and Unreal Engine cutting-edge graphics features such as ray tracing [3]. 4 [21], using different architecture paradigms (event-driven, data-driven) [22, 23]. Notably, most modern game engines comprise four fundamental subsystems - physics, sound, input handling and graphics [16][24]. Tessellation Tessellation Input Vertex Primitive Tessellation Control Evaluation 1 Assembly Shader Assembly Shader Renderer: The graphical renderer is the game engine sub- Shader Shader system responsible for performing graphical operations to display geometry, lighting and texture information [8]. A ren- Output Fragment Rasterization Buffer Object Geometry derer exploits graphic APIs such as OpenGL [25], Vulkan Merger Shader Stage Streaming Shader [26], DirectX [27] and WebGPU [28] to interface with the 1Which we refer to as the renderer Figure 2: Graphics Pipeline (Grey denotes limited/no developer control). Client Device Cloud VM Input Update CloudRend
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-