Skip to content

Commit b584102

Browse files
Add IntricateEngine docs, CI changes, theme changes & zero warnings. (#1)
* Update copyright * Add all docs from IntricateEngine * Create .editorconfig * Update ci.yml - Use pip with requirements.txt file. - Invalidate cache on hash of requirements.txt modified. * Zero warnings * Re-enable mkdocs nav * Adjust fonts & color palette * Add search.share feature
1 parent 9218ef6 commit b584102

File tree

16 files changed

+938
-25
lines changed

16 files changed

+938
-25
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Windows-Style newlines with a newline ending every file
7+
[*]
8+
end_of_line = crlf
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 4
12+
tab_width = 4
13+
trim_trailing_whitespace = true
14+
charset = utf-8
15+
curly_bracket_next_line = true
16+
17+
# Preserve whitespace for Markdown
18+
[*.md]
19+
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1-
name: ci
1+
name: ci
22
on:
33
push:
44
branches:
5-
- master
5+
- master
66
- main
7+
78
permissions:
89
contents: write
10+
911
jobs:
1012
deploy:
1113
runs-on: ubuntu-latest
1214
steps:
1315
- uses: actions/checkout@v4
16+
1417
- name: Configure Git Credentials
1518
run: |
1619
git config user.name github-actions[bot]
1720
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21+
1822
- uses: actions/setup-python@v5
1923
with:
2024
python-version: 3.x
21-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
25+
2226
- uses: actions/cache@v4
2327
with:
24-
key: mkdocs-material-${{ env.cache_id }}
2528
path: .cache
29+
key: mkdocs-material-${{ hashFiles('requirements.txt') }}
2630
restore-keys: |
2731
mkdocs-material-
28-
- run: pip install mkdocs-material
29-
- run: mkdocs gh-deploy --force
32+
33+
- run: pip install --upgrade pip
34+
- run: pip install -r requirements.txt
35+
- run: mkdocs gh-deploy --force

docs/page2.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/philosophy.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Engineering Philosophy
2+
3+
This document outlines the core principles guiding how we design, implement, and maintain software.
4+
5+
---
6+
7+
## Core Values
8+
### **Explicit is always better than implicit**
9+
> Code should leave no room for assumptions. Always favor clarity over cleverness.
10+
11+
### **Descriptive naming is better than short-hand**
12+
> Names should describe what something does or represents, even if it means typing more.
13+
14+
### **Consistency is king**
15+
> Inconsistent code is harder to maintain than slow code. Matching the existing code style is crucial.
16+
17+
### **Fail fast and prefer early returns over deeply nested conditionals**
18+
> Guard against invalid states and exit as soon as a failure is detected. This keeps code flat and easy to follow.
19+
20+
### **Test edge-cases early**
21+
> If a function can fail, make it fail during development, not in production. Use assertions, debug-only checks and logging generously.
22+
23+
### **Prioritize runtime performance**
24+
> Every design choice should consider its impact on real-time execution. Performance is not an afterthought — it's a primary goal.
25+
26+
### **Optimize, optimize, optimize**
27+
> Focus optimization efforts on performance-critical and hot code-paths, but keep non-critical code readable and maintainable.
28+
29+
### **Minimal state, maximal clarity**
30+
> Avoid unnecessary shared or mutable state. Favor local variables and or shared immutability where possible (const-correctness is key)
31+
32+
### **Be predictable and deterministic**
33+
> Code should behave as expected without surprises. Avoid magic literals, hidden side-effects, and undocumented behavior.
34+
35+
### **Zero-cost abstractions**
36+
> Abstractions must not add any runtime overhead. If it costs extra, it must be justified by a measurable benefit.
37+
38+
### **Avoid clever one-liners**
39+
> Readability trumps cleverness. If a trick saves a few keystrokes but hides intent, don't use it.
40+
41+
### **Never nest**
42+
> Nesting types is the root of all evil, unless its kept private or its a small configuration struct.
43+
44+
### **Never ever use snake case**
45+
> we_really_really_hate_snake_case.
46+
47+
### **Quality through iteration**
48+
> Improvements are driven by feedback, peer review, and refactoring.
49+
50+
---
51+
52+
## Decision Considerations
53+
When making engineering or architectural decisions, consider:
54+
1. **The impact on readability and maintenance**
55+
2. **Alignment with existing architecture and standards**
56+
3. **Technical trade-offs and future implications considering the project's roadmap**
57+
4. **Risk, complexity, scalability, and testing cost**
58+
59+
---
60+
61+
## Software Expectations
62+
- Code must be testable and demonstrably correct.
63+
- Peer-review is strongly encouraged.
64+
- Documentation accompanies new systems or architectural decisions.
65+
- Breaking code may **not** be committed to the `master` branch.
66+
67+
---
68+
69+
## Continuous Improvement
70+
Intricate Dev Team's standards are updated as our needs evolve Suggestions for changes are welcome and should be proposed appropriately and discussed collaboratively.
71+
72+
---
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Build Configurations
2+
3+
This document lists all of Intricate's build configurations and their intended purposes.
4+
5+
---
6+
7+
## Configurations
8+
9+
Intricate has `4` different build configurations which can be selected from inside **Visual Studio**.
10+
11+
| Configuration | Symbols | Optimizations | Runtime | Console | Asserts | Logging | Profiling | Defines |
12+
|---------------|---------|---------------|---------|---------|----------|-----------|-----------|-----------------|
13+
| Debug | On | Off | Debug | Visible | Enabled | All | Disabled | `_IE_DEBUG` |
14+
| Dev | On | On | Release | Visible | Enabled | All | Disabled | `_IE_DEV` |
15+
| Profiling | Off | On | Release | Visible | Enabled | All | Enabled | `_IE_PROFILING` |
16+
| Release | Off | On | Release | Hidden | Disabled | File only | Disabled | `_IE_RELEASE` |
17+
18+
> **NOTE**: Intricate targets the `x86_64` architecture only.
19+
20+
**When to use each configuration:**
21+
- **Debug:** When you need breakpoints, stack traces, hunting memory leaks and or external debug symbols.
22+
- Performance in this configuration is **significantly slower** than in **Dev** and **Release**.
23+
- **Dev:** For everyday general development and testing.
24+
- This is the configuration that should be used for `98.992%` of development.
25+
- **Profiling:** When something is running unusually slow and you need to figure out which function is the culprit.
26+
- This configuration measures the time taken for each function to execute when called and throws the results into a series of **JSON** files which can be viewed in your browser's **tracing** tool. (e.g. <chrome://tracing> or <brave://tracing>)
27+
- Performance in this configuration is **massively slower** than in all the others due to the overhead of profiling.
28+
- **Release:** For official distribution. (note that a `5th` configuration named **"Dist""** may soon be added)
29+
30+
---

docs/project/ide-requirements.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# IDE Requirements
2+
3+
This document specifies the *Integrated Development Environment* (IDE) requirements for development on Intricate.
4+
5+
---
6+
7+
## IDE
8+
Intricate development requires **Microsoft Visual Studio 2022 or newer**. A secondary text editor may also be used with **Visual Studio**, but should **not replace it**. Suggested secondary text editors are:
9+
- VS Code
10+
- Sublime
11+
- Vim (DOS mode)
12+
- Neovim (DOS mode)
13+
14+
Intricate uses [.editorconfig](https://editorconfig.org/) to enforce code-styling. For any other text editors, please ensure that they support **.editorconfig** before using them. For **VS Code**, this extension should be used: [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig).
15+
16+
---
17+
18+
## Visual Studio Requirements
19+
20+
The following **Visual Studio** workloads are required:
21+
- **.NET desktop development**
22+
- **Desktop development with C++**
23+
- **Python development** (optional)
24+
25+
The following **Visual Studio** individual components are required:
26+
- **.NET**
27+
- .NET 10.0 Runtime
28+
- .NET SDK
29+
- **Code tools**
30+
- NuGet package manager
31+
- NuGet targets and build tasks
32+
- **Compilers, build tools, and runtimes**
33+
- Incredibuild - Build Acceleration
34+
- **SDKs, libraries and frameworks**
35+
- Windows 11 SDK (latest)
36+
- Windows Performance Toolkit
37+
- Windows Universal C Runtime
38+
39+
> **Note:** Some of the individual components listed above may already be included by the selected workloads. Ensure they are all installed in the **Visual Studio Installer**.
40+
41+
---
42+
43+
## Recommended VS Code Extensions
44+
45+
- [C/C++ Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack)
46+
- [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit)
47+
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
48+
- [Lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
49+
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
50+
- [Shader languages support for VS Code](https://marketplace.visualstudio.com/items?itemName=slevesque.shader)
51+
- [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
52+
53+
---

docs/project/index.md

Whitespace-only changes.

docs/project/setup.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Setup
2+
3+
This document serves as a guide on how to setup Intricate after cloning.
4+
5+
---
6+
7+
## Prerequisites
8+
9+
- Intricate must be **recursively cloned** to properly pull all the required submodules.
10+
- Intricate uses [Premake5](https://premake.github.io/) as its build system.
11+
12+
## How To Setup
13+
- Run the setup script `Setup.py`, which will validate and or install the required versions of **Python**, **.NET** and the **Vulkan SDK**.
14+
- You may have to run the script multiple times and or restart your computer as prompted by the script for all the required environment variables to be properly registered.
15+
- Once all this is done, the script will call the `GenerateVS.py` script which then uses Premake to generate all projects files targetting **Visual Studio 2022**.
16+
17+
**Required environment variables:**
18+
- Python must be added to `PATH`
19+
- `DOTNET_ROOT`: path to the root of the installed .NET runtime.
20+
- `VULKAN_SDK`: path to the root of the installed Vulkan SDK.
21+
- `VK_SDK_PATH`: synonym for `VULKAN_SDK`.
22+
23+
> **NOTE**: These variables will be automatically registered by the setup script however, in the event that the script fails to register them, you will need to do so manually!
24+
25+
---
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# System Requirements
2+
3+
This document outlines the minimum and recommended system specifications required to build and run Intricate.
4+
5+
---
6+
7+
## Supported Operating Systems
8+
9+
Intricate only runs on **Windows 10 and 11**.
10+
11+
---
12+
13+
## Hardware Requirements
14+
15+
| Component | Minimum | Recommended |
16+
|----------------|----------------------------------|----------------------------------|
17+
| CPU | Quad-core 2.0 GHz | 6+ cores, 3.0+ GHz, modern gen |
18+
| RAM | 8 GB | 16+ GB |
19+
| GPU | Any GPU with Vulkan 1.3 support | Discrete GPU with 4+ GB VRAM |
20+
| Storage | 20 GB free disk space | - |
21+
| Display | 1080p | 1440p or higher |
22+
23+
---
24+
25+
## Software Requirements
26+
27+
- **Git 2.5** (Windows) or newer
28+
- **GitHub Desktop**
29+
- **Python 3.12** or newer
30+
- **Vulkan SDK 1.3.216**
31+
- **DirectX 11 & 12**
32+
33+
See [ide-requirements](ide-requirements.md) for more requirements.
34+
35+
---

docs/style/comments.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Comments
2+
3+
This section outlines the conventions used for writing comments in code.
4+
5+
---
6+
7+
## Comment Structure
8+
9+
**General format of a comment:**
10+
11+
``` C++
12+
// <COMMENT_TAG>([optional metadata]): <short imperative summary>
13+
```
14+
15+
**Rules:**
16+
- Always include a space between the comment symbol (`//`) and the start of the comment text.
17+
- Write comments in **imperative mood** to keep phrasing concise and action-oriented. (Example: *"Validate session token" instead of "Validating session token" or "This validates the session token."*)
18+
19+
**Metadata formatting:**
20+
21+
When including metadata, list multiple elements as **comma-separated values** without spaces.
22+
23+
Example:
24+
``` C++
25+
// FIXME(Adam,medium): These allocations are leaking memory and need to be fixed!
26+
```
27+
28+
---
29+
30+
## Comment Tags
31+
32+
| Tag | Metadata | Usage | Example |
33+
|---------------|---------------|--------------------------------------------|---------------------------------------------|
34+
| **TODO** | author | Identify work that still needs to be completed. | `// TODO(Hasan): Pass params by const-reference here` |
35+
| **FIXME** | author, severity(low\|medium\|high) | Identify code known to be broken or incorrect. | `// FIXME(Adam,medium): Need to fix this line` |
36+
| **NOTE** | - | Document reasoning, context, or non-obvious design decisions. | `// NOTE: This field is required by the Renderer` |
37+
| **INVARIANT** | - | Document assertion conditions that must always be true. | `// INVARIANT: Vector3 index must be in range [0,2]` |
38+
| **REVIEW** | requested-reviewer | Request a review on a specific line or block. | `// REVIEW(Azaam): Should these fields be lazily-allocated?` |
39+
| **DEPRECATED** | as-of-date(dd/mm/yyyy) | Mark an API or function as deprecated. | `// DEPRECATED(19/06/2025): Replaced this function with Foo()` |
40+
| **WTF** | - | Identify confusing or unexpected behavior requiring investigation. *(Use sparingly.)* | `// WTF: Behavior differs between debug and release builds` |
41+
42+
---
43+
44+
## Discouraged Comment Styles
45+
46+
Avoid the following patterns:
47+
48+
``` C++
49+
// This code makes no sense
50+
```
51+
52+
``` C++
53+
// Fix this later
54+
```
55+
56+
> **Note**: This pattern may be used for documenting private/internal members as well as non-obvious code behavior inside methods.
57+
58+
Instead, prefer tagged comments with clear, traceable meaning:
59+
60+
``` C++
61+
// FIXME(Muddathir,high): Investigate undefined behavior when size < capacity
62+
```
63+
64+
``` C++
65+
// NOTE: Uses std::launder due to ABI assumptions in external library
66+
```

0 commit comments

Comments
 (0)