Repository navigation
Merge example plugins - #43
Merged
Merged
Conversation
Generated with logiplugintool generate Haptics as a starting point for a haptics event-mapping example plugin.
- Enable HasHapticMapping in LoupedeckPackage.yaml - Add DefaultEventSource.yaml and events/extra/eventMapping.yaml mapping four events to one waveform per family: buttonPress (State Change), milestoneReached (Special), dialTick (Collision), counterReset (Alert) - Register and raise these events from CounterCommand and CounterAdjustment per the SDK's Haptics Getting Started guide - Bump TargetFramework to net10.0 and set PluginApi's Private to false to match LogiPluginService v6.4 and keep the package slim, per known fixes already applied in screen-display Verified on a connected MX Master 4: Press Counter feels sharp_collision on every press and jingle on every 10th; Tick Counter feels subtle_collision per detent and completed on reset.
Adds a fully playable Snake game plugin that showcases how to use
PluginDynamicFolder to take over the 3x3 button grid as a single
interactive canvas.
Key patterns demonstrated:
- PluginDynamicFolder with 9 named slots ("00".."22")
- Atomic tile rendering: all 9 BitmapImages rendered in a single lock
so every tile sees the same game snapshot (avoids visual tearing)
- Background game loop via Task.Run with CancellationToken
- CommandImageChanged() called with raw slot key (not CreateCommandName)
from background threads — critical SDK gotcha
- GetNavigationArea → EncoderArea to free all 9 button slots
- Close() for programmatic folder exit
- Embedded PNG resource loaded via PluginResources
Brings in HapticsPlugin and SnakePlugin with their history. The root README is now based on the example plugins README, with an added DemoPlugin entry and the existing docs and Discord links kept under Resources.
akihirvonen
approved these changes
Oct 9, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Package compatibility, image sizing, game collision logic, and packaging documentation contain functional defects.
5 open findings
What changed in this PR
Adds Haptics and Snake example plugins and turns the root README into an example catalog with build guidance.
Changes:
- Adds haptic command and adjustment examples.
- Adds a 3×3 playable Snake dynamic folder.
- Documents all examples, requirements, and packaging.
| File | Description |
|---|---|
README.md |
Catalog and build instructions |
HapticsPlugin/.gitignore |
Build exclusions |
HapticsPlugin/.vscode/launch.json |
Debug configuration |
HapticsPlugin/.vscode/tasks.json |
Build and packaging tasks |
HapticsPlugin/HapticsPlugin.sln |
Haptics solution |
HapticsPlugin/src/.editorconfig |
C# formatting rules |
HapticsPlugin/src/Directory.Build.props |
Build paths and language version |
HapticsPlugin/src/HapticsApplication.cs |
Application adapter |
HapticsPlugin/src/HapticsPlugin.cs |
Plugin entry point |
HapticsPlugin/src/HapticsPlugin.csproj |
Project and deployment targets |
HapticsPlugin/src/Actions/CounterAdjustment.cs |
Dial counter and haptics |
HapticsPlugin/src/Actions/CounterCommand.cs |
Press counter and haptics |
HapticsPlugin/src/Helpers/PluginLog.cs |
Logging helper |
HapticsPlugin/src/Helpers/PluginResources.cs |
Resource helper |
HapticsPlugin/src/package/events/DefaultEventSource.yaml |
Haptic event declarations |
HapticsPlugin/src/package/events/extra/eventMapping.yaml |
Waveform mappings |
HapticsPlugin/src/package/metadata/Icon256x256.png |
Package icon |
HapticsPlugin/src/package/metadata/LoupedeckPackage.yaml |
Package metadata |
SnakePlugin/.gitignore |
Build exclusions |
SnakePlugin/.vscode/launch.json |
Debug configuration |
SnakePlugin/.vscode/tasks.json |
Build and packaging tasks |
SnakePlugin/SnakePlugin.sln |
Snake solution |
SnakePlugin/src/.editorconfig |
C# formatting rules |
SnakePlugin/src/Directory.Build.props |
Build paths and language version |
SnakePlugin/src/SnakeApplication.cs |
Application adapter |
SnakePlugin/src/SnakePlugin.cs |
Plugin entry point |
SnakePlugin/src/SnakePlugin.csproj |
Project, resources, and deployment |
SnakePlugin/src/Actions/SnakeFolder.cs |
Folder layout, input, and rendering |
SnakePlugin/src/Game/SnakeGame.cs |
Core game state |
SnakePlugin/src/Game/SnakeGameController.cs |
Game loop and notifications |
SnakePlugin/src/Game/SnakeRenderer.cs |
Tile rendering |
SnakePlugin/src/Helpers/PluginLog.cs |
Logging helper |
SnakePlugin/src/Helpers/PluginResources.cs |
Resource helper |
SnakePlugin/src/Resources/snake-icon.png |
Snake action icon |
SnakePlugin/src/package/metadata/LoupedeckPackage.yaml |
Package metadata |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds two new example plugins,
HapticsPluginandSnakePlugin, alongside the existingDemoPlugin. It also rewrites the root README so it works as a proper catalog of the examples.What's changed
New example plugins
HapticsPlugin/— triggers haptic feedback with thePluginEventsAPI, covering several waveform families.SnakePlugin/— a playable Snake game built onPluginDynamicFolder, rendered across the 3×3 button grid.Root
README.mdrewrittenlogiplugintool.Unchanged
DemoPlugin/is untouched.Resulting layout