4

League of Legends Proximity Chat

Real-time proximity voice chat using ML-based player detection, a C# client-server architecture and the Discord API.

🚧 Work in Progress
This project is currently under active development. Features and architecture are still evolving.


League of Legends Proximity Chat is a real-time proximity voice communication system designed to reproduce proximity-based voice chat inside League of Legends games.

The system allows players in the same game to communicate through Discord while automatically adjusting the volume of other players according to their position on the map.

How It Works

Each player runs a C# client that connects to a centralized server.

The client is responsible for:

  • Detecting the player's position in the game
  • Sending positional information to the server
  • Receiving the positions of other players
  • Calculating the distance between players
  • Controlling Discord voice volumes according to proximity

The server maintains the state of active game lobbies and ensures that players only receive positional information from players participating in the same game.

Player Position Detection

One of the main challenges of the project is that the League of Legends API does not directly provide the real-time map coordinates required by the application.

To solve this problem, a machine learning / computer vision pipeline analyzes game frames to detect player positions.

The detected positions are then converted into coordinates representing the players' locations on the game map.

This positional information is transmitted to the C# client and used by the proximity system.

Proximity System

The client calculates the relative position of every player in the current lobby.

The resulting distance is mapped to a Discord voice volume:

  • Players very close to you → high volume
  • Players farther away → progressively lower volume
  • Players on distant parts of the map → inaudible

The system does not implement its own voice infrastructure. Instead, it uses Discord as the actual voice communication layer and controls the volume of individual users through the Discord API.

Server & Lobby Management

The centralized server maintains multiple independent game lobbies.

Each connected client is associated with a lobby, allowing the server to isolate positional information between different games.

This makes it possible to have multiple games running simultaneously without players from different lobbies receiving each other's data.

Technologies

  • Client: C#
  • Server: C#
  • ML / Computer Vision: Python
  • Networking: Client-server architecture
  • Voice: Discord
  • Integration: Discord API

Technical Challenges

The project combines several different areas of software engineering:

  • Real-time client-server communication
  • Multi-lobby state management
  • Machine learning / computer vision
  • Coordinate transformation
  • Real-time proximity calculations
  • External API integration
  • Dynamic control of Discord voice channels

The project is an ongoing experiment combining backend development, networking and machine learning around a concrete real-time use case.