vladyslav.spacevladyslav.space
Contact me
All projects
Backend development

In-chat Race Renderer

A Node.js rendering service that turns participant and winner data into an animated race result delivered directly to a Telegram chat.

My role
Backend development
Delivery window
1 day
Platform
Telegram
In-chat Race Renderer interface in English
Node.jsFFmpegSharpTelegram botsVPS

Project brief

Task

The in-chat mini-game required a visual representation of its results. The animation needed to be engaging and clearly show who won the race.

Solution

A GIF format was chosen instead of a standalone Telegram Mini App so that the game result would remain directly in the chat. A script was deployed on a VPS. It received participant and winner data and returned a GIF visualizing the entire game sequence. Bot-to-bot communication was used as part of the implementation.

Let the result stay in the conversation

An existing Telegram mini-game needed a visual way to show its outcome. A plain winner message would communicate the result, but miss the shared moment of watching the race. Opening another Mini App would also move the result away from the conversation where people were already playing.

The chosen delivery format was a GIF-style animation posted directly into the chat. My role was backend development: build a script that accepted the participants and winner, produced the race sequence and returned the resulting media.

Data first, animation second

The renderer received an already selected winner. Its responsibility was to explain that result visually, not to decide who won. Participant identities and the supplied outcome became the inputs for the race board, the movement sequence and the final frame.

That separation matters for an in-chat game. The service can present a convincing race while keeping the outcome consistent with the game that requested it. The viewer should be able to follow the participants and recognise the winner without having to inspect a separate results table.

A frame-based rendering pipeline

The implementation used Node.js, Sharp and FFmpeg. Sharp handled image composition for the frame-based visuals, while FFmpeg assembled the sequence into deliverable animated media. AI-generated game-board artwork supplied the setting for the race.

The useful way to think about the pipeline is as a sequence of stages: receive the game data, prepare the visual layers, render the progression and package the output for Telegram. Repeated visual elements belong in the artwork and frame composition rather than being recreated as a separate web application.

Running on a VPS

The script was deployed to a VPS and connected to the surrounding Telegram workflow using bot-to-bot communication. This made the renderer a small service alongside the game, instead of a new user-facing application. The original scope was completed in one day.

The engineering focus was narrow but concrete: take structured inputs and return an engaging, readable visual result that remains useful when someone scrolls back through the chat.

Watch the original output

The recording below shows the exported race animation. It is included as a click-to-play video for this case study; the original product used animated media directly in Telegram.

See it in motion

Original race animation

Have a project in mind?

Discuss your project