Trench battle game for TikTok LIVE, version 1.0.0

Side War

Your viewers fight it out, Blue against Red.

Viewers pick a side in chat and get a soldier with their name on it. Likes send reinforcements, gifts send whole squads with machine guns, rockets and tanks, and the first side to 50 kills wins the round.

$14 one-time, buyer fee included. Runs on your own PC with OBS or TikTok LIVE Studio.

Side War during a battle: Blue 9 and Red 15 soldiers left with a front-line bar under the SIDE WAR wordmark, the top five killers in avatar circles, the gift legend, and named soldiers firing from three trenches on each side while a red tank pushes in

One round, start to finish

The soldiers fight on their own. Viewers decide how many there are and how heavy their guns are.

  1. Waiting screen asking viewers to type 1 to join Blue or 2 to join Red, while two demo soldiers trade shots

    Viewers pick a side

    Typing 1 or 2 in chat puts a free pistol soldier with the viewer's name in that side's trench. The chat words are settings, in any language.

  2. Soldiers firing from three trenches per side with damage numbers over the targets, and the scoreboard saying Red needs 3 more kills

    The trenches fight

    Soldiers fight from cover, where they dodge part of the fire. They push into the enemy's half only when it is safe, and fall back into a trench when it is not.

  3. Tanks behind their own trenches while rockets fly across the field

    Gifts bring heavier guns

    Riflemen, machine gunners, anti-tank soldiers and tanks arrive in squads. Tanks hold behind their own trenches and shell the enemy lines.

  4. Round result card with the winning side and the top soldier of the round, with fireworks at the edges

    First to 50 kills wins

    The scoreboard counts down the last kills, the result names the top soldier of the round, and the next round starts 10 seconds later.

Kills count for the viewer who sent the soldier, and the top killers stay at the top of the screen between restarts. The kill target, the trenches, the tanks and every soldier's stats are settings, and a kill target of 0 plays one endless battle.

Five soldier types

Each one has its own weapon, health, range and sound, and a viewer can tell them apart by the weapon alone. Both sides wear the same kit in their own color.

Range is a share of the field's width, from Blue's edge to Red's. These are the defaults. Every number is a setting in the Soldiers tab, and saved changes reach soldiers already fighting.

Every gift sends a squad

The bigger the gift, the heavier the squad and the bigger the thank-you. Big thank-yous wait their turn, so every gifter gets their own moment on screen.

What a gift sends by its coin value
CoinsSquadOn screen
1 to 4 1 pistol soldier Notification
5 to 9 2 pistol soldiers Notification
10 to 29 1 rifleman and 2 pistol soldiers Banner
30 to 99 1 machine gunner, 1 rifleman and 2 pistol soldiers Banner
100 to 499 1 anti-tank soldier, 1 machine gunner, 1 rifleman and 3 pistol soldiers Banner
500 to 4,999 1 tank, 1 anti-tank soldier, 1 machine gunner, 2 riflemen and 3 pistol soldiers Spotlight
5,000 to 19,999 2 tanks, 2 anti-tank soldiers, 2 machine gunners, 3 riflemen and 5 pistol soldiers Spotlight
20,000+ 3 tanks, 3 anti-tank soldiers, 3 machine gunners, 4 riflemen and 6 pistol soldiers Spotlight

A gift that is not set up goes to the side its sender joined, or to the smaller side. Combos multiply the squad, up to 100 soldiers per gift, and a side holds up to 3 tanks at once while the rest wait their turn.

Ten gifts set up
Five for each side, from a single pistol soldier for Rose or TikTok to a tank squad for Money Gun or Gem Gun. You choose the side and the squad for every gift.
Likes
Every 100 likes from a side send that side another soldier, so viewers who never gift still move the battle.
Thank-yous
A notification under 10 coins, a banner with fireworks from 10 coins, and a full-screen spotlight with the sender's photo from 500. Both limits are settings.
A thank-you banner with fireworks at the top of the game screen, above the battle
Banner, 10 coins and up
Full-screen thank-you for a big gift, with the sender's name, the tank it sent and fireworks
Spotlight, 500 coins and up

Laid out around the LIVE app

On a phone, the LIVE app draws its header over the top of your stream and its chat over the bottom. Side War keeps the battle in between.

Illustration of Side War inside a generic live app with fictional viewers: the header over the top, the battle in the middle, and the chat and comment field over the clear ground at the bottom
Top
Left clear for the LIVE header with your name and the viewer count.
Upper 62%
The scoreboard, the top killers, the gift legend, the trenches and every thank-you.
Bottom 38%
Only the ground, dimmed. The chat, the gift bar and the comment field can run over it without hiding the fight.

The picture is an illustration: a generic live app around a real capture of the game, with fictional viewers. The game screen is locked to 9:16. Add it as a 1080 x 1920 Browser Source, and for a horizontal stream scale it down in OBS. Refreshing the source or restarting OBS is safe, because the battle runs on the server.

A quiet stream never looks frozen

Chat slows down on every LIVE. Side War keeps the field busy until it picks up again.

NPC soldiers
The game keeps 4 computer soldiers per side on the field, or as many as you set. Their kills count for their side but never for the leaderboard, and they step aside for viewers' soldiers.
Waiting for chat
After 5 minutes without a comment, like or gift, the battle waits on a pick-a-side screen. It carries on with the kills it had when someone comes back.
Pause
Freeze the battle while you talk to chat. Joins, likes and gifts still line soldiers up, and they run in when you resume.
Light effects
For a slower streaming PC, Light draws the battlefield at a lower frame rate with fewer particles. The battle stays the same.
The game screen paused by the host, with the battle frozen under a Paused note
Paused by the host

Run it from the Admin Panel

Six tabs in the browser, and on a phone on the same Wi-Fi. Changes reach the running battle straight away, without a restart.

Side War Admin Panel Live tab: Blue 20 and Red 23 kills of 50, the front-line bar, soldiers and tanks per side, Pause, End round now and Clear the field, the activity log and a game screen preview
Both sides with their kills and the front line, soldiers on the field and waiting, pause, end the round and clear the field, the activity log and a muted preview of the game screen.
Test without going live card with Join Blue and Join Red, a chat message box, buttons for 100 and 500 likes, and the set-up gifts with their coins, side and squad
Join Blue or Red, chat, send 100 or 500 likes and any gift with a combo as a test viewer, and watch the game screen react.
NPC soldiers card with Blue, Red and Random buttons for every soldier type, next to the kill leaderboard with Reset leaderboard and Reset rounds won
Send 1 to 50 NPC soldiers of any type to Blue, Red or a random side, or send them all away. The kill leaderboard sits next to them, with buttons to reset it and the rounds won.
Settings tab with the Sides, Round and Battlefield groups: side names, chat words, kills to win, trenches, soldiers per trench, tanks and the hit effect
Side names and chat words, the kill target or an endless battle, the wait for chat, trenches per side, soldiers per trench, tanks at once and the hit effect.
Soldiers tab with a card per soldier type: health, damage, range, time between shots and speed, and a plain-language summary of each
Tune every soldier type, with a line under each card that says what the numbers mean on the field.
Gifts tab with a row per gift: coins, side, the number of each soldier type and the total, with search and filters
Choose the side and the squad for every gift: always Blue, always Red, or the side the sender joined. Search the gift list and filter by side or strongest soldier.
Sounds tab with a card per sound effect, a file picker, a volume slider and a play button
Replace any of the fifteen sound effects with your own MP3, WAV or OGG file and set each volume.
Server window with the game, Admin Panel and phone addresses, the password for this run, and a log of rounds, gifts and NPCs
The game and Admin Panel links, the address for your phone and a new Admin Panel password at every start, then every round, gift and NPC as it happens.

What you download

Version 1.0.0, on CodeCanyon since November 2026. Updates are free from your CodeCanyon Downloads page.

In the package

  • Full Python, HTML, CSS and JavaScript source code. The soldiers, tanks, trenches and effects are drawn in code.
  • Documentation with screenshots: installation, OBS, the TikTok connection, connection status and debugging, every rule and setting, and how to change colors, fonts and the logo.
  • Flask, Flask-SocketIO and TikTokLive install from PyPI through requirements.txt or the start script.
  • No TikTok gift artwork. The game shows the gift pictures from TikTok's own servers, and its own gift box where none is available.
The Side War Admin Panel on a phone: Blue 2 and Red 4 kills of 50, the front-line bar, soldiers per side, and Pause, End round now and Clear the field
The Admin Panel on a phone

From download to live in five steps

  1. Step 1

    Install Python 3.10+

    On Windows, tick Add Python to PATH in the installer.

  2. Step 2

    Run the start script

    Open the Source folder and double-click START_GAME.bat, or run start_game.sh on macOS and Linux. It installs the requirements and starts the server.

  3. Step 3

    Copy the password

    The server window shows a new Admin Panel password at every start. Keep that window open while you stream.

  4. Step 4

    Add the Browser Source

    In OBS or TikTok LIVE Studio, add a Browser Source at http://localhost:5000 with a width of 1080 and a height of 1920.

  5. Step 5

    Test, then connect

    Open localhost:5000/admin and try a battle with Test without going live. Then go live, type your username in the TikTok tab and click Connect.

pip install -r requirements.txt
python app.py

Requirements

Operating system
Windows 10 or 11, tested on Windows 11. A start script for macOS and Linux is included.
Python
3.10 or newer
Streaming app
OBS Studio, TikTok LIVE Studio, Streamlabs Desktop or another app with a Browser Source
Browser Source
1080 x 1920, locked to 9:16
Internet
A connection for the LIVE data and TikTok's gift pictures
TikTok
An account that can go LIVE. The game never asks for your TikTok password.

Pay once, run it on your own PC

Side War is sold on CodeCanyon. The game server, the battle and your leaderboard all run on your own computer.

  • Full Python, HTML, CSS and JavaScript source code
  • Five soldier types, three trenches per side and squads for every gift
  • Admin Panel with a test mode for joins, chat, likes and gifts
  • NPC soldiers, editable soldier stats and fifteen original sound effects
  • Documentation with screenshots and start scripts for Windows, macOS and Linux

Good to know

The live connection reads TikTok's unofficial LIVE data through the open-source TikTokLive library, and each connection is signed by Euler Stream, a third-party service. Changes on their side can stop the connection until the item is updated. Euler Stream's free plan has a daily limit; if you stream often you may need a paid plan, billed monthly by Euler Stream and not included in this price. TikTok is a trademark of ByteDance Ltd. Side War is an independent product, not affiliated with, endorsed or supported by TikTok, ByteDance or Euler Stream.

Tools License, CodeCanyon

$14

One-time payment, buyer fee included

  • Full source code
  • Free updates from your Downloads page
  • Item support through CodeCanyon
  • Documentation included
Buy on CodeCanyon (opens in a new tab)

Questions before you buy

Does the game need my TikTok password?

No. It only needs your TikTok username. It reads the comments, likes and gifts of your LIVE and never logs in to your account.

Can I try it without going live?

Yes. The Live tab of the Admin Panel has a Test without going live card: join Blue or Red, chat, send likes and any gift as a test viewer, and the game screen reacts exactly as it would during a stream. Test players land on the kill leaderboard, so reset it before you stream.

Is the blood suitable for TikTok?

Hits show small round droplets that vanish in under half a second, and fallen soldiers fade out. Switch the hit effect to sparks or turn it off in Settings for a stream with no red at all.

What happens when a viewer's soldier falls?

The kill counts for the viewer who sent the shooter. A free pistol soldier comes back 10 seconds after it falls, and that wait is a setting. Soldiers from likes and gifts do not come back.

What happens when nobody is playing?

NPC soldiers keep the battle going, 4 per side unless you change it, and step aside when a viewer's soldier needs their spot. After 5 minutes without a comment, like or gift, the battle waits on a pick-a-side screen and carries on with the same round when someone comes back.

Why does TikTok refuse the connection?

TikTokLive signs each connection through Euler Stream, whose free plan has a daily request limit. A rate-limit message usually clears after a few minutes, and a key from Euler Stream raises the limit. Also check that you are live on the account you typed, without the @.

Is it heavy for my streaming PC?

If OBS, TikTok LIVE Studio and the game together are too much for your PC, set Effects to Light in Settings. The battlefield then draws at a lower frame rate with fewer particles, and the battle itself stays the same.

Does it run on a Mac?

A start script for macOS and Linux is included, and the game runs anywhere Python 3.10 or newer runs. It was tested on Windows 11.

Can I change the names and colors?

Yes. The title, the two side names and the chat words that join each side are settings. The documentation shows how to change the colors, the fonts and the logo.

What does the purchase include?

The full Python, HTML, CSS and JavaScript source code, the documentation with screenshots, fifteen original sound effects and start scripts for Windows, macOS and Linux. TikTok gift artwork is not included: the game shows the gift pictures from TikTok's own servers, and its own gift box where none is available.

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.

Start a trench war on your next stream

One purchase, running on your own PC. Test every join, like and gift in the Admin Panel before you go live.