├── .editorconfig
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ └── feature_request.yml
└── workflows
│ ├── build_engine.yml
│ └── deploy_docs.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── Doxyfile
├── LICENSE.txt
├── README.md
├── branding
├── README.md
├── doxygen
│ └── header_logo.png
├── github
│ └── readme_banner.png
└── steam
│ ├── avatars
│ └── spider.png
│ ├── community
│ ├── capsule.png
│ ├── community_group_header.png
│ ├── community_icon.ico
│ ├── community_icon.png
│ ├── devhub_banner.png
│ └── workshop_banner.png
│ ├── library
│ ├── library_capsule.png
│ ├── library_hero.png
│ └── library_logo.png
│ └── store
│ ├── store_header_capsule.png
│ ├── store_main_capsule.png
│ ├── store_small_capsule.png
│ └── store_vertical_capsule.png
├── docs
├── layout
│ ├── custom.css
│ └── header.html
└── pages
│ ├── filespec
│ ├── filespec.md
│ ├── material-spec.md
│ ├── model-spec.md
│ ├── spec-mesh.md
│ ├── spec-scene.md
│ └── texture-spec.md
│ ├── reference
│ ├── pluginapi.md
│ └── reference.md
│ └── tutorial
│ ├── setup.md
│ └── tutorial.md
├── engine
├── config
│ ├── CMakeLists.txt
│ ├── ConEntry.cpp
│ ├── ConEntry.h
│ ├── Config.cpp
│ ├── Config.h
│ └── generated
│ │ └── Config.h.in
├── core
│ ├── Assertions.cpp
│ ├── Assertions.h
│ ├── CMakeLists.txt
│ ├── CommandLine.cpp
│ ├── CommandLine.h
│ ├── Engine.cpp
│ ├── Engine.h
│ ├── Logger.cpp
│ ├── Logger.h
│ └── Platform.h
├── engine.cmake
├── entity
│ ├── CMakeLists.txt
│ ├── Entity.h
│ ├── Scene.cpp
│ ├── Scene.h
│ ├── Viewport.cpp
│ ├── Viewport.h
│ └── component
│ │ ├── AudioNoiseComponent.h
│ │ ├── AudioSfxrComponent.h
│ │ ├── AudioSpeechComponent.h
│ │ ├── AudioWavComponent.h
│ │ ├── AudioWavStreamComponent.h
│ │ ├── BillboardComponent.h
│ │ ├── CMakeLists.txt
│ │ ├── CameraComponent.h
│ │ ├── LayerComponents.h
│ │ ├── LightComponents.h
│ │ ├── MeshComponent.h
│ │ ├── MeshDynamicComponent.h
│ │ ├── MeshSpriteComponent.h
│ │ ├── NameComponent.h
│ │ ├── SkyboxComponent.h
│ │ ├── TagComponents.h
│ │ ├── TransformComponent.h
│ │ └── UUIDComponent.h
├── i18n
│ ├── CMakeLists.txt
│ ├── TranslationFileResource.cpp
│ ├── TranslationFileResource.h
│ ├── TranslationManager.cpp
│ └── TranslationManager.h
├── input
│ ├── CMakeLists.txt
│ ├── InputManager.cpp
│ └── InputManager.h
├── loader
│ ├── CMakeLists.txt
│ ├── image
│ │ ├── CMakeLists.txt
│ │ ├── Image.cpp
│ │ └── Image.h
│ ├── mesh
│ │ ├── CMakeLists.txt
│ │ ├── ChiraMeshLoader.cpp
│ │ ├── ChiraMeshLoader.h
│ │ ├── IMeshLoader.cpp
│ │ ├── IMeshLoader.h
│ │ ├── OBJMeshLoader.cpp
│ │ └── OBJMeshLoader.h
│ └── settings
│ │ ├── CMakeLists.txt
│ │ ├── ISettingsLoader.cpp
│ │ ├── ISettingsLoader.h
│ │ ├── JSONSettingsLoader.cpp
│ │ └── JSONSettingsLoader.h
├── math
│ ├── Axis.h
│ ├── CMakeLists.txt
│ ├── Color.h
│ ├── Graph.h
│ ├── Matrix.h
│ ├── Types.h
│ └── Vertex.h
├── module
│ ├── CMakeLists.txt
│ ├── Module.cpp
│ ├── Module.h
│ ├── audio
│ │ ├── Audio.cpp
│ │ ├── Audio.h
│ │ └── CMakeLists.txt
│ ├── discord
│ │ ├── CMakeLists.txt
│ │ ├── Discord.cpp
│ │ └── Discord.h
│ └── steam
│ │ ├── CMakeLists.txt
│ │ ├── Steam.cpp
│ │ └── Steam.h
├── render
│ ├── CMakeLists.txt
│ ├── backend
│ │ ├── CMakeLists.txt
│ │ ├── RenderBackend.h
│ │ ├── RenderDevice.h
│ │ ├── RenderTypes.cpp
│ │ ├── RenderTypes.h
│ │ ├── api
│ │ │ ├── BackendGL.cpp
│ │ │ ├── BackendGL.h
│ │ │ ├── BackendSDL.cpp
│ │ │ ├── BackendSDL.h
│ │ │ └── CMakeLists.txt
│ │ └── device
│ │ │ ├── CMakeLists.txt
│ │ │ ├── DeviceGL.cpp
│ │ │ ├── DeviceGL.h
│ │ │ ├── DeviceSDL.cpp
│ │ │ └── DeviceSDL.h
│ ├── material
│ │ ├── CMakeLists.txt
│ │ ├── MaterialCubemap.cpp
│ │ ├── MaterialCubemap.h
│ │ ├── MaterialFactory.cpp
│ │ ├── MaterialFactory.h
│ │ ├── MaterialFrameBuffer.cpp
│ │ ├── MaterialFrameBuffer.h
│ │ ├── MaterialPhong.cpp
│ │ ├── MaterialPhong.h
│ │ ├── MaterialTextured.cpp
│ │ ├── MaterialTextured.h
│ │ ├── MaterialUntextured.cpp
│ │ └── MaterialUntextured.h
│ ├── mesh
│ │ ├── CMakeLists.txt
│ │ ├── MeshData.cpp
│ │ ├── MeshData.h
│ │ ├── MeshDataBuilder.cpp
│ │ ├── MeshDataBuilder.h
│ │ ├── MeshDataResource.cpp
│ │ └── MeshDataResource.h
│ ├── shader
│ │ ├── CMakeLists.txt
│ │ ├── Shader.cpp
│ │ ├── Shader.h
│ │ ├── UBO.cpp
│ │ └── UBO.h
│ └── texture
│ │ ├── CMakeLists.txt
│ │ ├── ITexture.h
│ │ ├── Texture.cpp
│ │ ├── Texture.h
│ │ ├── TextureCubemap.cpp
│ │ └── TextureCubemap.h
├── resource
│ ├── BinaryResource.cpp
│ ├── BinaryResource.h
│ ├── CMakeLists.txt
│ ├── JSONResource.cpp
│ ├── JSONResource.h
│ ├── Resource.cpp
│ ├── Resource.h
│ ├── StringResource.cpp
│ ├── StringResource.h
│ └── provider
│ │ ├── CMakeLists.txt
│ │ ├── FilesystemResourceProvider.cpp
│ │ ├── FilesystemResourceProvider.h
│ │ └── IResourceProvider.h
├── script
│ ├── CMakeLists.txt
│ ├── Lua.cpp
│ └── Lua.h
├── thirdparty
│ ├── glad
│ │ ├── 40
│ │ │ ├── include
│ │ │ │ ├── KHR
│ │ │ │ │ └── khrplatform.h
│ │ │ │ └── glad
│ │ │ │ │ ├── gl.h
│ │ │ │ │ └── glversion.h
│ │ │ └── src
│ │ │ │ └── gl.c
│ │ ├── 41
│ │ │ ├── include
│ │ │ │ ├── KHR
│ │ │ │ │ └── khrplatform.h
│ │ │ │ └── glad
│ │ │ │ │ ├── gl.h
│ │ │ │ │ └── glversion.h
│ │ │ └── src
│ │ │ │ └── gl.c
│ │ ├── 43
│ │ │ ├── include
│ │ │ │ ├── KHR
│ │ │ │ │ └── khrplatform.h
│ │ │ │ └── glad
│ │ │ │ │ ├── gl.h
│ │ │ │ │ └── glversion.h
│ │ │ └── src
│ │ │ │ └── gl.c
│ │ └── CMakeLists.txt
│ └── stb
│ │ ├── CMakeLists.txt
│ │ └── stb_image.h
├── ui
│ ├── CMakeLists.txt
│ ├── Font.cpp
│ ├── Font.h
│ ├── IPanel.cpp
│ ├── IPanel.h
│ ├── IViewportPanel.cpp
│ ├── IViewportPanel.h
│ └── debug
│ │ ├── CMakeLists.txt
│ │ ├── ConsolePanel.cpp
│ │ ├── ConsolePanel.h
│ │ ├── ResourceUsageTrackerPanel.cpp
│ │ └── ResourceUsageTrackerPanel.h
└── utility
│ ├── AbstractFactory.h
│ ├── CMakeLists.txt
│ ├── Concepts.h
│ ├── DependencyGraph.h
│ ├── NoCopyOrMove.h
│ ├── Serial.h
│ ├── SharedPointer.h
│ ├── String.cpp
│ ├── String.h
│ ├── TypeString.h
│ ├── Types.h
│ ├── UUIDGenerator.cpp
│ └── UUIDGenerator.h
├── resources
├── editor
│ ├── i18n
│ │ ├── editor_en.json
│ │ └── editor_universal.json
│ ├── materials
│ │ └── teapot.json
│ ├── meshes
│ │ ├── teapot.cmdl
│ │ └── teapot.json
│ ├── platform
│ │ └── macOS
│ │ │ ├── AppIcon.icns
│ │ │ └── Info.plist
│ └── textures
│ │ ├── container_diffuse.json
│ │ ├── container_diffuse.png
│ │ ├── container_specular.json
│ │ └── container_specular.png
├── engine
│ ├── bin
│ │ ├── LICENSE.md
│ │ ├── steam_api32.dll
│ │ ├── steam_api32.so
│ │ ├── steam_api64.dll
│ │ ├── steam_api64.dylib
│ │ └── steam_api64.so
│ ├── fonts
│ │ ├── console_en.json
│ │ ├── console_jp.json
│ │ ├── default_en.json
│ │ ├── default_jp.json
│ │ ├── dejavu_sans_mono
│ │ │ ├── AUTHORS
│ │ │ ├── DejaVuSansMono.ttf
│ │ │ └── LICENSE
│ │ ├── noto_sans_jp
│ │ │ ├── NotoSansJP-Black.otf
│ │ │ ├── NotoSansJP-Bold.otf
│ │ │ ├── NotoSansJP-Light.otf
│ │ │ ├── NotoSansJP-Medium.otf
│ │ │ ├── NotoSansJP-Regular.otf
│ │ │ ├── NotoSansJP-Thin.otf
│ │ │ └── OFL.txt
│ │ └── noto_sans_mono
│ │ │ └── NotoSansMonoCJKjp-Regular.otf
│ ├── i18n
│ │ └── engine_en.json
│ ├── materials
│ │ ├── phong.json
│ │ ├── skybox.json
│ │ ├── splashscreen.json
│ │ ├── unlit.json
│ │ ├── unlitTextured.json
│ │ └── window.json
│ ├── meshes
│ │ ├── missing.cmdl
│ │ └── missing.json
│ ├── platform
│ │ └── windows
│ │ │ ├── app.manifest
│ │ │ ├── app.rc
│ │ │ └── icon.ico
│ ├── shaders
│ │ ├── phonglit.fsh
│ │ ├── phonglit.json
│ │ ├── phonglit.vsh
│ │ ├── skybox.fsh
│ │ ├── skybox.json
│ │ ├── skybox.vsh
│ │ ├── ubo
│ │ │ ├── lights.glsl
│ │ │ └── pv.glsl
│ │ ├── ui.fsh
│ │ ├── ui.json
│ │ ├── ui.vsh
│ │ ├── uniform
│ │ │ └── m.glsl
│ │ ├── unlit.fsh
│ │ ├── unlit.json
│ │ ├── unlit.vsh
│ │ ├── unlitTextured.fsh
│ │ ├── unlitTextured.json
│ │ ├── unlitTextured.vsh
│ │ └── utility
│ │ │ └── when.glsl
│ ├── sounds
│ │ └── missing.wav
│ └── textures
│ │ ├── black.json
│ │ ├── black.png
│ │ ├── missing.json
│ │ ├── missing.png
│ │ ├── missingSkybox.json
│ │ └── ui
│ │ ├── icon.json
│ │ ├── icon.png
│ │ ├── splashscreen.json
│ │ └── splashscreen.png
└── tests
│ └── string_resource_test.txt
├── tests
├── TestHelpers.h
├── engine
│ ├── config
│ │ └── ConEntryTest.cpp
│ ├── core
│ │ └── CommandLine.cpp
│ ├── math
│ │ └── GraphTest.cpp
│ ├── resource
│ │ └── provider
│ │ │ └── FilesystemResourceProviderTest.cpp
│ ├── ui
│ │ └── debug
│ │ │ └── ConsolePanelTest.cpp
│ └── utility
│ │ ├── ConceptsTest.cpp
│ │ ├── DependencyGraphTest.cpp
│ │ ├── StringTest.cpp
│ │ ├── TypeStringTest.cpp
│ │ └── UUIDGeneratorTest.cpp
└── tests.cmake
└── tools
├── ToolHelpers.h
├── cmdltool
├── README.md
├── cmdltool.cmake
└── cmdltool.cpp
└── editor
├── editor.cmake
├── editor.cpp
└── ui
├── CMakeLists.txt
├── ControlsPanel.cpp
├── ControlsPanel.h
├── EntitySelectPanel.cpp
├── EntitySelectPanel.h
├── InspectorPanel.cpp
├── InspectorPanel.h
├── ScriptEditorPanel.cpp
└── ScriptEditorPanel.h
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: craftablescience
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: Report a bug
3 | title: Bug Title Here
4 | labels: [bug]
5 | body:
6 | - type: textarea
7 | attributes:
8 | label: Describe the Bug
9 | description: A clear description of what the bug is. Feel free to add pictures or videos.
10 | placeholder: |
11 | When I do X then Y happens.
12 | validations:
13 | required: true
14 | - type: textarea
15 | attributes:
16 | label: To Reproduce
17 | description: Steps to reproduce the bug.
18 | placeholder: |
19 | 1. Launch ...
20 | 2. Open ...
21 | 3. Do ...
22 | 4. See error ...
23 | validations:
24 | required: true
25 | - type: input
26 | attributes:
27 | label: Operating System
28 | placeholder: Windows, Linux, etc.
29 | validations:
30 | required: true
31 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: Request a feature
3 | title: Feature Title Here
4 | labels: [enhancement]
5 | body:
6 | - type: dropdown
7 | attributes:
8 | label: Component to Improve
9 | options: [Audio, Documentation, Render, "Core Engine", UI/UX, Other]
10 | validations:
11 | required: true
12 | - type: textarea
13 | attributes:
14 | label: Describe Your Suggestion
15 | description: Give a clear explanation of what you want to be added. Feel free to add pictures or video.
16 | placeholder: |
17 | Please don't give vague suggestions.
18 | How does it work? What is the expected outcome?
19 | validations:
20 | required: true
21 |
--------------------------------------------------------------------------------
/.github/workflows/deploy_docs.yml:
--------------------------------------------------------------------------------
1 | name: Deploy Docs
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | deploy-docs:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: DenverCoder1/doxygen-github-pages-action@v1.2.0
13 | with:
14 | github_token: ${{ secrets.GITHUB_TOKEN }}
15 | branch: docs
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # IDE
2 | .idea/
3 | .vs/
4 | .vscode/
5 |
6 | CMakeSettings.json
7 |
8 | # Build
9 | cmake-build-*/
10 | build*/
11 | out*/
12 |
13 | .ccls-cache
14 |
15 | # Doxygen
16 | docs/html
17 |
18 | # macOS
19 | */.DS_Store
20 | .DS_Store
21 |
22 | # Generated
23 | !generated/*.in
24 | generated/
25 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "engine/thirdparty/discord"]
2 | path = engine/thirdparty/discord
3 | url = https://github.com/craftablescience/discord-rpc-clean
4 | [submodule "engine/thirdparty/fmt"]
5 | path = engine/thirdparty/fmt
6 | url = https://github.com/fmtlib/fmt
7 | [submodule "engine/thirdparty/glm"]
8 | path = engine/thirdparty/glm
9 | url = https://github.com/g-truc/glm
10 | [submodule "engine/thirdparty/imgui"]
11 | path = engine/thirdparty/imgui
12 | url = https://github.com/ocornut/imgui
13 | [submodule "engine/thirdparty/json"]
14 | path = engine/thirdparty/json
15 | url = https://github.com/nlohmann/json
16 | [submodule "engine/thirdparty/libloader"]
17 | path = engine/thirdparty/libloader
18 | url = https://github.com/craftablescience/LibLoader
19 | [submodule "engine/thirdparty/stduuid"]
20 | path = engine/thirdparty/stduuid
21 | url = https://github.com/mariusbancila/stduuid
22 | [submodule "engine/thirdparty/imgui-filebrowser"]
23 | path = engine/thirdparty/imgui-filebrowser
24 | url = https://github.com/AirGuanZ/imgui-filebrowser
25 | [submodule "engine/thirdparty/sdl2"]
26 | path = engine/thirdparty/sdl2
27 | url = https://github.com/libsdl-org/SDL
28 | [submodule "engine/thirdparty/magic_enum"]
29 | path = engine/thirdparty/magic_enum
30 | url = https://github.com/Neargye/magic_enum
31 | [submodule "engine/thirdparty/entt"]
32 | path = engine/thirdparty/entt
33 | url = https://github.com/skypjack/entt
34 | [submodule "engine/thirdparty/soloud"]
35 | path = engine/thirdparty/soloud
36 | url = https://github.com/craftablescience/soloud
37 | [submodule "docs/layout/doxygen-awesome-css"]
38 | path = docs/layout/doxygen-awesome-css
39 | url = https://github.com/jothepro/doxygen-awesome-css
40 | [submodule "engine/thirdparty/imguizmo"]
41 | path = engine/thirdparty/imguizmo
42 | url = https://github.com/CedricGuillemet/ImGuizmo
43 | [submodule "engine/thirdparty/imgui-colortextedit"]
44 | path = engine/thirdparty/imgui-colortextedit
45 | url = https://github.com/BalazsJako/ImGuiColorTextEdit
46 | [submodule "engine/thirdparty/cereal"]
47 | path = engine/thirdparty/cereal
48 | url = https://github.com/craftablescience/cereal
49 | [submodule "engine/thirdparty/lua"]
50 | path = engine/thirdparty/lua
51 | url = https://github.com/craftablescience/lua
52 | [submodule "engine/thirdparty/sol2"]
53 | path = engine/thirdparty/sol2
54 | url = https://github.com/ThePhD/sol2
55 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Brendan Lewis
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/branding/README.md:
--------------------------------------------------------------------------------
1 | Logo font is `UD Digi Kyokasho NP-R`
2 |
--------------------------------------------------------------------------------
/branding/doxygen/header_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/doxygen/header_logo.png
--------------------------------------------------------------------------------
/branding/github/readme_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/github/readme_banner.png
--------------------------------------------------------------------------------
/branding/steam/avatars/spider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/avatars/spider.png
--------------------------------------------------------------------------------
/branding/steam/community/capsule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/community/capsule.png
--------------------------------------------------------------------------------
/branding/steam/community/community_group_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/community/community_group_header.png
--------------------------------------------------------------------------------
/branding/steam/community/community_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/community/community_icon.ico
--------------------------------------------------------------------------------
/branding/steam/community/community_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/community/community_icon.png
--------------------------------------------------------------------------------
/branding/steam/community/devhub_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/community/devhub_banner.png
--------------------------------------------------------------------------------
/branding/steam/community/workshop_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/community/workshop_banner.png
--------------------------------------------------------------------------------
/branding/steam/library/library_capsule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/library/library_capsule.png
--------------------------------------------------------------------------------
/branding/steam/library/library_hero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/library/library_hero.png
--------------------------------------------------------------------------------
/branding/steam/library/library_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/library/library_logo.png
--------------------------------------------------------------------------------
/branding/steam/store/store_header_capsule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/store/store_header_capsule.png
--------------------------------------------------------------------------------
/branding/steam/store/store_main_capsule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/store/store_main_capsule.png
--------------------------------------------------------------------------------
/branding/steam/store/store_small_capsule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/store/store_small_capsule.png
--------------------------------------------------------------------------------
/branding/steam/store/store_vertical_capsule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/branding/steam/store/store_vertical_capsule.png
--------------------------------------------------------------------------------
/docs/layout/custom.css:
--------------------------------------------------------------------------------
1 | @media (prefers-color-scheme: dark) {
2 | html:not(.light-mode) {
3 | --primary-color : #AB54D1;
4 | --primary-dark-color : #AB54D1;
5 | --primary-light-color : #AB54D1;
6 |
7 | /* --code-background: #29175E;
8 | --fragment-background: #29175E; */
9 |
10 | --code-background: #303033;
11 | --fragment-background: #303033;
12 |
13 | --page-background-color: #0F0F0F;
14 | --side-nav-background: #242424;
15 | --header-background: var(--side-nav-background);
16 |
17 | --searchbar-background-color: #29175E;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/docs/pages/filespec/filespec.md:
--------------------------------------------------------------------------------
1 | # Chira Engine File Formats
2 | Unsurprisingly, Chira Engine does have it's fair share of unique file formats. As such we have dedicated a section of this documentation purely to detailing what these files are and how they are setup alonside any tools you may use to create or modify them.
3 |
4 | [TOC]
5 |
6 | ## Common info
7 | Most of the file formats used by Chira are written in some form of JSON. So they're relatively easy to parse. That being said, there **are** some exceptions to this and any formats that aren't JSON will have this information clearly mentioned.
8 |
9 | The pages themselves are formatted in the following structure (headers disabled for better reading experience)
10 |
11 | \#\# Example Section
12 | info on section
13 |
14 | \#\#\# Section property
15 | `Default Value: `
16 |
17 | Specifications:
18 |
19 | | Spec | Value |
20 | |----------|-----------------|
21 | | Type | Example |
22 |
23 | ## Formats
24 | > NOTE: The following list is based on a currently private branch dedicated to reworking file extensions separate from `editor-extended`
25 |
26 | Here is a complete (as of writing) list of ChiraEngine unique formats. Any formats that have pages will have them linked here.
27 | - @subpage cscnspec
28 | - @subpage cmdlspec
29 | - @subpage cmshspec
30 | - CTEX
31 | - CMAT
32 | - CSH
33 |
34 | ## Tools
35 | Currently there are no external parsers, generators, or editors for any of the formats.
--------------------------------------------------------------------------------
/docs/pages/filespec/material-spec.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/docs/pages/filespec/material-spec.md
--------------------------------------------------------------------------------
/docs/pages/filespec/model-spec.md:
--------------------------------------------------------------------------------
1 | # CMDL Files {#cmdlspec}
2 | `.cmdl` is the file extension of the Chira Model file. The following info is contained within these files:
3 | - Mesh info
4 | - Material info
5 | - Mesh Loader
6 |
7 | No mesh, material, or texture data is present within CMDL files. only the info on what file should be used to get that info.
8 |
9 | > WARNING: This file format has not been fully developed and is still being added onto. Features may be added and removed as time goes on.
10 |
11 | [TOC]
12 |
13 | ## Format
14 | Just like most other Chira Engine specific resource info, CMDL files use a JSON format to store their data. Right now they only contain some basic information but the format is currently being expanded to provide more info such as
15 | - Animations
16 | - Actions
17 | - Multiple Textures
18 | - Multiple Meshes
19 |
20 | ## Properties
21 | The following properties are currently implemented into the CMDL format
22 |
23 | ### Material Type
24 | `Default Value: None`
25 |
26 | This property determines what material type Chira will use when rendering the material defined in the [material](### Material) property.
27 |
28 | Specifications:
29 |
30 | | Spec | Value |
31 | |----------|------------|
32 | | Value Type | Material Type (String) |
33 | | Optional | False |
34 |
35 | ### Material
36 | `Default Value: None`
37 |
38 | This property determines what material Chira will use when rendering the mesh defined in the [model](### Model) property.
39 |
40 | Specifications:
41 |
42 | | Spec | Value |
43 | |----------|------------|
44 | | Value Type | Resource Path (String) |
45 | | Optional | False |
46 |
47 | ### Model
48 | `Default Value: None`
49 |
50 | This property determines what mesh Chira will load for this specific model
51 |
52 | > **NOTE: Make sure the value you set in the [loader](### Loader) property matches the fomat of this mesh!**
53 |
54 | Specifications:
55 |
56 | | Spec | Value |
57 | |----------|------------|
58 | | Value Type | Resource Path (String) |
59 | | Optional | False |
60 |
61 | ### Loader
62 | `Default Value: None`
63 |
64 | This property determines what type of mesh Chira will attempt to load the mesh defined in [model](### Model) as.
65 |
66 | Specifications:
67 |
68 | | Spec | Value |
69 | |----------|------------|
70 | | Value Type | Model Type Extension (String) |
71 | | Supported Values| obj
cmsh |
72 | | Optional | False |
73 |
--------------------------------------------------------------------------------
/docs/pages/filespec/spec-mesh.md:
--------------------------------------------------------------------------------
1 | # CMSH Files {#cmshspec}
2 | `.cmsh` files are Chira Engine Mesh files. No concrete info can be given as to how they're laid out nor are they as easy to parse as other formats. They can be created from an OBJ file using [ChiraEditor]()
3 |
4 | [TOC]
5 |
6 | ## Format
7 | CMSH files are a modified^*[citation needed]*^ OBJ format. Due to this modification they require their own loader to be loaded in.
--------------------------------------------------------------------------------
/docs/pages/filespec/spec-scene.md:
--------------------------------------------------------------------------------
1 | # CSCN Files {#cscnspec}
2 | This file explains in detail exactly how the ChiraEngine Scene files (`.cscn`) work and what most if not all fields do and what their possible values (if applicable) are.
3 |
4 | [TOC]
5 |
6 | ## Format
7 | The Scene file itself is written in JSON meaning it's quite easy to parse. Allowing the creation of external editors for game specific tools (EX. No Return's Bismuth Editor) to be easier than most. only needing a JSON parser to actually read data out of the file.
8 |
9 | How this data is used is left entirely up to the creator of the tool or game as most values are stored in the most basic manner possible to allow for maximum amount of ease in creating other tools.
10 |
11 | ## Example scene file
12 | Here is an example of a scene file that contains a simple blue sky environment and a single cube object on a static plane.
13 | Due to the simplicity of this example this doesn't show off a good chunk of the values that exist. This is only to be used as a basic example to visually see how these files are structured.
14 |
15 | > NOTE: Actual `.cscn` files cannot host comments. They only exist here to provide pointers as to what is what at a glace.
16 |
17 | ```JSON
18 | {
19 | "Entities": [
20 | {
21 | "id": "Example Entity",
22 | "type": "MeshEntity",
23 | "trsnf": {
24 | "pos": [0,0,0],
25 | "scale": [0,0,0],
26 | "rotate": [0,0,0],
27 | },
28 | },
29 | //...
30 | ],
31 | "LevelData": [
32 | {
33 | // TODO: Create a system for level data (Most likely something like the source 2 mesh system?)
34 | },
35 | ]
36 | }
37 | ```
38 |
39 | # SceneInfo
40 | `TODO: Implement these values as support is added`
41 |
42 | # Entities
43 | The Entities property is used to store a hierarchical, order respecting list of entities inside of a scene. Each entity is placed into the list at the exact position that it's placed inside of the Editor's visual entities dock.
44 |
45 | The list below details the structure that makes up a given entity.
46 |
47 | |
--------------------------------------------------------------------------------
/docs/pages/filespec/texture-spec.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftablescience/ChiraEngine/ebb306844057a85d37f56b09002f02a5c0d4d894/docs/pages/filespec/texture-spec.md
--------------------------------------------------------------------------------
/docs/pages/reference/pluginapi.md:
--------------------------------------------------------------------------------
1 | # Editor Plugin API {#editpluginapi}
2 | This page contains a complete list of all methods, properties, etc. that are available to AngelScript for EditorPlugins.
3 | ## List of Methods
4 | | Method | Parameters | Description |
5 | |--------|------------|-------------|
--------------------------------------------------------------------------------
/docs/pages/reference/reference.md:
--------------------------------------------------------------------------------
1 | # Reference
2 | All documentation related to APIs for scripting and C++ Classes
3 |
4 | ------------------------
5 |
6 | - @subpage editpluginapi
--------------------------------------------------------------------------------
/docs/pages/tutorial/tutorial.md:
--------------------------------------------------------------------------------
1 | # Tutorials
2 | A complete list of all tutorials related to Chira Engine development.
3 |
4 | ------------------
5 | - @subpage createchiraengproj
--------------------------------------------------------------------------------
/engine/config/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | configure_file(${CMAKE_CURRENT_LIST_DIR}/generated/Config.h.in ${CMAKE_CURRENT_LIST_DIR}/generated/Config.h)
2 |
3 | list(APPEND CHIRA_ENGINE_HEADERS
4 | ${CMAKE_CURRENT_LIST_DIR}/ConEntry.h
5 | ${CMAKE_CURRENT_LIST_DIR}/Config.h)
6 |
7 | list(APPEND CHIRA_ENGINE_SOURCES
8 | ${CMAKE_CURRENT_LIST_DIR}/ConEntry.cpp
9 | ${CMAKE_CURRENT_LIST_DIR}/Config.cpp)
10 |
--------------------------------------------------------------------------------
/engine/config/Config.cpp:
--------------------------------------------------------------------------------
1 | #include "Config.h"
2 |
3 | #if defined(CHIRA_PLATFORM_APPLE) || defined(CHIRA_PLATFORM_LINUX)
4 | // Using std::ignore to absorb system()'s return value
5 | #include
6 | #endif
7 |
8 | #include
9 | #ifdef CHIRA_PLATFORM_WINDOWS
10 | #define WIN32_LEAN_AND_MEAN
11 | #include
12 | #include
13 | #else // Should work on any other platform besides Windows? macOS and Linux work at least
14 | #include
15 | #include
16 | #endif
17 | #include
18 |
19 | #include "ConEntry.h"
20 |
21 | using namespace chira;
22 |
23 | [[maybe_unused]]
24 | ConCommand open_config_dir{"open_config_dir", "Opens the config directory in the OS's graphical file browser.", [] {
25 | std::string dir = Config::getConfigDirectory().data();
26 | #if defined(CHIRA_PLATFORM_WINDOWS)
27 | ShellExecute(nullptr, "open", dir.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
28 | #elif defined(CHIRA_PLATFORM_APPLE)
29 | dir = "open " + dir;
30 | std::ignore = system(dir.c_str());
31 | #elif defined(CHIRA_PLATFORM_LINUX)
32 | dir = "xdg-open " + dir;
33 | std::ignore = system(dir.c_str());
34 | #else
35 | #error "fixme: need code for specific platform!"
36 | #endif
37 | }};
38 |
39 | std::string_view Config::getConfigDirectory() {
40 | // e.g. "C:\Users\\AppData\Local\ChiraEngine\"
41 | // this will not change while the program is running (or ever for that matter)
42 | static std::string pathString;
43 | if (!pathString.empty())
44 | return pathString;
45 |
46 | #ifndef CHIRA_PLATFORM_WINDOWS
47 | const char* homePath = getenv("HOME");
48 | if (!homePath) {
49 | if (passwd* pwd = getpwuid(getuid())) {
50 | homePath = pwd->pw_dir;
51 | }
52 | }
53 | pathString.append(homePath);
54 | #if defined(CHIRA_PLATFORM_APPLE)
55 | pathString.append("/Library/Application Support/ChiraEngine/");
56 | #elif defined(CHIRA_PLATFORM_LINUX)
57 | pathString.append("/.local/ChiraEngine/");
58 | #else
59 | #error "fixme: need code for specific platform!"
60 | #endif
61 | #else // We are on Windows
62 | // Get the environment variable for the user on Windows
63 | pathString = getenv("USERPROFILE");
64 | pathString.append(R"(\AppData\Local\ChiraEngine\)");
65 | #endif
66 | return pathString;
67 | }
68 |
69 | std::string Config::getConfigFile(std::string_view file) {
70 | return std::string{Config::getConfigDirectory()} + file.data();
71 | }
72 |
--------------------------------------------------------------------------------
/engine/config/Config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "generated/Config.h"
4 |
--------------------------------------------------------------------------------
/engine/config/generated/Config.h.in:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #define CHIRA_PROJECT_NAME "${PROJECT_NAME}"
7 |
8 | namespace chira::Config {
9 |
10 | [[nodiscard]] std::string_view getConfigDirectory();
11 | [[nodiscard]] std::string getConfigFile(std::string_view file);
12 |
13 | } // namespace chira::Config
14 |
--------------------------------------------------------------------------------
/engine/core/Assertions.cpp:
--------------------------------------------------------------------------------
1 | #include "Assertions.h"
2 |
3 | #include
4 | #include "Logger.h"
5 |
6 | #ifdef DEBUG
7 | #include
8 | #endif
9 |
10 | using namespace chira;
11 |
12 | CHIRA_CREATE_LOG(ASSERT);
13 |
14 | #ifdef CHIRA_USE_SOURCE_LOCATION
15 | void runtime_assert(bool shouldAssert, std::string_view message, const std::source_location& location) {
16 | runtime_assert_internal(shouldAssert, message, location.file_name(), location.line(), location.function_name());
17 | }
18 | #endif
19 |
20 | void runtime_assert_internal(bool shouldAssert, std::string_view message, const char* file, unsigned int line, const char* function) {
21 | // Assertions fail when false
22 | if (shouldAssert)
23 | return;
24 |
25 | auto assertMsg = std::string{"Assertion failed at "} + file + "::" + function + "::L" + std::to_string(line) + ":\n" + message.data();
26 | LOG_ASSERT.error(assertMsg);
27 |
28 | #ifdef DEBUG
29 | if (!chira::Device::popupChoice(assertMsg + "\n\nPress Break to break in debugger, Continue to continue.", "Assertion Failed", chira::Device::POPUP_ERROR, "Continue", "Break")) {
30 | chira::breakInDebugger();
31 | }
32 | #endif
33 | }
34 |
--------------------------------------------------------------------------------
/engine/core/Assertions.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include "Platform.h"
7 |
8 | #ifndef CHIRA_COMPILER_MSVC
9 | #include
10 | #endif
11 |
12 | // Have to do this crap pile because std::source_location can be unimplemented even if the header exists
13 | #if __has_include()
14 | #include
15 | // This macro is defined in if its implemented
16 | #ifdef __cpp_lib_source_location
17 | #define CHIRA_USE_SOURCE_LOCATION
18 | #endif
19 | #endif
20 |
21 | // Leave outside the Chira namespace so it can be conditionally replaced with a macro
22 | #ifdef CHIRA_BUILD_WITH_ASSERTS
23 | // (why did modern compilers not implement this??)
24 | #ifdef CHIRA_USE_SOURCE_LOCATION
25 | void runtime_assert(bool shouldAssert, std::string_view message, const std::source_location& location = std::source_location::current());
26 | #else
27 | #define runtime_assert(shouldAssert, message) runtime_assert_internal(shouldAssert, message, __FILE__, __LINE__, __FUNCTION__)
28 | #endif
29 | void runtime_assert_internal(bool shouldAssert, std::string_view message, const char* file, unsigned int line, const char* function);
30 | #else
31 | #define runtime_assert(shouldAssert, message)
32 | #endif
33 |
34 | namespace chira {
35 |
36 | template
37 | inline T assert_cast(auto obj) {
38 | #ifdef DEBUG
39 | if (!obj)
40 | return nullptr;
41 | auto cast = dynamic_cast(obj);
42 | runtime_assert(cast, "Object could not be cast");
43 | return cast;
44 | #else
45 | return static_cast(obj);
46 | #endif
47 | }
48 |
49 | inline void breakInDebugger() {
50 | #ifdef CHIRA_COMPILER_MSVC
51 | __debugbreak();
52 | #else
53 | std::raise(SIGINT);
54 | #endif
55 | }
56 |
57 | /// Thank you cppreference.com!
58 | /// This is a C++23 thing, std::unreachable, creates undefined behaviour
59 | [[noreturn]] inline void unreachable(std::string_view rationale = "Unreachable code reached!") {
60 | runtime_assert(false, rationale);
61 | #if defined(__cpp_lib_unreachable)
62 | std::unreachable();
63 | #elif defined(CHIRA_COMPILER_GNU) || defined(CHIRA_COMPILER_CLANG)
64 | __builtin_unreachable();
65 | #elif defined(CHIRA_COMPILER_MSVC) || defined(CHIRA_COMPILER_INTEL)
66 | __assume(false);
67 | #endif
68 | }
69 | #define CHIRA_NO_DEFAULT default: chira::unreachable("Hit the default case in a NO_DEFAULT switch!"); break
70 |
71 | } // namespace chira
72 |
--------------------------------------------------------------------------------
/engine/core/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | list(APPEND CHIRA_ENGINE_HEADERS
2 | ${CMAKE_CURRENT_LIST_DIR}/Assertions.h
3 | ${CMAKE_CURRENT_LIST_DIR}/CommandLine.h
4 | ${CMAKE_CURRENT_LIST_DIR}/Engine.h
5 | ${CMAKE_CURRENT_LIST_DIR}/Logger.h
6 | ${CMAKE_CURRENT_LIST_DIR}/Platform.h)
7 |
8 | list(APPEND CHIRA_ENGINE_SOURCES
9 | ${CMAKE_CURRENT_LIST_DIR}/CommandLine.cpp
10 | ${CMAKE_CURRENT_LIST_DIR}/Engine.cpp
11 | ${CMAKE_CURRENT_LIST_DIR}/Logger.cpp)
12 |
13 | if(CHIRA_BUILD_WITH_ASSERTS)
14 | list(APPEND CHIRA_ENGINE_SOURCES
15 | ${CMAKE_CURRENT_LIST_DIR}/Assertions.cpp)
16 | endif()
17 |
--------------------------------------------------------------------------------
/engine/core/CommandLine.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace chira::CommandLine {
6 |
7 | /// Initialization is only meant to happen once per program instantiation.
8 | void init(int argc, const char* argv[]);
9 |
10 | [[nodiscard]] bool has(std::string_view argument);
11 |
12 | [[nodiscard]] std::string_view get(std::string_view argument);
13 |
14 | [[nodiscard]] std::string_view getOr(std::string_view argument, std::string_view default_);
15 |
16 | [[nodiscard]] bool hasDefaultArgument();
17 |
18 | [[nodiscard]] std::string_view getDefaultArgument();
19 |
20 | [[nodiscard]] std::string_view getDefaultArgumentOr(std::string_view default_);
21 |
22 | [[nodiscard]] std::string_view getProgramName();
23 |
24 | } // namespace chira::CommandLine
25 |
--------------------------------------------------------------------------------
/engine/core/Engine.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | #include
8 | #include