Skip to content
theqiyas.cc
Problem Solver
cc · project · Products

TikTok Games

Games for TikTok LIVE that the viewers play: likes, gifts and comments from the stream move the game on screen. 15 games, from a penalty shootout to a 3D lawn mower.

FastAPI JavaScript Python SQLite TikTokLive three.js

TikTok Games turns a TikTok LIVE stream into a game the viewers play. Likes, gifts, comments, follows and shares come in from the stream and move things on screen within a second. The streamer opens a game in the browser, shares the screen on the phone, and the chat starts playing.

There are 15 games right now:

  • Arena Battle. Viewers fight in a colosseum one after another; gifts give health and weapons, a knockout plays in slow motion.
  • Penalty. 50 likes take a shot, a comment picks the corner, and the keeper gets better every three goals.
  • Car Race and Brand Race. Viewers pick a team or a car brand in the chat, likes are speed and gifts are turbo. Brand Race draws more than 60 real car models.
  • Tug of War, Tower Battle, Girls vs Boys, Kingdom War. Two to five teams, chosen by comment, pushing a score with likes and gifts.
  • Country Run. Every country typed in the chat gets its own lane.
  • Quiz. 176 questions, answered in the comments, with a daily leader.
  • Red Light, Green Light. Likes move you forward on green. Like on red and you are out.
  • Dragon Dojo and Saw Arena. Stick figure duels and physics balls that cut each other down until one is left.
  • Wheel of Fortune. Gifts, follows or 100 likes spin it, and the streamer edits the slices.
  • Lawn Mowing (3D). The one the streamer plays too. A first person three.js field where gifts unlock bigger tools, from a table knife up to a tractor you can drive. The goal is a million blades of grass, and a viewer who types GRASS can make the cut grass grow back.

Each streamer logs in with their own account and gets a separate room, so many streams can run at once. Combo gifts are counted once: TikTok sends an event for every step of a streak, and the server keeps only the difference. There is a test panel to fake events before going live, and an admin panel for users, the game catalogue, live rooms and settings. The interface is in English, Turkish and Azerbaijani.

Built with Python, FastAPI and the TikTokLive library on the server, and plain JavaScript, Canvas and three.js in the browser, talking over a WebSocket. The 3D models and sounds are CC0 assets from Kenney and Freesound. The source code is private.