# fl0rk/external_esp_free_fire architecture

> Architecture diagram of the GitHub repository fl0rk/external_esp_free_fire, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fl0rk/external_esp_free_fire
- Repository: https://github.com/fl0rk/external_esp_free_fire

## Overview

This repository is an iOS external ESP HUD for Free Fire, built around a custom TrollSpeed-derived interface. The intended flow is launching the HUD, running ESP logic for player box/health/name data, and presenting that information in an overlay; the README says on-screen name and health rendering is still a to-do. The tree shows separate app, HUD, event, drawing, and math code. Sampled source does not expose the runtime wiring, so uncertain connections are dashed and unverified rather than asserted as calls.

Main entry points: [`esp/Core/GameLogic.mm`](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/GameLogic.mm) (ESP Logic), [`sources/RootViewController.mm`](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/RootViewController.mm) (HUD Controller), [`sources/MainApplication.mm`](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/MainApplication.mm) (Main App), [`sources/MainApplicationDelegate.mm`](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/MainApplicationDelegate.mm) (App Delegate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_mainapp["Main App<br/>[MainApplication.mm]"]
  node_appdelegate["App Delegate"]
  node_hudapp["HUD App<br/>[HUDApp.mm]"]
  node_huddelegate["HUD Delegate"]
end

subgraph group_hud["HUD Interface"]
  node_root["HUD Controller"]
  node_hudwindow["HUD Window<br/>[HUDMainWindow.mm]"]
  node_hudhelper["HUD Helper<br/>[HUDHelper.mm]"]
  node_secureview["Capture Privacy"]
  node_eventfetch["Event Fetcher<br/>[TSEventFetcher.mm]"]
end

subgraph group_esp["ESP Logic"]
  node_gamelogic["ESP Logic<br/>[GameLogic.mm]"]
  node_drawing["ESP View<br/>[esp.mm]"]
  node_memory["Memory Utilities<br/>[MemoryUtils.cpp]"]
end

subgraph group_math["Math Utilities"]
  node_vector["3D Vectors<br/>[Vector3.h]"]
  node_quaternion["Quaternions<br/>[Quaternion.h]"]
  node_unitymath["Unity Math<br/>[UnityMath.mm]"]
  node_utf["UTF Conversion<br/>[utf.h]"]
end

node_user(("User"))
node_target(("Free Fire"))

node_user -.->|"launches"| node_mainapp
node_mainapp -.->|"configures"| node_appdelegate
node_appdelegate -.->|"presents"| node_root
node_hudapp -.->|"configures"| node_huddelegate
node_huddelegate -.->|"creates"| node_hudwindow
node_root -.->|"uses"| node_hudhelper
node_root -.->|"protects"| node_secureview
node_root -.->|"receives input"| node_eventfetch
node_target -.->|"player data"| node_gamelogic
node_gamelogic -.->|"reads process"| node_memory
node_gamelogic -.->|"supplies ESP data"| node_drawing
node_drawing -.->|"uses coordinates"| node_vector
node_quaternion -->|"uses vectors"| node_vector
node_gamelogic -.->|"uses math"| node_unitymath
node_gamelogic -.->|"converts text"| node_utf

click node_mainapp "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/MainApplication.mm"
click node_appdelegate "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/MainApplicationDelegate.mm"
click node_hudapp "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDApp.mm"
click node_huddelegate "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDMainApplicationDelegate.mm"
click node_root "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/RootViewController.mm"
click node_hudwindow "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDMainWindow.mm"
click node_hudhelper "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDHelper.mm"
click node_secureview "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/UIView%2BSecureView.m"
click node_eventfetch "https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/TSEventFetcher.mm"
click node_gamelogic "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/GameLogic.mm"
click node_drawing "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/drawing_view/esp.mm"
click node_memory "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/MemoryUtils.cpp"
click node_vector "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/Vector3.h"
click node_quaternion "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/Quaternion.h"
click node_unitymath "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/UnityMath.mm"
click node_utf "https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/utf.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainapp,node_appdelegate,node_hudapp,node_huddelegate,node_user toneBlue
class node_root,node_hudwindow,node_hudhelper,node_secureview,node_eventfetch toneAmber
class node_gamelogic,node_drawing,node_memory toneMint
class node_vector,node_quaternion,node_unitymath,node_utf toneRose
class node_target toneIndigo
```

## Components

### Application

- [Main App](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/MainApplication.mm): `sources/MainApplication.mm`
- [App Delegate](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/MainApplicationDelegate.mm): `sources/MainApplicationDelegate.mm`
- [HUD App](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDApp.mm): `sources/HUDApp.mm`
- [HUD Delegate](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDMainApplicationDelegate.mm): `sources/HUDMainApplicationDelegate.mm`

### HUD Interface

- [HUD Controller](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/RootViewController.mm): `sources/RootViewController.mm`
- [HUD Window](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDMainWindow.mm): `sources/HUDMainWindow.mm`
- [HUD Helper](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/HUDHelper.mm): `sources/HUDHelper.mm`
- [Capture Privacy](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/UIView%2BSecureView.m): `sources/UIView+SecureView.m`
- [Event Fetcher](https://github.com/fl0rk/external_esp_free_fire/blob/main/sources/TSEventFetcher.mm): `sources/TSEventFetcher.mm`

### ESP Logic

- [ESP Logic](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/GameLogic.mm): `esp/Core/GameLogic.mm`
- [ESP View](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/drawing_view/esp.mm): `esp/drawing_view/esp.mm`
- [Memory Utilities](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/MemoryUtils.cpp): `esp/Core/MemoryUtils.cpp`

### Math Utilities

- [3D Vectors](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/Vector3.h): `esp/Core/Vector3.h`
- [Quaternions](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/Quaternion.h): `esp/Core/Quaternion.h`
- [Unity Math](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/UnityMath.mm): `esp/Core/UnityMath.mm`
- [UTF Conversion](https://github.com/fl0rk/external_esp_free_fire/blob/main/esp/Core/utf.h): `esp/Core/utf.h`

### Other components

- **User**
- **Free Fire**

## Connections

- User → Main App: launches
- Main App → App Delegate: configures
- App Delegate → HUD Controller: presents
- HUD App → HUD Delegate: configures
- HUD Delegate → HUD Window: creates
- HUD Controller → HUD Helper: uses
- HUD Controller → Capture Privacy: protects
- HUD Controller → Event Fetcher: receives input
- Free Fire → ESP Logic: player data
- ESP Logic → Memory Utilities: reads process
- ESP Logic → ESP View: supplies ESP data
- ESP View → 3D Vectors: uses coordinates
- Quaternions → 3D Vectors: uses vectors (evidence: `esp/Core/Quaternion.h`)
- ESP Logic → Unity Math: uses math
- ESP Logic → UTF Conversion: converts text
