Game for TikTok LIVE, version 1.0.0
Type a country. Last one bouncing wins.
A physics battle royale for your TikTok LIVE. Your chat drops country balls into a neon ring, gifts send bombs that break the wall, and the last country left takes the win.
$12 one-time, Tools License. Self-hosted, no monthly fee.

Countries 190+
Gifts mapped 400+
Canvas 1080x1920
Viewers type a country name or code in your LIVE chat, and their ball drops into the ring with their username on it.
Two rules, printed on the canvas
The game shows viewers how to join and how to attack, right above the ring.
Type COUNTRY = SPAWN
A country name or its two-letter code, in any case: Indonesia, indonesia, ID or id. Many countries also match another spelling, such as Brasil, Kanada or Tiongkok. Each viewer gets one ball per match, labelled with their username.
GIFT = SPAWN BOMB
Each gift in the Gift Manager adds its value in bombs, times how many were sent, and over 400 gifts come mapped. Bombs knock pieces out of the ring, and balls that bounce out through a gap are out.
Viewers from the same country play on the same side. When only one country has balls left in the ring, it takes the win.

One match, six phases
The game runs every match on its own, from the first comment to the winner screen. These are frames from the 1080 x 1920 canvas.
-

Phase 1
Waiting
Until the first ball
The ring stays empty until a comment names a country. After 20 seconds with nobody, a bot joins so the stream never stalls.
-

Phase 2
Pre-Spawn
15 seconds
The first ball opens a 15-second lobby. The screen asks viewers to type their country name or code, and anyone can still join.
-

Phase 3
Get Ready
10 seconds
A last countdown, with the countdown sound on every second. If fewer players than the minimum have joined, 5 by default, bots fill the open slots.
-

Phase 4
Battle
20 seconds
The balls start moving and bounce off each other and the wall. A bomb flies in every 5 seconds and gifts send more. New comments now wait for the next match, counted under Next Spawn.
-

Phase 5
Chaos
Until a winner
If more than one country survives Battle, the opening in the wall gets wider and every ball speeds up. Balls that fly out are eliminated, and Alive counts who is left.
-
Phase 6
Winner
Then a new match
The last country left gets a win screen with its flag and the player's name, and a win on the leaderboard. Queued comments spawn into the next match.
Your control room
A password-protected admin panel at localhost:5000/admin runs the game from your browser. No code editing needed.





From download to live in five steps
- Step 1
Install Python 3.9+
On Windows, tick Add Python to PATH in the installer. On macOS and Linux, use your package manager.
- Step 2
Extract the files
Unzip the download and open a terminal in the Source folder.
- Step 3
Install the dependencies
Run pip install -r requirements.txt. It installs Flask, Flask-SocketIO, Flask-Cors and TikTokLive.
- Step 4
Start the server
Run python app.py. When the terminal shows COUNTRY BOUNCE SERVER STARTING, it is running. Keep it open while you stream.
- Step 5
Add to OBS and connect
Add a Browser source at localhost:5000 sized 1080 x 1920, go live, then open localhost:5000/admin and connect your TikTok username.
pip install -r requirements.txt
python app.py
Requirements
- Operating system
- Windows 10 or 11, macOS or Linux
- Python
- 3.9 or newer
- Streaming software
- OBS Studio, Streamlabs or any software with a Browser Source
- Admin panel browser
- Chrome, Edge or Safari
- Internet
- Needed for the TikTok LIVE connection
- TikTok
- An account that is live while the game is connected
Pay once, host it yourself
Country Bounce is sold on CodeCanyon under its Tools License, which covers one user and unlimited end products. It runs on your own PC or VPS with Python, Flask and Socket.IO, so there is no subscription and no overlay service in between.
- Full Python (Flask and Socket.IO) and JavaScript source code
- Admin panel with TikTok, Game Master, Gift Manager, Audio SFX and Security tabs
- 190+ country flags and a 400+ gift mapping catalogue
- Sample sound effects for collision, bomb, win and countdown
- Documentation for install, OBS, TikTok, branding and troubleshooting
Good to know
The live connection reads TikTok's public LIVE data through the open-source TikTokLive library. It is not an official TikTok API, so changes on TikTok's side, including policies and rate limits, can affect it at any time. Depending on your account, region or traffic, the library may also need a third-party signing service, and some of those charge for heavier use. Country Bounce is an independent product and is not affiliated with, endorsed by or sponsored by TikTok or ByteDance.
Tools License, CodeCanyon
$12
One-time payment
- Full source code
- Free updates through your Envato account
- Item support through CodeCanyon
- Documentation included
Questions before you buy
Do I need coding experience?
No. You install Python once and run two commands. The TikTok connection, gift mapping, game rules and sounds are all set in the browser admin panel.
What do viewers type to join?
A country name or its two-letter code, in any case, so Indonesia, indonesia, ID and id all work. Over 190 countries are included, and each viewer gets one ball per match.
How do gifts become bombs?
Each gift name in the Gift Manager has a value. Sending that gift adds that many bombs to the queue, multiplied by how many were sent. Over 400 gifts are mapped out of the box, and you can add, edit, test or delete any of them. A bomb also drops every 5 seconds during Battle and Chaos.
What happens if nobody joins?
After 20 seconds without a comment, the game spawns a bot to open the lobby. If real viewers do not reach the minimum player count, 5 by default, bots fill the remaining slots so the match still starts.
Why is the TikTok connection not working?
The connection only works while you are live. Start your TikTok LIVE first, then click Connect in the admin panel, and type your username exactly as it appears, without the @ symbol. The connection drops when the live stream ends.
What size should the OBS browser source be?
Point a Browser source at http://localhost:5000/ with a width of 1080 and a height of 1920. Tick Control audio via OBS if you want to set the game volume from OBS. Streamlabs and other software with a Browser Source work the same way.
What happens if OBS reloads the page?
The match carries on. The current phase, timer, leaderboard and balls in play are saved on the server, so a reload of the browser source resumes the match instead of starting over.
Can I test it without going live?
Yes. The Game Master tab spawns any country with a click, mass-spawns random countries and simulates gifts. These run the same game logic as real comments and gifts, so you can play a full match before your stream.
Can I run it on a VPS?
Yes. It runs on your own PC or a VPS with Python 3.9 or newer. On a VPS, point the OBS browser source at your server address instead of localhost.
Can I change the look and the sounds?
Yes. The Audio SFX tab takes your own .mp3, .wav or .ogg file, up to 5 MB, for each of the four sounds. The documentation shows where to change the page titles, the admin and HUD colours and the font, and how to add your own logo.
Can I get a refund?
Refunds follow the Envato Market refund rules on CodeCanyon. They cover items that are not as described, do not work and cannot be fixed, have an unpatched security issue, or come without the promised support, within 180 days for supported CodeCanyon items. A change of mind is not covered. Contact us first so we can try to fix the problem.
What does the purchase include?
The full Python and JavaScript source code, the admin panel, 190+ country flags, the 400+ gift mapping catalogue and the documentation, under the CodeCanyon Tools License with item support through CodeCanyon.
Put your chat in the ring
One purchase of $12, running on your own machine. Read the documentation first if you want to check every step.