VR-Engage  2.2
Loading...
Searching...
No Matches
Code Examples

Overview

The VR-Engage toolkit includes a set of example projects that demonstrate how to extend the platform. These examples are working code projects you can build, modify, and use as templates for your own development.

VR-Engage supports two primary extension types: Frontend plugins that extend the player station UI and controls, and Simulation plugins that add backend entity behaviors and physics. Some scenarios may also use pure VR-Vantage plugins for graphics-only extensions or pure VR-Forces plugins for simulation-only functionality. The examples demonstrate patterns for each extension type, including how plugins communicate and share code through message libraries.

For details on plugin architecture, entry points, and lifecycle: See Plugin Architecture

Getting Started

Environment Setup & Build Guide

This guide covers:

  • Required toolkits and environment configuration
  • Building the examples solution
  • Understanding the CMake build system
  • Installing and testing plugins

Example Descriptions

Example Description
CIGI Host Extension Extends the CIGI visual system protocol to communicate custom data with external image generators.
Custom PDU Creates a custom DIS PDU for network communication, demonstrating auto-generated message code from Lua schemas.
Custom Projectile Implements custom ballistics and projectile physics, extending the VR-Forces munition system.
Entity Detection Adds a radar sensor system that detects entities in the simulation and displays threat warnings on a HUD overlay.
Human Art Part Actuator Controls articulated part motion on human entities, demonstrating actuator patterns for hardware integration.
Input Device Integrates custom input hardware (gamepad, joystick) with configurable input mapping.
Notification Demonstrates plugin component lifecycle, initialization order, and basic messaging patterns.
Player State Attribute Monitors player attributes using callbacks and polling, showing event-driven state observation.
QML HUD Creates a Qt Quick overlay HUD with real-time data binding to player attributes.
State Extends the player state machine with custom states and Qt/QML UI components.
Vehicle Blinker Implements a vehicle lighting system with coordinated frontend visuals and simulation-side state.

Feature Matrix

Use this matrix to find examples that cover specific technologies.

Example Frontend Plugin Sim Plugin Network/Protocol QML/UI VR-Forces
cigiHostExtension
customPdu
customProjectile
entityDetection
humanArtPartActuator
inputDevice
notification
playerStateAttribute
qmlHud
state
vehicleBlinker

Examples by Topic

Use these topic groupings to find examples that demonstrate specific technologies or patterns.

Plugin Fundamentals

  • notification — Component initialization, lifecycle, and messaging patterns
  • playerStateAttribute — Attribute store access, callbacks, and polling
  • state — State machine extension and Qt integration

Network and Protocols

  • customPdu — Custom DIS PDU with Lua-based message generation
  • cigiHostExtension — CIGI protocol extension for image generators

User Interface (QML)

  • qmlHud — HUD overlays with attribute data binding
  • state — Custom QML components and state-driven UI
  • entityDetection — Threat display overlays
  • inputDevice — QML gamepad configuration UI

Frontend/Simulation Coordination

VR-Forces Simulation Components

Development Requirements

Required Knowledge:

  • C++ (C++17 features)
  • CMake build system (3.16+)
  • Component-based architecture patterns
  • Plugin development concepts

Development Environment:

  • Visual Studio 2022 (MSVC v143 toolset)
  • VR-Engage toolkit installation
  • VR-Forces toolkit installation (for simulation components)
  • VR-Link toolkit installation (for network protocols)
  • Qt framework (for UI examples)

Recommended Background: Understanding of simulation protocols (DIS/HLA), familiarity with the VR-Engage player station architecture, and knowledge of VR-Forces simulation engine for backend component development.