CORE/docs/install.md
JeremyStarTM 83ea84b9ab Documentation/website release and more
This commit added:
- A website and documentation (two in one) containing a install guide and code references
- Character counting script (count_characters.sh)
- Godot development project support (making a temporary godot project)
- Makefile
2023-07-09 00:16:15 +02:00

3.4 KiB

hide
navigation

Installing CORE

Step 1: Downloading the CORE Manager

Before we install CORE, we first have to download the CORE Manager. It is responsible for installing CORE and downloading updates.

Windows: CORE-Manager.exe

Linux: CORE-Manager.elf

macOS: Use wine to run CORE-Manager.exe

Step 2: Using the CORE Manager

Launch CORE-Manager.exe or CORE-Manager.elf and type in the path to your Godot project (replace backslashes with regular slashes on Windows). Click on Install and wait until it's finished.

Note: If you are updating CORE, click on Update instead.

Step 3: Configuring your project

Launch your project in the Godot Editor and go to your project settings. You now need to set your startup scene to res://CORE/coreinit.tscn.

Step 4: Configuring CORE

Edit the res://CORE/config.gd file and set the core_startscript variable to a GDScript file. That GDScript file will act as your init script and can be used to load your game. You can find the config.gd reference here.

Step 5: Write your init script

Create a new GDScript file and write this into it:

extends Node

@onready
var core = get_node("/root/core") #(1)!

func _ready() -> void:
	core.welcome() #(2)!
	Logger.enable_diag = true #(3)!
	Logger.diag("<your_script_name>","This is a diagnostic message. I can only be seen with Logger.enable_diag being true.")
	Logger.info("<your_script_name>","This is a informational message.")
	Logger.warn("<your_script_name>","This is a warning message.")
	Logger.error("<your_script_name>","This is a error message.")
	await get_tree().create_timer(0.1).timeout #(4)!
	get_tree().quit(0)
  1. Imports the CORE Holder aka. /root/core
  2. Makes CORE say hello :)
  3. Enables diagnostic log output
  4. Waits 100 milliseconds for the log messages to be printed before exiting

Now replace <your_script_name> with the filename of your script (without .gd) and save it under the path you specified in the core_startscript variable.

Step 6: Start your project

Start your project and wait until CORE initialized itself. You should see this output in your Godot console (replace <your_script_name> in your head with the filename of the init script without .gd):

logger -> Initializing Logger
preprocessor -> Initializing Preprocessor
preprocessor -> Delaying initialization by 0.75s
coreinit -> Checking CORE requirements
coreinit -> Constructing coreloader
coreinit -> Injecting coreloader
coreinit -> Switching to COREBackground
(core) [INFO] CORE git-develop welcomes you!
              It seems like everything is working :)
(<your_script_name>) [DIAG] This is a diagnostic message. I can only be seen with Logger.enable_diag being true.
(<your_script_name>) [INFO] This is a informational message.
(<your_script_name>) [WARN] This is a warning message.
(<your_script_name>) [ERROR] This is a error message.
(coreloader) [DIAG] Removing coreloader

If your project returns about the same output (a few lines omitted) then CORE has been successfully installed. If not, look for your error here. If you need a example init.gd script, look here.