Tongits - Classic Filipino Card Game

Seele01-Flash
By
Tongits is a beloved Filipino card game from the Rummy family, designed for three players. Form sets and melds to empty your hand or minimize your score in this strategic and entertaining card game.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Tongits". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Create a polished, 2.5D or 3D tabletop environment mimicking a high-end casual casino atmosphere. Use a clean, vibrant color palette inspired by the screenshot (Gold, Deep Blue, and Felt Green). * **Camera & Perspective**: Use a fixed `PerspectiveCamera` angled at 60 degrees to view the table from the player's perspective (South position). Ensure the layout accommodates 3 players (Player at bottom, CPU Left, CPU Right). * **Card Models**: Use low-poly card meshes with a slight thickness. Textures must be crisp and high-contrast for visibility on small mobile screens. Implement a "highlight" shader when a card is selected. * **Environment**: A round table with a green or blue felt texture. Place a stack of 3D gold coins (low poly count) near the center to represent the pot/betting aspect shown in the reference art. * **Particles**: Simple confetti particle system triggered upon winning ("Tongits" or lowest score). * **Mobile Optimization**: Use a texture atlas for all card faces to reduce draw calls. Limit dynamic lights; use baked lighting or a single directional light with soft shadows. ### 2. Audio Requirements * **BGM**: A relaxing, looping "Lounge Jazz" or "Bossa Nova" track. It should be unobtrusive to allow for concentration. * **Sound Effects (SFX)**: * **Card Snap**: A crisp, satisfying sound when placing a card on the table. * **Shuffle**: Soft ruffling sound at the start of the round. * **Alert**: A distinct chime when it is the player's turn. * **Coins**: A heavy "clinking" metal sound when the pot is won. * **Voiceover (Optional text-to-speech)**: "Fight", "Tongits", "Draw". ### 3. Gameplay Loop * **Setup**: 3 Players total (1 Human, 2 Basic AI). Deal 12 cards to AI, 13 to Dealer (Human starts as dealer for simplicity). * **Turn Logic**: * **Phase 1 (Draw)**: Player must tap the "Draw Pile" (center) OR the "Dump Pile" (face up card). * **Phase 2 (Action)**: Player can "Meld" (lay down sets of 3+ same suit sequence or same rank) or "Connect" (add to existing melds on table). * **Phase 3 (Discard)**: Player must drag a card to the Dump Pile to end their turn. * **Win Conditions**: * **Tongits**: A player empties their hand completely. * **Deck Empty**: If the draw pile runs out, tally points (Face cards=10, Ace=1, Number=Value). Lowest score wins. * **Fight**: If a player calls "Fight", opponents have one turn to challenge. Scores are tallied immediately. * **AI Behavior**: Simple finite state machine—AI prioritizes forming sets, discards high-value cards, and automatically draws if the dump card doesn't complete a set. ### 4. Mobile Controls & Interaction * **Orientation**: **Landscape Mode Only** (Required to fit 13 cards in the hand). * **Touch Interactions**: * **Card Selection**: Tap to select/deselect (card moves up slightly). * **Drag & Drop**: Implement `Raycaster` logic to allow dragging cards from hand to the "Discard Pile" or "Meld Area". * **Sorting**: Auto-sort button to arrange hand by Suit or Rank. * **UI Layout**: * **Action Buttons**: Large, thumb-friendly buttons (min 60x60px) on the right side of the screen for "FIGHT", "MELD", and "SORT". * **Hit Areas**: Expand the invisible touch target for cards by 20% to prevent mis-clicks on small screens. * **Feedback**: * **Haptic**: Trigger `navigator.vibrate(50)` when a card is successfully played or drawn. * **Visual**: Highlight valid drop zones (green glow) when dragging a card. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Tongits is a classic three-player card game that belongs to the popular Rummy family of games. This traditional Filipino card game combines strategy, skill, and a bit of luck to create an engaging experience that has entertained players for generations. The primary objective is simple yet challenging: empty your hand by forming sets (melds) or achieve the lowest score when a fight is called.

Core Features

Authentic Filipino Card Gaming Experience

Tongits brings the authentic Filipino card gaming experience to your digital device. Each game begins with players receiving 12 cards (the dealer gets 13), while the remaining cards form the central draw pile. The strategic depth comes from deciding when to pick up discarded cards, when to form melds, and when to call a fight.

Multiple Game Modes

  • 3-Player Mode : Classic Tongits gameplay with three participants
  • Online Multiplayer : Connect with real players from around the world
  • Private Rooms : Create exclusive games and invite your friends and family
  • AI Opponents : Challenge yourself against advanced artificial intelligence
  • Leaderboard Competition : Climb the ranks and compete for top positions

Advanced AI System

The game features sophisticated AI opponents that provide a genuine challenge. These computer players employ strategic thinking and won't make easy mistakes, ensuring every game remains competitive and engaging.

Social Gaming Features

Enjoy Tongits with friends and family through various social features. Create private rooms for intimate gaming sessions, compete against friends on leaderboards, and connect with the global Tongits community through online multiplayer matches.

Game Mechanics

Basic Gameplay

The game starts when the dealer discards a card. Players take turns either picking up the discarded card (if it helps form a set or adds to an existing meld) or drawing from the central stack. The key is to collect hand combinations while strategically discarding unnecessary cards.

Winning Conditions

There are several ways to win in Tongits:

  1. Tongits Victory : Use all cards in combinations by connecting to opponents' melds or exposed sets
  2. Fight Victory : Call a fight after placing a meld, then have the lowest point total
  3. Empty Stack Victory : When the central stack runs out, the player with the lowest score wins

Strategic Elements

Success in Tongits requires careful observation of opponents' moves, strategic card retention, and timing when to call fights or form melds. Players must balance offensive play (forming their own sets) with defensive tactics (preventing opponents from completing their melds).

Operation Guide

Mouse Controls : Use the left mouse button for all game interactions - Click to select cards from your hand - Click to pick up discarded cards or draw from the central pile - Click to place melds on the table - Click to discard unwanted cards

Touch Controls (Mobile): Simple tap interface for all game actions - Tap cards to select them - Tap buttons to confirm actions - Drag and drop to organize your hand

Why Play This Game

Cultural Authenticity

Tongits offers an authentic Filipino gaming experience, allowing players worldwide to enjoy this traditional card game. Whether you're Filipino looking to connect with your cultural roots or simply interested in exploring international card games, Tongits provides genuine cultural immersion.

Perfect for Social Gaming

The three-player format makes Tongits ideal for small groups. Create private rooms for family game nights or connect with friends online for regular gaming sessions. The social aspect of the game encourages interaction and friendly competition.

Skill Development

Playing Tongits helps develop strategic thinking, memory skills, and decision-making abilities. The game requires players to track discarded cards, anticipate opponents' moves, and make calculated risks.

Cross-Platform Accessibility

Available on web browsers, Android, and iOS devices, Tongits ensures you can play anywhere, anytime. The cross-platform compatibility means you can start a game on your computer and continue on your mobile device.

Achievement System

The game includes numerous achievements to unlock, providing long-term goals and motivation to improve your gameplay. These achievements recognize various accomplishments, from winning streaks to mastering specific strategies.

Stress Relief and Entertainment

Tongits serves as an excellent way to unwind and relieve daily stress. The engaging gameplay provides a mental break from routine activities while offering exciting moments and social interaction.

Frequently Asked Questions (FAQ)