Skip to content

#1 Engine Decoupling Phase 1 - Interface implementation#11

Merged
JohnLudlow merged 19 commits intomainfrom
1-phase-1-interfacedev-2
Apr 21, 2026
Merged

#1 Engine Decoupling Phase 1 - Interface implementation#11
JohnLudlow merged 19 commits intomainfrom
1-phase-1-interfacedev-2

Conversation

@JohnLudlow
Copy link
Copy Markdown
Owner

@JohnLudlow JohnLudlow commented Apr 21, 2026

PR Title

Project : https://github.com/users/JohnLudlow/projects/7
Issue : Resolves #1

PR Overview

Resolves #1 by implementing basic interfaces

PR Detail

Detailed description of the PR's technical implementation

PR Impact

Detailed description of the PR's impact on use, in particular any breaking changes.

Use GitVersion semver flags to indicate a major or minor increment.

PR Size justification

[pr-size-override]

Initial commit is often large

John Ludlow added 5 commits April 11, 2026 18:17
- Implement tests for EngineCapabilities, EngineConfig, and HeadlessAdapter to ensure proper construction and functionality.
- Add tests for asset loading and management in HeadlessAssetLoader and HeadlessAssetProvider.
- Create tests for audio playback functionality in HeadlessAudioPlayer.
- Validate rendering commands in HeadlessRenderProvider with tests for sprite, text, and mesh submissions.
- Introduce tests for input handling in HeadlessInputProvider.
- Ensure proper functionality of DTOs (Data Transfer Objects) including MaterialDto, MeshDrawDto, SpriteDrawDto, TextDrawDto, and TransformDto.
- Add tests for the TestAdapter to verify recorded calls and delegation to inner providers.
@JohnLudlow JohnLudlow self-assigned this Apr 21, 2026
@JohnLudlow JohnLudlow added area-lib Items related to reusable libraries area-actions Items related to Github Actions labels Apr 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the initial engine-adapter contract surface (Core interfaces + DTOs) and adds headless/test implementations, plus translator tests and a BenchmarkDotNet benchmark project to validate mapping patterns and measure translation performance.

Changes:

  • Added GameEngineAdapter.Core contract project (interfaces, DTOs, capabilities/config models).
  • Added GameEngineAdapter.Headless implementations + deterministic runner and TestAdapter.
  • Added extensive unit tests, translator-style tests, and a benchmark project; enabled benchmark job in CI.

Reviewed changes

Copilot reviewed 64 out of 66 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/GameEngineAdapter/Program.cs Removes placeholder console app entrypoint.
src/GameEngineAdapter.UnitTests/UnitTest1.cs Removes placeholder test class.
src/GameEngineAdapter.UnitTests/Translator/TranslatingRenderProviderTests.cs Adds translator tests validating DTO→backend call mapping.
src/GameEngineAdapter.UnitTests/Translator/TranslatingRenderProvider.cs Adds test-only translating provider implementation.
src/GameEngineAdapter.UnitTests/Translator/RecordingFakeRenderBackend.cs Adds recording fake backend for translator assertions.
src/GameEngineAdapter.UnitTests/Translator/IFakeRenderBackend.cs Defines fake render backend contract for translator tests.
src/GameEngineAdapter.UnitTests/TransformDtoTests.cs Adds value/storage tests for TransformDto.
src/GameEngineAdapter.UnitTests/TextDrawDtoTests.cs Adds value/storage tests for TextDrawDto.
src/GameEngineAdapter.UnitTests/TestAdapterTests.cs Adds tests for TestAdapter delegation/recording.
src/GameEngineAdapter.UnitTests/SpriteDrawDtoTests.cs Adds value/storage tests for SpriteDrawDto.
src/GameEngineAdapter.UnitTests/RecordedCallTests.cs Adds tests for RecordedCall DTO.
src/GameEngineAdapter.UnitTests/MeshDrawDtoTests.cs Adds value/storage tests for MeshDrawDto.
src/GameEngineAdapter.UnitTests/MaterialDtoTests.cs Adds value/storage tests for MaterialDto.
src/GameEngineAdapter.UnitTests/HeadlessRenderProviderTests.cs Adds tests for headless render command recording.
src/GameEngineAdapter.UnitTests/HeadlessInputProviderTests.cs Adds tests for scripted headless input state.
src/GameEngineAdapter.UnitTests/HeadlessEngineCapabilitiesTests.cs Adds tests for HeadlessEngineCapabilities.
src/GameEngineAdapter.UnitTests/HeadlessAudioPlayerTests.cs Adds tests for headless audio call recording.
src/GameEngineAdapter.UnitTests/HeadlessAssetProviderTests.cs Adds tests for in-memory asset cache behavior.
src/GameEngineAdapter.UnitTests/HeadlessAssetLoaderTests.cs Adds tests for stub asset loader behavior.
src/GameEngineAdapter.UnitTests/HeadlessAdapterTests.cs Adds tests for headless adapter wiring/lifecycle.
src/GameEngineAdapter.UnitTests/GameEngineAdapter.UnitTests.csproj Sets root namespace and adds project references to Core/Headless.
src/GameEngineAdapter.UnitTests/EngineConfigTests.cs Adds tests for EngineConfig DTO.
src/GameEngineAdapter.UnitTests/EngineCapabilitiesTests.cs Adds tests for EngineCapabilities DTO.
src/GameEngineAdapter.UnitTests/DeterministicEngineRunnerTests.cs Adds tests for deterministic runner skeleton.
src/GameEngineAdapter.UnitTests/CameraDescriptorTests.cs Adds tests for CameraDescriptor.
src/GameEngineAdapter.Headless/TestAdapter.cs Adds CI-oriented adapter wrapper that records lifecycle calls.
src/GameEngineAdapter.Headless/RecordedCall.cs Adds call-recording DTO for assertions.
src/GameEngineAdapter.Headless/HeadlessUserInterfaceProvider.cs Adds placeholder headless UI provider implementation.
src/GameEngineAdapter.Headless/HeadlessRenderProvider.cs Adds headless render provider that records submissions.
src/GameEngineAdapter.Headless/HeadlessInputProvider.cs Adds scripted, deterministic input provider.
src/GameEngineAdapter.Headless/HeadlessAudioPlayer.cs Adds headless audio player that records operations.
src/GameEngineAdapter.Headless/HeadlessAssetProvider.cs Adds in-memory asset provider with stub loader.
src/GameEngineAdapter.Headless/HeadlessAssetLoader.cs Adds stub loader returning placeholder assets.
src/GameEngineAdapter.Headless/HeadlessAdapter.cs Adds headless adapter implementing the core contract.
src/GameEngineAdapter.Headless/GameEngineAdapter.Headless.csproj Introduces headless project targeting net10.0.
src/GameEngineAdapter.Headless/DeterministicEngineRunner.cs Adds deterministic runner skeleton (seed/timestep).
src/GameEngineAdapter.Core/TransformDto.cs Introduces transform DTO contract.
src/GameEngineAdapter.Core/TextDrawDto.cs Introduces text draw DTO contract.
src/GameEngineAdapter.Core/SpriteDrawDto.cs Introduces sprite draw DTO contract.
src/GameEngineAdapter.Core/MeshDrawDto.cs Introduces mesh draw DTO contract.
src/GameEngineAdapter.Core/MaterialDto.cs Introduces material DTO contract.
src/GameEngineAdapter.Core/IUserInterfaceProvider.cs Introduces UI provider contract placeholder.
src/GameEngineAdapter.Core/IRenderProvider.cs Introduces render provider contract (frame + submits).
src/GameEngineAdapter.Core/IInputProvider.cs Introduces input polling contract.
src/GameEngineAdapter.Core/IEngineAdapter.cs Introduces root adapter contract (providers + lifecycle).
src/GameEngineAdapter.Core/IAudioPlayer.cs Introduces audio playback contract.
src/GameEngineAdapter.Core/IAssetProvider.cs Introduces asset provider contract (cache/lifecycle).
src/GameEngineAdapter.Core/IAssetLoader.cs Introduces asset loader contract.
src/GameEngineAdapter.Core/HeadlessEngineCapabilities.cs Introduces headless capabilities variant DTO.
src/GameEngineAdapter.Core/GameEngineAdapter.Core.csproj Converts Core project to a library and sets root namespace.
src/GameEngineAdapter.Core/FrameScope.cs Introduces frame-scope type for BeginFrame return.
src/GameEngineAdapter.Core/EngineConfig.cs Introduces adapter configuration DTO.
src/GameEngineAdapter.Core/EngineCapabilities.cs Introduces engine capabilities DTO (includes contract version).
src/GameEngineAdapter.Core/CameraDescriptor.cs Introduces camera DTO + projection enum.
src/GameEngineAdapter.Benchmarks/RenderTranslationBenchmarks.cs Adds translation microbenchmarks using BenchmarkDotNet.
src/GameEngineAdapter.Benchmarks/Program.cs Adds benchmark runner entrypoint.
src/GameEngineAdapter.Benchmarks/GameEngineAdapter.Benchmarks.csproj Introduces benchmark project targeting net10.0.
scripts/check-doc-links.ps1 Removes docs link checker script.
docs/plans/phase-2-headless-adapter-development.md Adds Phase 2 plan documentation and examples.
docs/plans/phase-1-interface-development.md Updates Phase 1 plan documentation and examples.
docs/plans/issue-1-translator-tests-and-benchmarks.md Adds follow-up plan doc for translator tests + benchmarks.
GameEngineAdapter.slnx Updates solution composition to include Core/Headless/Benchmarks.
.github/workflows/main.yml Enables push trigger, adds tag-commit version input, enables benchmark job.
.gitattributes Normalizes LF attribute formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/plans/phase-2-headless-adapter-development.md Outdated
Comment thread src/GameEngineAdapter.Core/IAudioPlayer.cs Outdated
Comment thread src/GameEngineAdapter.Core/IRenderProvider.cs Outdated
Comment thread src/GameEngineAdapter.Core/FrameScope.cs Outdated
Comment thread src/GameEngineAdapter.Headless/HeadlessAdapter.cs
Comment thread src/GameEngineAdapter.Headless/HeadlessRenderProvider.cs Outdated
Comment thread .github/workflows/main.yml
Comment thread docs/plans/phase-1-interface-development.md
Comment thread src/GameEngineAdapter.Headless/HeadlessInputProvider.cs
JohnLudlow and others added 4 commits April 21, 2026 21:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JohnLudlow
Copy link
Copy Markdown
Owner Author

@copilot apply changes based on the comments in this thread

…to avoid boxing; fix main.yml versioning step references

Agent-Logs-Url: https://github.com/JohnLudlow/GameEngineAdapter/sessions/a694adc4-8c6a-4222-aaf5-116f9a36a870

Co-authored-by: JohnLudlow <1769289+JohnLudlow@users.noreply.github.com>
@JohnLudlow JohnLudlow merged commit cab0b30 into main Apr 21, 2026
13 checks passed
@JohnLudlow JohnLudlow deleted the 1-phase-1-interfacedev-2 branch April 24, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-actions Items related to Github Actions area-lib Items related to reusable libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engine Decoupling — Phase 1: Interface development

3 participants