The Cube Sample

Our Cube Sample is based on an official D3D11 sample from Microsoft. We integrated the Genvid SDK with the sample so you can experience the features available with our SDK.

We created versions of the Cube Sample using 3 different engines: DirectX, Unity, and UE4. We then describe how to integrate the Genvid SDK on each platform.

We also provide two web spectating samples: a simple example that allows you to spectate in an embedded website using our standalone video streaming player (for testing purpose only), Youtube or Twitch, and another one shows a Twitch Extensions integration.

Warning

In order to be able to run the cube sample, you need to at least use one of the engine sample in addition to the simple web sample.

Overview

The Cube Sample displays 3 cubes named Athos, Porthos, and Aramis. The cubes rotate and move in different fixed directions. When a cube reaches an edge, it moves to the opposite side of the world to continue its movement without interruption. The player controls one cube at a time using these controls:

  • The arrow and W A S D keys change the trajectory of the selected cube.
    Modifying the direction also affects the rotation of the object.
  • The 1, 2, and 3 keys select different cubes.
  • The numeric keypad keys change the selected cube’s color.
  • The 0 key resets the orientation of the selected cube.
  • The P key resets the position of the selected cube.
  • The Backspace key stops the cube from moving.