JeremyStarTM
99703cf03e
Reviewed-on: StarOpenSource/core#1 Rewrote CORE and improved the startup process and startup time significantly. The documentation has been beefed up too and is now much better. Existing projects may need major refactoring however. Co-authored-by: JeremyStarTM <jeremystartm@staropensource.de> Co-committed-by: JeremyStarTM <jeremystartm@staropensource.de>
4.2 KiB
4.2 KiB
hide | |
---|---|
|
Configuration File (/root/CORE/Config)
The CORE configuration file is located at res://CORE/config.gd
and is used for configuring CORE behaviour. A full example configuration can be found here.
Placeholders
[LOADPATH]
- type
String
- description
Will be replaced by CORE's loadpath
- example
res://CORE/
- can be used in
splash_image
CORE
core_initscript
- type
String
- description
The path to your init script
- default value
"res://init.gd"
Preprocessor
preprocessor_enabled
- type
bool
- description
Enables the preprocessor if true
- default value
true
preprocessor_diagnostic
- type
bool
- description
Makes the preprocessor super-verbose
- default value
false
- note
Please leave this option disabled as your log will get massively bloated by the preprocessor.
Logger
logger_enabled
- type
bool
- description
Enables CORE's logger implementation if true
- default value
true
logger_diagnostic
- type
bool
- description `Displays diagnostic messages including messages by CORE if enabled.
- default value
false
CORELog
corelog_enabled
- type
bool
- description
If CORELog should be displayed or not
- default value
true
Debug Display
debugdisplay_enabled
- type
bool
- description
If the debug display should be enabled or not
- default value
false
debugdisplay_fps
- type
bool
- description
Displays the framerate counter if true
- default value
true
debugdisplay_delta
- type
bool
- description
Renders the delta value if true
- default value
true
debugdisplay_rendertime
- type
bool
- description
Displays the rendertime if true
- default value
true
debugdisplay_memory
- type
bool
- description
Displays information about the memory usage if true
- default value
true
Resource Manager
resourcemanager_load_invalid_file_as_null
- type
bool
- description
Affects the Resource Manager's loadres() function if it encounters a invalid filepath. If true, loadres() will "save" the resource as null, but will do nothing if false.
- default value
false
Splash Screen
splash_enabled
- type
bool
- description
Enables or disables the splash screen at startup
- default value
false
- note
You can still call display() and dissolve() manually, this option just affects the startup process.
splash_image
- type
String
- description
The path to your splash image (square-sized)
- default value
[LOADPATH]soscore.png
splash_image_size
- type
int
- description
The width and height of your square-sized image
- default value
256
splash_color
- type
String
- description
The splash screen's background color in hex (without the "#" at the beginning!)
Example configuration
This is the full example configuration that you can find as config.gd.example
##############################
# THE CORE FRAMEWORK #
# EXAMPLE CONFIGURATION FILE #
# #
# THIS DOCUMENT IS PUBLICLY #
# AVAILABLE UNDER THE PUBLIC #
# DOMAIN AND IS NOT LICENSED #
##############################
extends Node
# Hello there, fellow developer!
# This is a example configuration file
# for the CORE Framework (source 0).
#
# Most settings in this config should be
# self explanitory. If not, visit the documentation:
# https://core.staropensource.de/references/Configuration_File/
#
# Thank you for using the CORE Framework!
# - The StarOpenSource Project & Contributers
var core_initscript: String ? "res://init.gd"
var preprocessor_enabled: bool = true
var preprocessor_diagnostic: bool = false
var logger_enabled: bool = true
var logger_diagnostic: bool = false
var corelog_enabled: bool = true
var debugdisplay_enabled: bool = false
var debugdisplay_fps: bool = true
var debugdisplay_delta: bool = true
var debugdisplay_rendertime: bool = true
var debugdisplay_memory: bool = true
var resourcemanager_load_invalid_file_as_null: bool = false
var splash_enabled: bool = false
var splash_image: String = "res://CORE/soscore.png"
var splash_image_size: int = 256
var splash_color: String = "000000"
# EOF <- Yes, this is the end of the example configuration! Pretty short, isn't it?