Skip to content

Commit

Permalink
Update ImGui + Docking
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraVoves committed Mar 31, 2024
1 parent f42f021 commit 808f8df
Show file tree
Hide file tree
Showing 45 changed files with 639 additions and 2,335 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text

*.zig text eol=lf

Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ zig-out

# VSCode

# csharp
/bindings/cs/c2cs/ast
/bindings/cs/c2cs/cross-platform-ast.json
/**/Generated

# MacOS
*.DS_Store
.DS_Store

kcov-output/

imgui.ini
!**/default/imgui.ini

_static.zig

Expand Down
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0-a1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Yet another experimental game engine but now in [zig](https://ziglang.org).

## Credits/Licenses For Fonts Included In Repository

Some fonts files are available in the `src/private/fonts` folder:
Some fonts files are available in the `src/private/embed/fonts/` folder:

- **[Roboto-Medium.ttf](https://fonts.google.com/specimen/Roboto)** - Apache License 2.0
- **[fa-solid-900.ttf](https://fontawesome.com)** - SIL OFL 1.1 License
Expand Down
8 changes: 3 additions & 5 deletions Writerside/cetech1.tree
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">

<instance-profile id="cetech1"
name="CETech1"
start-page="about.md">
name="CETech1"
start-page="about.md">

<toc-element topic="about.md">
</toc-element>
<toc-element topic="getting-started.md">
</toc-element>
<toc-element topic="CHANGELOG.md"/>
<toc-element topic="manual.md">
<toc-element topic="repository-structure.md"/>
<toc-element topic="core.md">
<toc-element topic="kernel.md"/>
<toc-element topic="apidb.md"/>
Expand All @@ -20,6 +20,4 @@
</toc-element>
<toc-element topic="editor.md"/>
</toc-element>
<toc-element topic="CHANGELOG.md">
</toc-element>
</instance-profile>
4 changes: 4 additions & 0 deletions Writerside/redirection-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
<accepts>page.html</accepts>
</rule>
-->
<rule id="50dc2758">
<description><![CDATA[Created after removal of "<repository-structure.md>" from CETech1]]></description>
<accepts>repository-structure.html</accepts>
</rule>
</rules>
2 changes: 1 addition & 1 deletion Writerside/snippets/getting-started/run_steamdeck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
zig-out/bin/cetech1_test && zig-out/bin/cetech1 --asset-root fixtures/test_asset/

# Standalone
zig-out/bin/cetech1_test && zig-out/bin/cetech1 --fullscreen --asset-root fixtures/test_asset/
zig-out/bin/cetech1 --fullscreen --asset-root fixtures/test_asset/
35 changes: 30 additions & 5 deletions Writerside/topics/about.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
# About

[CETech1](https://github.com/cyberegoorg/cetech1) is experimental game engine write in awesome language named [zig](https://ziglang.org).
Some core features like [AsseDB](assetdb.md), [CDB](cdb.md) and [ApiDB](apidb.md) is based on BitSquid/OurMachinery blog posts.
[CETech1](https://github.com/cyberegoorg/cetech1) is experimental game engine write in awesome language
named [zig](https://ziglang.org).
Some core features like [AsseDB](assetdb.md), [CDB](cdb.md) and [ApiDB](apidb.md) is based on BitSquid/OurMachinery blog
posts.

## Goals

- Small reusable blocks that you can combine for what your project need. This is opposite to engine like Unreal, Unity etc.
- Zero-work editor UI for new asset/data types. You can start with automatic-default and customize it later on your needed.
- Small reusable blocks that you can combine for what your project need. This is opposite to engine like Unreal, Unity
etc.
- Zero-work editor UI for new asset/data types. You can start with automatic-default and customize it later on your
needed.
- Fast iteration on ideas by hot-reload assets and code.
- Multiplatform runtime + editor
- Hackable
- And one day real game using this technology ;)

## Plan

### 0.1.0 - Core (WIP)

- Basic concept for core (Assets, CDB, Window, Input, UI)
- Support for modules with hot-reload
- Supported platforms `macOS`, `linux/steamdeck`, `windows`
- Editor basic concept
- Localization for UI/Editor
- Automatic test for UI
- Unittest

### 0.2.0 - Modules (Future)

- ECS
- Rendering
- Physics
- Actions (HL concept for Input)
- ...

## Credits/Licenses For Fonts Included In Repository

Some fonts files are available in the `src/private/fonts` folder:
Some fonts files are available in the `src/private/embed/fonts/` folder:

- **[Roboto-Medium.ttf](https://fonts.google.com/specimen/Roboto)** - Apache License 2.0
- **[fa-solid-900.ttf](https://fontawesome.com)** - SIL OFL 1.1 License
Expand Down
36 changes: 24 additions & 12 deletions Writerside/topics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@
</tab>
</tabs>

## Repository structure

| Folder | Description |
|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| [`Writerside/`](https://github.com/cyberegoorg/cetech1/tree/main/Writerside/) | This documentation |
| [`zig/`](https://github.com/cyberegoorg/cetech1/tree/main/zig/) | Submodule for prebuilt zig |
| [`externals/`](https://github.com/cyberegoorg/cetech1/tree/main/externals/) | 3rd-party library and tools |
| [`fixtures/`](https://github.com/cyberegoorg/cetech1/tree/main/fixtures/) | Tests fixtures |
| [`src/includes/`](https://github.com/cyberegoorg/cetech1/tree/main/src/includes/) | C api headers |
| [`src/`](https://github.com/cyberegoorg/cetech1/tree/main/src) | Main source code folder |
| [`src/private`](https://github.com/cyberegoorg/cetech1/tree/main/src/private) | Private api. Use only if you extend core |
| [`modules/`](https://github.com/cyberegoorg/cetech1/tree/main/modules/) | There is all modules that is possible part of engine |
| [`examples/foo`](https://github.com/cyberegoorg/cetech1/tree/main/examples/foo) | Simple `foo` module write in zig |
| [`examples/bar`](https://github.com/cyberegoorg/cetech1/tree/main/examples/bar) | Simple `bar` module write in C and use api exported by `foo` module |
| [`examples/editor_foo_tab`](https://github.com/cyberegoorg/cetech1/tree/main/examples/editor_foo_tab) | Show how to crete new editor tab type |

## Build

<tabs>
Expand Down Expand Up @@ -108,13 +124,21 @@ CETech1 has builtin support for tracy profiler.

## ZLS

CETech provide ZLS as submodule, but you must build it.

<tabs>
<tab title="MacOS/Linux">
<code-block lang="bash">
cd externals/shared/tools/zls
../../../../zig/bin/ARCH/zig build
</code-block>
</tab>
<tab title="Windows">
<code-block lang="bash">
cd externals/shared/tools/zls
../../../../zig/bin/ARCH/zig.exe build
</code-block>
</tab>
</tabs>

## VSCode
Expand All @@ -126,15 +150,3 @@ CETech1 has builtin support for tracy profiler.
3. Set zig path to `<FULL_PATH_TO_CETECH_REPO>/zig/bin/<ARCH>/zig`
4. Set zls path to `<FULL_PATH_TO_CETECH_REPO>/externals/shared/tools/zls/zig-out/bin/zls`

## Docker compose

> Currently, not usable
> {style="warning"}
You must fetch valid zig version for container `ARCH` via `./zig/get_zig.sh <ARCH>`

<tabs>
<tab title="MacOS/Linux">
<code-block lang="bash">docker compose run --service-ports cetech1-linux</code-block>
</tab>
</tabs>
4 changes: 1 addition & 3 deletions Writerside/topics/manual/core.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Core

Core is atomic part of CETech1 and provide basic functionality.


Core is atomic part of CETech1 and provide basic functionality.
8 changes: 5 additions & 3 deletions Writerside/topics/manual/core/apidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Main mechanism to use/export api and interfaces across app.
## Why

1. Primary solve problem for dynamic loading modules to find correct api without need to be compiled with engine.
2. Second reason is if API/Interface provide C compatible API you can use it for [FFI](https://en.wikipedia.org/wiki/Foreign_function_interface).
This mean you can write module in any language that can import/export C ABI compatible binary and use it with engine.
3. To support module hot-reload we need some mechanism to define variable that can survive hot-reload of module. (internally we use heap allocated variable)
2. Second reason is if API/Interface provide C compatible API you can use it
for [FFI](https://en.wikipedia.org/wiki/Foreign_function_interface).
This mean you can write module in any language that can import/export C ABI compatible binary and use it with engine.
3. To support module hot-reload we need some mechanism to define variable that can survive hot-reload of module. (
internally we use heap allocated variable)

## API

Expand Down
2 changes: 1 addition & 1 deletion Writerside/topics/manual/core/assetdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Reserved keyword begin with`__` prefix and some with `__` postfix after property
Reference UUID is in format `cdb_type_name:UUID`.

| Keyword | Required | Description |
|---------------------------| --------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|---------------------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| `__version` | Yes | File format version in semver format |
| `__asset_uuid` | Only for top-level | UUID for asset wrapper not asset object |
| `__description` | No and allowed only for top-level | Descritption for asset |
Expand Down
3 changes: 3 additions & 0 deletions Writerside/topics/manual/editor/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
## Gamepad navigation

### Xbox/SteamDeck

![ImGUI_Xbox.png](ImGUI_Xbox.png){ width="450" thumbnail="true" }

### PS4

![ImGUI_PS4.png](ImGUI_PS4.png){ width="450" thumbnail="true" }

### Switch

![ImGUI_Switch.png](ImGUI_Switch.png){ width="450" thumbnail="true" }
15 changes: 0 additions & 15 deletions Writerside/topics/manual/repository-structure.md

This file was deleted.

Loading

0 comments on commit 808f8df

Please sign in to comment.