Compare commits
12 commits
v2-release
...
develop
Author | SHA1 | Date | |
---|---|---|---|
872fe39bd9 | |||
402d5e2ada | |||
9372a5be1c | |||
ddbe0d605c | |||
5582fef70a | |||
94a677286c | |||
8f29bc5e99 | |||
e9b1169d98 | |||
12548963b4 | |||
cd352eb73b | |||
b80d387a3e | |||
227b0be514 |
11 changed files with 86 additions and 72 deletions
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
66
README.md
66
README.md
|
@ -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
|
||||
│ │ │ ├── erm.md
|
||||
│ │ │ ├── loggerinstance.md
|
||||
│ │ │ ├── logger.md
|
||||
│ │ │ ├── misc.md
|
||||
│ │ │ ├── sms.md
|
||||
│ │ │ └── storage.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
|
||||
│ │ │ ├── logger.md
|
||||
│ │ │ ├── misc.md
|
||||
│ │ │ ├── sms.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
|
||||
```
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -14,7 +14,7 @@ config/name="CORE Framework"
|
|||
run/main_scene="res://Test.tscn"
|
||||
config/use_custom_user_dir=true
|
||||
config/custom_user_dir_name="StarOpenSource/COREDev"
|
||||
config/features=PackedStringArray("4.2", "GL Compatibility")
|
||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||
boot_splash/bg_color=Color(0, 0, 0, 1)
|
||||
boot_splash/show_image=false
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ func evaluate() -> bool:
|
|||
# ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
|
||||
# ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇
|
||||
# ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇
|
||||
# ⠀⠀ ⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
|
||||
# ⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
|
||||
# ⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
|
||||
# ⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
|
||||
# https://steamcommunity.com/sharedfiles/filedetails/?id=2902061979
|
||||
|
|
34
src/core.gd
34
src/core.gd
|
@ -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.
|
||||
|
@ -439,14 +446,13 @@ func check_godot_version() -> bool:
|
|||
printerr("The CORE Framework does not support Godot versions older or newer than 4.x.x.")
|
||||
return false
|
||||
match(version["minor"]):
|
||||
0: printerr("The CORE Framework does not support Godot versions older than 4.2.x. Please update to Godot 4.2.x to ensure full compatibility.")
|
||||
1: printerr("The CORE Framework does not support Godot versions older than 4.2.x. Please update to Godot 4.2.x to ensure full compatibility.")
|
||||
2: pass
|
||||
0, 1, 2: printerr("The CORE Framework does not fully support Godot versions older than 4.3.x. Please update to Godot 4.3.x to ensure full compatibility.")
|
||||
3: pass
|
||||
_:
|
||||
printerr("The CORE Framework does not support Godot versions newer than 4.2.x. Please downgrade to Godot 4.2.x.")
|
||||
printerr("The CORE Framework does not support Godot versions newer than 4.3.x. Please downgrade to Godot 4.3.x.")
|
||||
return false
|
||||
if version["status"] != "stable":
|
||||
printerr("The CORE Framework does not support unstable Godot versions. Please switch to Godot 4.2.x.stable to ensure full compatibility.")
|
||||
printerr("The CORE Framework does not support unstable Godot versions. Please switch to Godot 4.3.x.stable to ensure full compatibility.")
|
||||
return false
|
||||
return true
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue