Compare commits

...

10 commits

Author SHA1 Message Date
9372a5be1c
Update docusaurus 2024-07-24 01:59:36 +02:00
ddbe0d605c
Remove invisible characters
Didn't notice them while copy and pasting. Thank you Forgejo.
2024-05-22 00:55:05 +02:00
5582fef70a
Bump version 2024-05-18 19:28:40 +02:00
94a677286c
Make register_custom_module() less verbose 2024-05-18 19:26:57 +02:00
8f29bc5e99
Remove dead link 2024-05-18 16:39:54 +02:00
e9b1169d98
Update file structure 2024-05-18 16:38:56 +02:00
12548963b4
Fix issue template typo 2024-05-18 16:30:05 +02:00
cd352eb73b
Update and fix issue templates 2024-05-18 16:28:10 +02:00
b80d387a3e
Add comparison warning 2024-05-17 02:13:03 +02:00
227b0be514
Reverse scene collection order (fix) 2024-05-17 01:56:23 +02:00
10 changed files with 81 additions and 66 deletions

View file

@ -29,10 +29,9 @@ body:
description: 'For us to understand the problem you''re having please insert the ENTIRE log file here. You must give us `DIAG` level logs (set `logger_level` in CORE''s configuration to `CoreTypes.LoggerLevel.DIAG` during initialization). **Leave this empty if you give us a reproduction project.**'
placeholder: 'Your log file here...'
value: |
<details>
```plain
Your log file here...
Note: We wrap the log in the `details` tag so the log doesn't take up too much space in the issue. Please don't remove them.
</details>
```
validations:
required: false
- type: 'textarea'
@ -41,12 +40,9 @@ body:
label: 'Bug snippet'
description: 'Insert a snippet of your code that you think is causing the issue. **Leave this empty if you give us a reproduction project.**'
value: |
<details>
```gdscript
Your code snippet here...
Note: We wrap the snippet in the `details` tag so the code doesn't take up too much space in the issue. Please don't remove them.
```
</details>
validations:
required: false
- type: 'textarea'

View file

@ -14,7 +14,7 @@ body:
Please answer the following questions accurately, otherwise we may not be able to add the feature. \
\
**Note: Please check if the same feature request already exists. If not, continue. If so, participate in that one instead.** \
**Note: Please don't censor anything *except* sensitive information. You don''t need to be embarrased about your username. You censor your bug report, we censor our answers.**
**Note: Please don't censor anything *except* sensitive information. You don't need to be embarrased about your username. You censor your bug report, we censor our answers.**
- type: 'textarea'
id: 'feature-description'
attributes:
@ -22,7 +22,7 @@ body:
description: 'Explain *what* you want added. Also describe why this feature can''t implemented without integrating it into the CORE Framework. Include as many details as possible.'
placeholder: |
Example:
I want to do XY in my project, which is fairely hard to implement but would benefit a lot of projects.
I want to do XY in my project, which is fairly hard to implement but would benefit a lot of projects.
validations:
required: true
- type: 'textarea'
@ -33,7 +33,7 @@ body:
placeholder: |
Example:
I would propose to <some description on how to implement your feature>.
I''ve also thought on simply <some other description on how to implement your feature>.
I've also thought on simply <some other description on how to implement your feature>.
validations:
required: true
- type: 'textarea'
@ -43,9 +43,9 @@ body:
description: 'Explain how could be possible to implement the feature without building it into the framework directly. Include as many details as possible. **Leave empty if it can''t simply be solved by adding a module.**'
placeholder: |
Example:
I''ve considered using a custom module for this feature.
I've considered using a custom module for this feature.
Otherwise it would be possible to use <link to some project>.
I''ve also considered using the engine''s way of doing it by <how to do it using the engine''s way>.
I've also considered using the normal way of doing it by <how to do it using the normal way>.
validations:
required: false
- type: 'markdown'

View file

@ -28,10 +28,9 @@ body:
description: 'For us to understand the problem you''re having please insert the ENTIRE log file here. You must give us `DIAG` level logs (set `logger_level` in CORE''s configuration to `CoreTypes.LoggerLevel.DIAG` during initialization). **Leave this empty if your problem does not need log output or doesn''t involve code at all.**'
placeholder: 'Your log file here...'
value: |
<details>
```plain
Your log file here...
Note: We wrap the log in the `details` tag so the log doesn't take up too much space in the issue. Please don't remove them.
</details>
```
validations:
required: false
- type: 'textarea'
@ -40,10 +39,9 @@ body:
label: 'Code snippet'
description: 'Insert a snippet of your code that you need help with. **Leave this empty if your problem does not need log output or doesn''t involve code at all.**'
value: |
<details>
```gdscript
Your code snippet here...
Note: We wrap the snippet in the `details` tag so the code doesn't take up too much space in the issue. Please don't remove them.
</details>
```
validations:
required: false
- type: 'dropdown'

View file

@ -9,7 +9,7 @@ The CORE Framework aims at simplifying development for developers writing their
- [File structure](#file-structure)
## About
The CORE Framework is written in GDScript (for now, see [#14](https://git.staropensource.de/StarOpenSource/CORE/issues/14)) and acts as the base for your games and applications. It includes a logger w/ crashhandler, scene management system, downloader, miscellaneous stuff and much more. \
The CORE Framework is written in GDScript (for now) and acts as the base for your games and applications. It includes a logger w/ crashhandler, scene management system, downloader, miscellaneous stuff and much more. \
Read more about CORE [here](https://core.staropensource.de/about/).
## Documentation
@ -109,22 +109,16 @@ Here's a file structure for this project:
│   ├── build-distrib-assetlibrary.sh Builds a distribution directory for distributing CORE in the Godot Asset Library.
│   ├── build-distrib-git.sh Builds a distribution directory for distributing CORE using git.
│   ├── core.png
│   ├── core.png.import
│   ├── core.xcf
│   ├── FiraCode
│   │   ├── Bold.ttf
│   │   ├── Bold.ttf.import
│   │   ├── Light.ttf
│   │   ├── Light.ttf.import
│   │   ├── Medium.ttf
│   │   ├── Medium.ttf.import
│   │   ├── Regular.ttf
│   │   ├── Regular.ttf.import
│   │   ├── Retina.ttf
│   │   └── Retina.ttf.import
│   └── submodules Contains all submodules CORE uses
│   └── besseretests
├── docs CORE's documentation, includes a Makefile
├── docs CORE's documentation
│   ├── babel.config.js
│   ├── docs Where all documentation pages lie
│   │   ├── about.md
@ -132,17 +126,28 @@ Here's a file structure for this project:
│   │   │   ├── _category_.json
│   │   │   ├── initializing-core.md
│   │   │   └── setting-up.mdx
│   │   ├── guides Various guides for specific stuff
│   │   │   ├── _category_.json
│   │   │   └── custom-modules.md
│   │   ├── reference CORE class and module reference
│   │   │   ├── _category_.json
│   │   │   ├── coreconfiguration.md
│   │   │   ├── core.md
│   │   │   ├── coretypes.md
│   │   │   ├── classes Reference for classes
│   │   │   │   ├── basemodule.md
│   │   │   │   ├── _category_.json
│   │   │   │   ├── core.md
│   │   │   │   ├── loggerinstance.md
│   │   │   │   ├── types.md
│   │   │   │   ├── validationschema.md
│   │   │   │   └── validationsingle.md
│   │   │   └── modules Reference for modules
│   │   │   ├── _category_.json
│   │   │   ├── config.md
│   │   │   ├── erm.md
│   │   │   ├── loggerinstance.md
│   │   │   ├── logger.md
│   │   │   ├── misc.md
│   │   │   ├── sms.md
│   │   │   └── storage.md
│   │   │   ├── storage.md
│   │   │   └── validation.md
│   │   └── terminology.md
│   ├── docusaurus.config.ts Documentation configuration
│   ├── Makefile Makefile for managing the documentation
@ -153,9 +158,6 @@ Here's a file structure for this project:
│   ├── src
│   │   ├── css
│   │   │   └── custom.css
│   │   └── pages
│   │   ├── index.module.css
│   │   └── index.tsx
│   ├── static
│   │   └── dist
│   │   └── core.png -> ../../../dist/core.png Symlink to the framework icon
@ -163,29 +165,35 @@ Here's a file structure for this project:
├── LICENSE
├── project.godot
├── README.md
├── src Contains the source code
│   ├── classes
├── src Contains the framework source code
│   ├── classes Contains all classes except for 'Core'
│   │   ├── basemodule.gd
│   │   ├── config.gd
│   │   ├── loggerinstance.gd
│   │   └── types.gd
│   │   ├── types.gd
│   │   ├── validationschema.gd
│   │   └── validationsingle.gd
│   ├── core.gd
│   ├── erm.gd
│   ├── logger.gd
│   ├── logui.gd
│   ├── misc.gd
│   ├── sms.gd
│   └── storage.gd
├── Test.gd Test script, only for testing during development
│   ├── storage.gd
│   └── validation.gd
├── Test.gd Dev script, only for testing during development
├── tests For unit testing
│ ├── test_resources Scripts, scenes and other resources used in tests
│ │   ├── custom_module.gd A custom module used in 'tests/unit/core.gd'
│ │   ├── scene.gd Updates the callback value
│ │   └── scene.tscn Loads 'scene.gd'
│ ├── unit The actual unit tests
│ │   ├── core.gd
│ │   ├── misc.gd
│ │   └── sms.gd
│   │   ├── core.gd
│   │   ├── erm.gd
│   │   ├── misc.gd
│   │   ├── sms.gd
│   │   ├── storage.gd
│   │   └── validation.gd
│   └── unitbase.gd The base for all of our unit tests, includes functions and variables used in all unit tests.
└── Test.tscn Simply executes `Test.gd`
└── Test.tscn Stub class, has script 'Test.gd' attached
```

View file

@ -3,12 +3,15 @@
dist: help
help:
@echo "make install-deps -> Install all dependencies"
@echo " update-deps -> Updates all dependencies"
@echo " test -> Start a web server for development"
@echo " build -> Build static files"
@echo " clean -> Clean directory"
@echo " clean-extra -> Clean directory with extra directories/files"
install-deps:
pnpm install
update-deps:
pnpm install @docusaurus/{core,plugin-client-redirects,plugin-content-docs,plugin-sitemap,preset-classic,module-type-aliases,tsconfig,types}@latest
test:
pnpm run start --hot-only --no-open
build:

View file

@ -23,6 +23,9 @@ Your answer is *(probably)* **yes**!
:::note
This table only compares frameworks that are relatively up to date with the Godot Engine (versions 4.1 and 4.2), can be found in the Godot Asset Library or are well known and are aimed at a specific game genre or general usage. Things like animation or dialogue frameworks are not in compared here.
:::
:::warning
There are pretty much no projects like the CORE Framework which we can compare against.
:::
<table>
<tr>
<th></th>

View file

@ -15,11 +15,11 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.3.2",
"@docusaurus/plugin-client-redirects": "^3.3.2",
"@docusaurus/plugin-content-docs": "^3.3.2",
"@docusaurus/plugin-sitemap": "^3.3.2",
"@docusaurus/preset-classic": "3.3.2",
"@docusaurus/core": "3.4.0",
"@docusaurus/plugin-client-redirects": "^3.4.0",
"@docusaurus/plugin-content-docs": "^3.4.0",
"@docusaurus/plugin-sitemap": "^3.4.0",
"@docusaurus/preset-classic": "3.4.0",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.0",
"prism-react-renderer": "^2.3.1",
@ -27,9 +27,9 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.3.2",
"@docusaurus/tsconfig": "3.3.2",
"@docusaurus/types": "3.3.2",
"@docusaurus/module-type-aliases": "3.4.0",
"@docusaurus/tsconfig": "3.4.0",
"@docusaurus/types": "3.4.0",
"@types/node": "^20.12.5",
"typescript": "~5.4.4"
},

View file

@ -188,7 +188,7 @@ func evaluate() -> bool:
# ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
# ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇
# ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇
# ⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
# ⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
# ⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
# ⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
# https://steamcommunity.com/sharedfiles/filedetails/?id=2902061979

View file

@ -28,7 +28,7 @@ const version_version: int = 2
## The version type. See [enum CoreTypes.VersionType] for more information.
const version_type: CoreTypes.VersionType = CoreTypes.VersionType.RELEASE
## The version type number. Resets on every new version and version type.
const version_typerelease: int = 0
const version_typerelease: int = 1
## The fork indicator. Update this if you intend on soft or hard forking this framework.
const version_fork: String = ""
@ -245,19 +245,26 @@ func register_custom_module(module_name: String, module_origin: String, module_c
if custom_modules.has(module_name):
loggeri.error(stringify_variables("Registering module failed: A custom module with the name %name% already exists.", { "name": module_name }))
return false
loggeri.diag("Updating variables")
# Update variables
module_class.name = module_name
module_class.core = self
module_class.logger = logger.get_instance(module_origin, module_class)
module_class.logger.framework = true
loggeri.diag("Adding module to SceneTree")
custom_modules_node.add_child(module_class)
loggeri.diag("Merging module with custom_modules")
# Register module
custom_modules.merge({ module_name: module_class })
loggeri.diag("Initializing custom module")
module_class._initialize()
loggeri.diag("Updating custom module configuration")
module_class._pull_config()
# Add to 'custom_modules_node'
custom_modules_node.add_child(module_class)
# Initialize module
@warning_ignore("redundant_await")
await module_class._initialize()
# Update module configuration
@warning_ignore("redundant_await")
await module_class._pull_config()
return true
## Unregisters a custom module, making it no longer available.

View file

@ -21,7 +21,7 @@
extends CoreBaseModule
## Used internally for adding, managing and removing scene collections.
const scene_nodes: Array[String] = [ "debug", "cutscene", "menu", "main", "background" ]
const scene_nodes: Array[String] = [ "background", "main", "menu", "cutscene", "debug" ]
# Scene collections
var scenes_debug: Node = Node.new()
var scenes_cutscene: Node = Node.new()