High-Performance Real-Time Multiplayer Drawing and Guessing Game Engine
Drawly is a sophisticated, full-stack multiplayer entertainment platform designed to revolutionize how people experience collaborative online gaming. By merging the synchronization power of Socket.IO with a robust TypeScript-driven architecture, Drawly provides players with an automated, high-fidelity game engine. It doesn't just host a room; it orchestrates live canvas states, validates guesses in real-time, and transforms raw player interactions into a seamless competitive experience.
Casual online gathering platforms and multiplayer party games often suffer from high setup frictionβrequiring bulky downloads, third-party client installations, mandatory account creations, or heavy processing overhead. Furthermore, real-time synchronization of canvas strokes and live guessing feeds over standard HTTP connections introduces distracting latency, breaking the fluid, split-second timing required for fast-paced social gaming.
Drawly eliminates the friction of traditional online party gaming through a coordinated full-stack architecture:
-
Interactive Frontend: Provides a high-performance React-based interface where players can draw, guess, and compete on an interactive canvas with zero installation required.
-
Robust Backend Orchestration: Built on Node.js and Express, the server manages the entire game workflow, ensuring seamless communication between all connected clients and the game engine.
-
Real-Time Event Pipeline: Implements a modular socket handler architecture with dedicated pipelines for canvas events, chat validation, room lifecycle, and round management.
-
WebSocket-Powered Intelligence: Leverages Socket.IO to synchronize drawing coordinates, guess validation, and score updates across all connected players with sub-millisecond latency.
-
Actionable Visualization: Delivers a live Leaderboard Dashboard that transforms raw game events into immediate competitive standings and clear score insights.
-
Room Lifecycle Management: Closes the loop by managing isolated private sessions, turn-based drawing rotations, and automated round transitions.
Built on a Component-based Architecture (Frontend) && WebSocket Event System (Backend), ensuring modularity && scalability.
- Frontend: A Vite-powered React application focusing on high-performance canvas rendering and a seamless player journey.
- Backend: A TypeScript Express server emphasizing type-safe operations, real-time event dispatching, and in-memory state orchestration.
Transform mouse strokes into instantly shared visual data. The canvas engine broadcasts high-fidelity vector coordinates to every connected player the moment the drawer lifts a finger.
- User Benefit: Drawers enjoy fluid stroke feedback, and guessers view real-time representations without lag or visual stuttering.
An in-game messaging panel that separates standard chat talk from correct guesses, powered by server-side string matching logic.
- User Benefit: Encourages interactive banter while automatically detecting and censoring correct words to preserve the game's challenge.
Drawly is fortified with dynamic room allocation powered by local server-side state machines, including isolated session management and automated player roster tracking.
- User Benefit: Allows groups of friends to play in isolated sessions with custom word lists and dedicated player rosters.
Auto-calculating scoreboard component displaying player standings instantly, updated in real-time after every successful guess.
- User Benefit: Adds an exciting competitive element by visually highlighting point updates based on speed and guessing accuracy.
Integrated onboarding system captures new player attention via an informative modal detailing key mechanics and control layouts.
- User Benefit: Eliminates onboarding hurdles, enabling new players to grasp rules and interface configurations instantly.
Leveraging Tailwind CSS v4, the system generates pixel-perfect layouts across arbitrary viewing dimensions, providing context that rigid CSS frameworks miss.
- User Benefit: Ensure uniform, pixel-perfect visual fidelity across laptops, desktop monitors, and mobile displays.
Drawly utilizes a modern, type-safe stack designed for reliability and developer productivity.
| Technology | Purpose | Why it was Chosen |
|---|---|---|
| TypeScript | Primary Language | Provides robust type safety across the entire stack, reducing runtime errors in WebSocket message payloads. |
| React (v19.2.6) | Frontend Framework | Enables a reactive, component-based UI for complex state management in the canvas and leaderboard. |
| Express | Backend Framework | A lightweight, flexible Node.js framework ideal for building high-performance event-driven server applications. |
| Socket.IO | Real-Time Transport | Facilitates low-latency, TCP-based duplex communication channels between drawing clients and the game engine. |
| Tailwind CSS (v4.3.0) | Utility-First Styling | Enables rapid prototyping of components and highly custom UI themes with compiled CSS footprints. |
| Vite (v8.0.12) | Build Tooling | Delivers hot module replacement (HMR) and optimal compilation pipelines for rapid development feedback cycles. |
vikasingh0897-Drawly-190ebe0/
βββ π .gitignore # Global Git ignore profiles
βββ π backend/ # Node.js + Express WebSocket backend application
β βββ π package.json # Backend dependency and script manager
β βββ π package-lock.json # Strict version lock for backend libraries
β βββ π tsconfig.json # Backend TypeScript compiler options
β βββ π src/ # Backend source code
β βββ π app.ts # Express initialization and server configuration
β βββ π index.ts # Application bootstrapper and socket listener
β βββ π store/ # In-memory storage components
β β βββ π words.ts # Database of guessable words and terminology lists
β β βββ π room.ts # Active room states, roster lists, and game round engines
β βββ π socketHandlers/ # Dedicated event-handling pipelines
β βββ π canvasHandler.ts # Synchronizes canvas drawing coordinates and brush styles
β βββ π chatHandler.ts # Processes messages, filters spoilers, and awards guess points
β βββ π roomHandler.ts # Manages room creation, join bounds, and user lifecycles
β βββ π gameHandler.ts # Controls active game loops, round configurations, && turn timers
βββ π frontend/ # React Single-Page Web Application
βββ π vite.config.ts # Vite compilation and proxy configurations
βββ π tsconfig.app.json # App-specific TypeScript definitions
βββ π eslint.config.js # Linter rules configuration
βββ π package.json # Frontend dependency and script declarations
βββ π package-lock.json # Lock file for frontend dependencies
βββ π tsconfig.json # Parent TypeScript project configurations
βββ π tsconfig.node.json # Node-focused compiler configurations for Vite config
βββ π index.html # Main HTML entry mount point
βββ π src/ # Frontend source files
β βββ π main.tsx # Main application bootstrapper
β βββ π App.tsx # Root component hosting routing configurations
β βββ π socket.ts # Centralized WebSocket instantiation client
β βββ π index.css # Global stylesheets and Tailwind CSS setup
β βββ π pages/ # Primary client-side view routers
β β βββ π GamePage.tsx # Active game interface (Canvas, Chat, Leaderboard)
β β βββ π LandingPage.tsx # Entrance portal for creating or joining lobby sessions
β βββ π components/ # Reusable structural and visual elements
β βββ π Leaderboard.tsx # Real-time player score tracker
β βββ π Footer.tsx # System-wide copyright and styling anchors
β βββ π Chat.tsx # Collaborative discussion and guessing console
β βββ π Header.tsx # Global title header and navigation indicators
β βββ π Canvas.tsx # Optimized mouse-tracking and draw-rendering board
β βββ π HowToPlay.tsx # Informative onboarding modal for game controls
βββ π public/ # Static assets directory
βββ π drawly-og-image.png # OpenGraph preview card
βββ π drawly-icon.svg # Scalable Vector Graphics application icon
- Node.js: v18.0.0 or higher
- TypeScript: v5.0+ (installed via devDependencies)
-
Clone the Repository
git clone https://github.com/vikasingh0897/Drawly.git cd vikasingh0897-Drawly-190ebe0 -
Backend Setup
cd backend npm install npm start -
Frontend Setup
cd ../frontend npm install -
Running the Development Environment
- Start Backend:
cd backend npm start - Start Frontend:
cd frontend npm run dev
- Start Backend:
- Navigate to
https://drawly-frontend.onrender.com/in your browser. - Enter a display name on the
LandingPageand click Create Room. - Share the generated room code with friends, who can enter it to join.
- Once the game begins, the active drawer selects a secret word and begins drawing on
Canvas.tsx.
- Upon each successful guess, the
Leaderboard.tsxupdates instantly with new point totals. - The
Chat.tsxpanel filters the guessed word from the public feed, preserving the challenge for remaining players. - At the end of each round, the game engine rotates to the next drawer and begins a new turn automatically.
Run these commands from the /frontend directory:
npm run dev: Boots up the local development preview with Hot Module Replacement (HMR).npm run build: Compiles TypeScript assets and generates production-optimized client assets via Vite.npm run lint: Analyzes the frontend codebase for formatting and stylistic rule violations using ESLint.npm run preview: Launches a local preview server to test the production build directory locally.
We welcome contributions to improve Drawly! Your input helps make this project better for everyone.
-
Fork the repository - Click the 'Fork' button at the top right of this page
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes - Improve code, documentation, or features
-
Test thoroughly - Ensure all functionality works as expected
npm run build
-
Commit your changes - Write clear, descriptive commit messages
git commit -m 'Add: Amazing new feature that improves real-time sync' -
Push to your branch
git push origin feature/amazing-feature
-
Open a Pull Request - Submit your changes for review