{"id":31396284,"url":"https://github.com/onebit5/onetek-engine-2","last_synced_at":"2025-09-29T11:59:54.418Z","repository":{"id":316911080,"uuid":"1065311427","full_name":"Onebit5/OneTek-Engine-2","owner":"Onebit5","description":"C++ game engine with multi-API rendering support.","archived":false,"fork":false,"pushed_at":"2025-09-27T13:32:36.000Z","size":141,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-27T15:21:55.982Z","etag":null,"topics":["cpp","cpp20","engine","game","game-development","game-engine","gamedev","gameengine"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Onebit5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-27T13:20:10.000Z","updated_at":"2025-09-27T14:23:18.000Z","dependencies_parsed_at":"2025-09-27T15:22:00.015Z","dependency_job_id":"3cd62088-43c4-439d-b80a-9f784060bbf2","html_url":"https://github.com/Onebit5/OneTek-Engine-2","commit_stats":null,"previous_names":["onebit5/onetek-engine-2"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Onebit5/OneTek-Engine-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onebit5%2FOneTek-Engine-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onebit5%2FOneTek-Engine-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onebit5%2FOneTek-Engine-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onebit5%2FOneTek-Engine-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Onebit5","download_url":"https://codeload.github.com/Onebit5/OneTek-Engine-2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onebit5%2FOneTek-Engine-2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277510826,"owners_count":25830554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-29T02:00:09.175Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp20","engine","game","game-development","game-engine","gamedev","gameengine"],"created_at":"2025-09-29T11:59:48.897Z","updated_at":"2025-09-29T11:59:54.413Z","avatar_url":"https://github.com/Onebit5.png","language":"C++","readme":"# OneTek Engine 2\n\nC++ game engine with multi-API rendering support.\n\n## Features\n\n### Core Systems\n- **Multi-API Rendering**: Support for Vulkan, DirectX 12, and OpenGL\n- **Entity Component System**: Flexible game object architecture\n- **Physics Integration**: NVIDIA PhysX for realistic physics simulation\n- **Asset Pipeline**: Comprehensive asset loading and management\n- **Input System**: Cross-platform input handling via SDL2\n- **AI Navigation**: Recast \u0026 Detour integration for pathfinding\n- **GUI System**: Dear ImGui for development tools and debugging\n- **Audio System**: 3D spatial audio support\n- **Math Library**: Optimized vector, matrix, and quaternion operations\n\n### Rendering Features\n- Modern graphics pipeline with shader support\n- Material system with PBR support\n- Post-processing effects\n- Shadow mapping\n- Frustum culling\n- Level of Detail (LOD) system\n- Debug visualization tools\n\n### Platform Support\n- **Windows** (10/11)\n- **Linux** (Ubuntu 20.04+, Debian, Arch)\n- **macOS** (10.15+)\n\n## Dependencies\n\nThe engine relies on the following third-party libraries:\n\n| Library | Version | Purpose | Required |\n|---------|---------|---------|----------|\n| **SDL2** | 2.28.5+ | Window management, input | Yes |\n| **nlohmann_json** | 3.11.2+ | JSON configuration files | Yes |\n| **STB** | Latest | Image loading (header-only) | Yes |\n| **Assimp** | 5.3.1+ | 3D model loading | Yes |\n| **FreeType** | 2.13.2+ | Font rendering | Yes |\n| **Dear ImGui** | 1.90.1+ | Development GUI | Recommended |\n| **Vulkan SDK** | 1.3+ | Vulkan rendering | Optional |\n| **DirectX Headers** | Latest | DirectX 12 support | Optional (Windows) |\n| **PhysX** | 5.x | Physics simulation | Optional |\n| **Recast \u0026 Detour** | 1.6.0+ | AI navigation mesh | Optional |\n\n## Building the Engine\n\n### Prerequisites\n\n#### Build Tools\n- **CMake** 3.20 or higher\n- **C++20** compatible compiler:\n  - Windows: Visual Studio 2019+ or Clang 12+\n  - Linux: GCC 10+ or Clang 12+\n  - macOS: Xcode 12+ or Clang 12+\n- **Ninja** (recommended) or Make\n\n### Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/Onebit5/OneTek-Engine-2 OneTek-Engine-2\ncd OneTek-Engine-2\n\n# Create build directory\nmkdir build\ncd build\n\n# Configure with CMake\ncmake .. -DCMAKE_BUILD_TYPE=Release\n\n# Build\ncmake --build . --config Release -j8\n\n# Run example\n./bin/BasicExample\n```\n\n### Platform-Specific Instructions\n\n#### Windows (Visual Studio)\n\n```powershell\n# Configure for Visual Studio\ncmake -B build -G \"Visual Studio 16 2019\" -A x64\n\n# Build\ncmake --build build --config Release\n\n# Or open in Visual Studio\nstart build/OneTekEngine2.sln\n```\n\n#### Linux (Ubuntu/Debian)\n\n```bash\n# Install dependencies\nsudo apt update\nsudo apt install -y \\\n    build-essential cmake ninja-build \\\n    libsdl2-dev libfreetype6-dev libassimp-dev \\\n    nlohmann-json3-dev libvulkan-dev\n\n# Build\ncmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release\ncmake --build build\n```\n\n#### macOS\n\n```bash\n# Install dependencies via Homebrew\nbrew install cmake ninja sdl2 freetype assimp nlohmann-json\nbrew install --cask vulkan-sdk  # Optional\n\n# Build\ncmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release\ncmake --build build\n```\n\n### CMake Options\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `OTE_BUILD_EXAMPLES` | ON | Build example applications |\n| `OTE_BUILD_TESTS` | OFF | Build unit tests |\n| `OTE_USE_VULKAN` | ON | Enable Vulkan renderer |\n| `OTE_USE_DIRECTX12` | OFF | Enable DirectX 12 renderer (Windows) |\n| `OTE_ENABLE_PROFILING` | OFF | Enable performance profiling |\n| `OTE_STATIC_LINKING` | OFF | Use static linking |\n\nExample configuration:\n\n```bash\ncmake -B build \\\n    -DCMAKE_BUILD_TYPE=Release \\\n    -DOTE_BUILD_EXAMPLES=ON \\\n    -DOTE_USE_VULKAN=ON \\\n    -DOTE_USE_DIRECTX12=OFF\n```\n\n## Using the Engine\n\n### Basic Application\n\n```cpp\n#include \"Engine/OneTekEngine.h\"\n#include \u003cmemory\u003e\n\nusing namespace OneTek;\n\nclass MyGame : public Application {\npublic:\n    bool Initialize() override {\n        // Setup your game\n        return true;\n    }\n\n    void Update(float deltaTime) override {\n        // Update game logic\n    }\n\n    void Render() override {\n        // Render your scene\n    }\n\n    void Shutdown() override {\n        // Cleanup\n    }\n};\n\nint main() {\n    Engine engine;\n    \n    if (!engine.Initialize(\"config.json\")) {\n        return -1;\n    }\n    \n    auto game = std::make_unique\u003cMyGame\u003e();\n    engine.Run(std::move(game));\n    \n    return 0;\n}\n```\n\n### Configuration\n\nCreate an `engine.json` file to configure the engine:\n\n```json\n{\n    \"window\": {\n        \"title\": \"My Game\",\n        \"width\": 1920,\n        \"height\": 1080,\n        \"fullscreen\": false,\n        \"vsync\": true\n    },\n    \"renderer\": {\n        \"api\": \"vulkan\",\n        \"validation\": true,\n        \"msaa_samples\": 4\n    },\n    \"physics\": {\n        \"gravity\": [0.0, -9.81, 0.0],\n        \"fixed_timestep\": 0.016667\n    }\n}\n```\n\n## Project Structure\n\n```\nOneTek-Engine-2/\n├── Engine/                # Engine source code\n│   ├── Core/              # Core systems (Engine, Timer, Logger)\n│   ├── Renderer/          # Rendering system\n│   ├── Physics/           # Physics integration\n│   ├── Assets/            # Asset management\n│   ├── AI/                # AI and navigation\n│   ├── Audio/             # Audio system\n│   ├── Input/             # Input handling\n│   ├── GUI/               # ImGui integration\n│   ├── Math/              # Math library\n│   ├── Platform/          # Platform abstraction\n│   └── Utils/             # Utility functions\n├── Examples/              # Example applications\n├── Tests/                 # Unit tests\n├── Documentation/         # Detailed documentation\n├── ThirdParty/            # External dependencies\n└── Assets/                # Game assets\n```\n\n## Modifying the Engine\n\n### Adding a New System\n\n1. Create header and source files in appropriate directory:\n```cpp\n// Engine/MySystem/MySystem.h\n#pragma once\n\nnamespace OneTek {\nclass MySystem {\npublic:\n    bool Initialize();\n    void Update(float deltaTime);\n    void Shutdown();\n};\n}\n```\n\n2. Add to CMakeLists.txt:\n```cmake\ntarget_sources(OneTekEngine2 PRIVATE\n    MySystem/MySystem.cpp\n)\n```\n\n3. Integrate with Engine class:\n```cpp\n// Engine/Core/Engine.cpp\n#include \"MySystem/MySystem.h\"\n\nbool Engine::Initialize() {\n    m_mySystem = std::make_unique\u003cMySystem\u003e();\n    return m_mySystem-\u003eInitialize();\n}\n```\n\n### Extending the Renderer\n\nTo add support for a new rendering API:\n\n1. Create API-specific implementation in `Engine/Renderer/[API]/`\n2. Inherit from base classes (RenderDevice, RenderContext, etc.)\n3. Add CMake configuration option\n4. Update RenderDevice initialization logic\n\n### Custom Assets\n\nTo support new asset types:\n\n1. Create loader in `Engine/Assets/Loaders/`\n2. Register with AssetManager\n3. Define asset data structure\n4. Implement loading/unloading logic\n\n## Examples\n\nThe engine includes several example projects:\n\n| Example | Description |\n|---------|-------------|\n| **BasicExample** | Minimal engine setup and rendering |\n| **SimpleExample** | SDL window with 3D math demonstrations |\n| **DirectXRenderExample** | DirectX 12 rendering pipeline |\n| **VulkanRenderExample** | Vulkan rendering with colored triangle |\n\nBuild and run examples:\n\n```bash\n# Build all examples\ncmake --build build --target BasicExample\n\n# Run\n./build/bin/BasicExample\n```\n\n## Documentation\n\nDetailed documentation is available in the `Documentation/` directory:\n\n- **[Architecture.md](Documentation/Architecture.md)** - System design and architecture\n- **[Building.md](Documentation/Building.md)** - Detailed build instructions\n- **[Rendering.md](Documentation/Rendering.md)** - Rendering system documentation\n- **[Physics.md](Documentation/Physics.md)** - Physics integration guide\n- **[Assets.md](Documentation/Assets.md)** - Asset pipeline documentation\n\n## Testing\n\nRun the test suite:\n\n```bash\n# Build tests\ncmake -B build -DOTE_BUILD_TESTS=ON\ncmake --build build\n\n# Run tests\ncd build\nctest --output-on-failure\n```\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Follow the existing code style (use clang-format)\n4. Add tests for new functionality\n5. Update documentation as needed\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Open a Pull Request\n\n### Code Style\n\n- Use modern C++ features (C++20)\n- Follow RAII principles\n- Prefer `std::unique_ptr` for ownership\n- Use `#pragma once` for header guards\n- Document public APIs\n\n## Performance Tips\n\n- **Debug vs Release**: Always build in Release mode for performance testing\n- **Profiling**: Enable `OTE_ENABLE_PROFILING` to identify bottlenecks\n- **Batching**: Minimize draw calls by batching similar objects\n- **LOD**: Use Level of Detail system for distant objects\n- **Culling**: Frustum culling is automatic, ensure bounding boxes are correct\n\n## Troubleshooting\n\n### Common Issues\n\n**CMake can't find dependencies**\n- Ensure all required libraries are installed\n- Set environment variables (e.g., `VULKAN_SDK`)\n- Use vcpkg or package manager for dependency management\n\n**Linker errors**\n- Check that all dependencies are built with the same compiler\n- Verify CMake found all libraries correctly\n- Ensure matching runtime libraries (Debug/Release)\n\n**Vulkan validation errors**\n- Install Vulkan SDK with validation layers\n- Set `VK_LAYER_PATH` environment variable\n- Check GPU driver compatibility\n\n**Performance issues**\n- Build in Release mode (`-DCMAKE_BUILD_TYPE=Release`)\n- Disable validation in production\n- Profile with appropriate tools (RenderDoc, NSight, etc.)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- **NVIDIA** for PhysX physics engine\n- **Khronos Group** for Vulkan specifications\n- **SDL** contributors for cross-platform windowing\n- **Dear ImGui** for the immediate mode GUI library\n- **Assimp** team for 3D model loading\n- All open-source contributors\n\n## Contact\n\n- **GitHub Issues**: For bug reports and feature requests\n- **Discussions**: For questions and community support\n\n---\n\nBuilt with ❤️ by Onebit\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonebit5%2Fonetek-engine-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonebit5%2Fonetek-engine-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonebit5%2Fonetek-engine-2/lists"}