How victorml11/lol-cheat-poc works
Project Type and Purpose
• This is a full-stack, event-driven proof-of-concept system that reads League of Legends process memory in C++, publishes that data via Apache Kafka, and consumes it in a Java Spring Boot service with LibGDX to render cheat overlays at real time.
• Key concerns: high-throughput, low-latency messaging; tuning producers and consumers to avoid missed frames and lag.
File Structure Analysis
• Top‐level:
• CMakeLists.txt, conanfile.txt → C++ build with Conan/CMake
• com/vmaster → C++ source (Hero, Offsets, ScreenData, LeagueMemoryReader, Utils, main.cpp)
• libs/modern-cpp-kafka → vendored Kafka C++ client library and its build/test hierarchy
• build/ cmake-build-debug/ → build artifacts, dependency snapshots, generated executables
• No Java code is present in this tree, but the README describes a Java Spring + LibGDX component; assume it lives in a sibling module or separate repo.
README Insights
• Describes a C++ Kafka producer (using modern-cpp-kafka + nlohmann_json) reading game memory.
• A Java Spring service consumes topics “prueba” & “heroes” and uses LibGDX for rendering.
• Uses Kafka monitoring stack via Docker Compose for KPIs (Prometheus, Grafana).
Main Components
a. C++ Kafka Producer
• Modules: LeagueMemoryReader, ScreenData, Hero extraction, Utils
• Libraries: modern-cpp-kafka, nlohmann_json
• Built with CMake+Conan → vmaster.exe
b. Kafka Cluster
• Brokers, zookeeper (if applicable), topic partitions for “prueba”, “heroes”
• Monitoring stack (Prometheus, Grafana) deployed via Docker Compose
c. Java Spring Boot Consumer Service
• Spring Kafka consumer listening to the topics
• Business logic layer
d. LibGDX Rendering Engine
• Integrated into Spring Boot or running as standalone UI client
• Renders overlays at ~144 FPS using incoming game data
e. External Dependencies
• Docker Compose for Kafka + monitoring
• Client machines running League of Legends
Interactions and Data Flow
1. C++ component attaches to LoL process → reads memory snapshots
2. Serializes data → JSON messages → publishes to Kafka topics via modern-cpp-kafka
3. Kafka brokers enqueue messages; monitoring stack collects metrics
4. Java Spring service consumes messages → applies cheat logic
5. Passes data to LibGDX layer → renders cheat overlays on screen
6. Optional feedback loop: metrics flow to Grafana for tuning
Architectural Patterns and Design Principles
• Asynchronous, event-driven pub/sub via Kafka
• Clear separation of concerns: data acquisition (C++), messaging (Kafka), business logic + UI (Java/LibGDX)
• Use of externalized configuration and monitoring for throughput tuning
• Modular C++ build (Conan dependencies, CMake targets)
Detail Level
• Important libraries (modern-cpp-kafka, nlohmann_json, Spring Kafka) next to their components
• Configuration files/build scripts (CMakeLists.txt, conanfile.txt, pom.xml or build.gradle) as small documents attached to their runtime
• Monitoring flow: Kafka → Prometheus exporter → Grafana dashboards