Table of Contents

GameExtensions.cs

Done

GameExtensions.cs provides a suite of extension methods for the Game class in the Stride game engine, enhancing its capabilities and offering convenient functionalities to game developers. These methods streamline common tasks in game development, ranging from performance monitoring to material creation and entity manipulation.

Here's a brief overview of the functionalities provided by these extension methods:

  • AddAllDirectionLighting() - Adds directional lighting from multiple angles to the current scene
  • AddProfiler() - Adds a profiler to the game, which can be toggled on/off with Left Shift + Left Ctrl + P
  • CreateMaterial() - Creates a basic material with optional color, specular reflection, and micro-surface smoothness values
  • Create2DPrimitive() - Creates a primitive 2D model entity of the specified type with optional customizations
  • Create3DPrimitive() - Creates a primitive 3D model entity of the specified type with optional customizations
  • DeltaTime() - Gets the time elapsed since the last game update in seconds as a single-precision floating-point number
  • DeltaTimeAccurate() - Gets the time elapsed since the last game update in seconds as a double-precision floating-point
  • FPS() - Retrieves the current frames per second (FPS) rate of the running game
  • SetFocusLostFPS() - Sets the maximum frames per second (FPS) rate for the game when not in focus
  • SetMaxFPS() - Sets the maximum frames per second (FPS) rate for the game

ToDo

  • AddEntityNames() - Debug. To see entity properties in the game
  • AddPhysicsDebugger() - Debug. To see colliders. Tracked here Issue #9