game-macro

Game Macro Development Manual

Comprehensive technical documentation for the Game Macro automation system, providing detailed information about each module’s architecture, API, and usage.

English Version 中文版本

Overview

The Game Macro system is a sophisticated automation framework built with AutoHotkey v2, designed for game automation with pixel detection, skill casting, buff management, and rule-based automation capabilities.

Module Documentation

Core Modules

Core Module

Runtime Module

Utility Module

Engine Modules

Pixel Engine

DXGI Engine

Cast Engine

Buff Engine

Rule Engine

Rotation Engine

Infrastructure Modules

Storage Module

Logging Module

Internationalization (i18n) Module

UI Framework

Workers Module

Native Library

System Architecture

High-Level Overview

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│    UI Layer     │◄──►│  Core Services   │◄──►│  Engine Layer   │
│                 │    │                 │    │                 │
│ • Pages         │    │ • Configuration │    │ • Pixel Detection│
│ • Dialogs       │    │ • State Mgmt    │    │ • Skill Casting │
│ • Navigation    │    │ • Logging       │    │ • Buff Tracking  │
└─────────────────┘    └─────────────────┘    └─────────────────┘
         │                       │                       │
         ▼                       ▼                       ▼
┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│  Storage Layer  │    │ Runtime Layer   │    │ Native Layer   │
│                 │    │                 │    │                 │
│ • Profile Mgmt  │    │ • Thread Pool   │    │ • DXGI Capture │
│ • File I/O      │    │ • Hotkey Mgmt   │    │ • Performance   │
│ • Export System │    │ • Polling       │    │ • Optimization  │
└─────────────────┘    └─────────────────┘    └─────────────────┘

Data Flow

  1. User Interaction → UI Layer → Core Services
  2. Configuration → Storage Layer → All Modules
  3. Automation → Engine Layer → Native Layer
  4. Monitoring → Runtime Layer → Logging System

Getting Started

Prerequisites

Development Setup

  1. Clone the repository
  2. Review module documentation
  3. Set up development environment
  4. Configure application settings
  5. Test with sample profiles

Module Integration

Each module is designed for independent development and testing:

API Reference

Core APIs

Engine APIs

Utility APIs

Configuration Guide

Application Configuration

Located in Config/AppConfig.ini:

[General]
Language=zh-CN
Version=2.0.0

[Logging]
Level=INFO
RotateSizeMB=10
RotateKeep=5

Profile Configuration

Profiles stored in Profiles/ directory:

Performance Optimization

Key Optimization Areas

  1. Pixel Detection: Use ROI and frame caching
  2. Screen Capture: Leverage DXGI hardware acceleration
  3. Rule Evaluation: Optimize condition evaluation order
  4. Memory Management: Efficient resource utilization
  5. Thread Management: Proper worker thread allocation

Monitoring Tools

Troubleshooting

Common Issues

  1. DXGI Initialization Failures: Check graphics drivers and permissions
  2. Pixel Detection Issues: Verify color tolerance and coordinates
  3. Rule Execution Problems: Review condition logic and priorities
  4. Performance Degradation: Monitor system resources and optimize settings

Debugging Techniques

Contributing

Development Guidelines

  1. Follow established coding standards
  2. Maintain comprehensive documentation
  3. Include unit tests for new features
  4. Perform thorough testing before submission

Module Development

When adding new modules:

  1. Create clear API documentation
  2. Implement proper error handling
  3. Include performance monitoring
  4. Follow established architectural patterns

License and Attribution

This documentation is part of the Game Macro system. Please refer to the project’s license file for usage and distribution terms.

Support

For technical support and development questions:


This documentation is automatically generated and maintained as part of the Game Macro development process.