Configurations (Default, release, beta) - Grisgram/gml-raptor GitHub Wiki
A raptor
project comes with four configurations, but for most use cases, only three of them are relevant for you:
Configuration | Used for |
---|---|
Default | Your default development configuration. raptor's DEBUG MODE is active here. See Logger for more information about how you can configure the log output |
release | Debug mode is off. File encryption is on. Logger configuration also applies here |
beta | This is a child configuration of release , meaning, all macro values of release are also available here. This configuration has been created to build an executable, that is almost the same as a release, but maybe you want to change some specific macros, like a server address or some bool flags, or a little different Logger configuration (to log more than errors-only) |
unit_testing | Activating this will redirect the starting room to raptor's unit test room, where you can watch your unit tests run and you also see their result in a live view. Unit test results are also written to the log. This includes async unit tests! If you want to add your own unit tests to raptors unit testing engine, take a look in the _unit_tests_ folder of raptor, the test engine is quite self-explanatory and it should be possible for you to easily add your own tests!NOTE: As the unit test room of raptor is a "normal" raptor room, you also have a ROOMCONTROLLER and a GAMECONTROLLER object at hand, which might allow you to even "unit test" your game objects (although, by definition, they are no unit tests then, when they require external references like a ROOMCONTROLLER).The unit test room contains a layer test (lower case) for testing game objects. This layer is visible, but hidden behind a black foreground, so your test objects can draw and even collide, but you won't see them. You only see the test results. |
As mentioned above, raptor
has a global #macro DEBUG_MODE
, which changes the behavior a little, but not much.
First of all, DEBUG_MODE
is set to true
only in the default configuration, where you will do most of your development work.
In the release
and beta
configuration, this macro resolves to false
.
Important
In contrast to GameMaker's debug view, this feature also works in HTML!
- The Logger Configuration. In DEBUG_MODE, more data is written to the log than in the other configurations
- The Hotkey
F12
will open thedebug_overlay
from GameMaker and the functions contained in theDraw_Debug_Info
script, which you can find in the_GAME_SETUP_
section of the project template will be invoked when the debug overlay is shown.
This script contains three functions:
- onDebugViewStarted()
- onDebugViewClosed()
- drawDebugInfo()
The first two are invoked when you open or close the debug_overlay through the F12
hotkey and can be used to start/stop some measuring or other support-functions that prepare data for drawDebugInfo
.
The function drawDebugInfo
is invoked every frame, while the debug overlay is shown.
It's a comfortable place to put all you debug rendering in.
As default, raptor
will print the room and ui mouse positions to the screen in this function. This is kind of a demo-output, you can adapt (or remove) at will.
Just open the script and take a look. It's self-explanatory.