This page has essential information for getting started with Rayve. Please also read the overviews on each section of the reference for more key details on using the engine.
Rayve was created in Visual Studio 2022 and works best with this IDE. Visual Studio is not required but Raylogic does not provide guidance on alternative workflows.
The Rayve C API is basic ANSI C function calls. Include the 'rayve.h' header and link to 'RayveCheck.lib' or 'Rayve.lib'. 'RayveCheck.lib' has validation enabled. 'Rayve.lib' does not have validation for better performance. Both libs are built in optimized release mode.
Rayve tool is part of the Rayve distribution and provides several functions:
To install RVTool in Visual Studio, go to the 'Tools' menu, select 'External Tools' then:
Rayve tool can create source templates, which are .cpp/.hpp source files that contain the initial code for creating a game object. After creating the files, use the "Add existing" project menu option within VS to add the files to the project. This source template feature is only for C++.
A C++ wrapper is included that is a thin wrapper around the C API. To use the C++ wrapper, include 'rayve.hpp' instead of 'rayve.h'. The C++ wrapper classes and methods closely follow the C API.
Entity lists are the core of scenes and are very CPU cache friendly. The entity lists stay cache friendly through heavy entity adds and deletes. Entity lists also support hierarchal entities without harming data orientedness. Adding and deleting entities is O(1).
All 3D coordinates are in meters.
A right-handed coordinate system is used. Positive X axis goes right, positive Y axis goes up, positive Z axis goes toward the viewer. Transforms are peformed from left to right. Right-handed matrices in Rayve are stored in row-major order instead of normal column-major order.
Angles are expressed as normalized values. A full circle goes from 0 to 1. An angle of .5 is 180 degrees. An angle of .25 is 90 degrees etc.
Instead of distinquishing between vectors and points, a generic 'scalar' struct is used.
Index-type values are zero based.
Rayve's display window can toggle between full screen and windowed modes at any time. Full screen mode uses the Windows OS dedicated buffered display mode for best game performance. This mode locks the screen, so caution is need when debugging because if code stops while in full screen mode, access to the desktop is likely blocked and the computer will have to be manually restarted.
Window management controls are available when Rayve's display window is in windowed mode:
The C API validates parameters. An assert is triggered when an invalid value is encountered. The validations are decently extensive, but not every error will be caught.
Default behavior for engine exceptions is to close down the engine, then show an error message dialog with the error before exiting. When using the Rayve debug DLL, the debugger should break at the location in user code where the exception occured.
A error handler callback is provided to allow the host program to handle errors as needed.