Thanks for your interest in contributing! This guide will help you get started.
- .NET 8 SDK or later
- Windows (for memory-mapped file testing)
- A supported game (optional, for testing)
git clone https://github.com/yourusername/GameTelemetry.git
cd GameTelemetry
dotnet restore
dotnet build
dotnet test # When tests exist- Minimal complexity - Prefer simple, readable code over clever abstractions
- Performance matters - This code runs in tight loops; avoid allocations
- Type safety - Use strong typing and avoid
dynamicor excessive reflection
- Sources:
[GameName]Sources.cswith static factory methods - Data structures:
[GameName][DataType].cs(e.g.,ACCPhysics.cs) - Methods: PascalCase, descriptive names
- Private fields:
_camelCasewith underscore prefix
// ✅ Good
public static class iRacingSources
{
public static MemoryMappedFileSource<iRacingTelemetry> CreateTelemetrySource() =>
new("Local\\IRSDKMemMapFileName", TimeSpan.FromMilliseconds(16));
}
// ❌ Bad - unclear naming, no factory pattern
public class IRacingStuff
{
public object GetData() { ... }
}- Open an issue to discuss the feature
- Check if it aligns with project goals (performance, simplicity, extensibility)
- Consider backward compatibility
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Write code following style guidelines
- Test thoroughly (manual testing required until test suite exists)
- Update documentation (README, code comments, etc.)
- Submit PR with clear description
[Type] Brief description
Types: Feature, Fix, Docs, Perf, Refactor
Examples:
- [Feature] Add iRacing telemetry source
- [Fix] Handle corrupted session files gracefully
- [Perf] Reduce allocations in hot path
See CREATING_SOURCES.md for detailed guide.
Quick checklist:
- Create
GameTelemetry.Games.[GameName]project - Define data structures (use
unsafe structfor memory-mapped data) - Create
[GameName]Sources.cswith factory methods - Add usage example to main README
- Test with actual game
- Hot path = zero allocations -
WriteFrameand enumeration should not allocate - Use
Span<T>andstackallocfor temporary buffers - Flush strategically - Balance data safety vs. performance
- Profile before optimizing - Measure, don't guess
// Use BenchmarkDotNet for micro-benchmarks
[Benchmark]
public void WriteFrame()
{
_writer.WriteFrame(_testData, DateTime.UtcNow.Ticks);
}Currently manual testing. Automated test suite coming soon.
Manual test checklist:
- Capture runs without errors
- File grows during capture
- Ctrl+C stops cleanly
- Session can be read back
- CSV export works
- HTML visualization loads
- New feature → Update README + create example
- API change → Update API_REFERENCE.md
- New game → Update supported games list
- Performance improvement → Update performance metrics
- Be concise - Developers value their time
- Show, don't tell - Code examples > long explanations
- Be honest - Document limitations and tradeoffs
- General questions: Open a discussion
- Bug reports: Open an issue with repro steps
- Feature ideas: Open an issue for discussion first
Be respectful, constructive, and professional. We're here to build cool stuff together.