A real-time, multiplayer emoji word puzzle game powered by Node.js, Socket.IO, and the Google Gemini AI.
Emoji Guesser is an interactive web game where players compete to guess a secret word based on a sequence of emojis. The twist? The emoji clues are generated on-the-fly by Google's Gemini AI, making every round a unique and creative challenge.
The application is built with a modern, sleek, and responsive dark-themed UI inspired by Vercel and X.com, featuring smooth transitions and a live-updating interface.
- Real-Time Gameplay: Uses WebSockets (via Socket.IO) for instantaneous chat and game events.
- AI-Generated Clues: Integrates with the Google Gemini API to dynamically create emoji clues for random words.
- Dynamic User Profiles: Users are assigned random emoji avatars that change to unique "typing" emojis (
βοΈ,π€,πββοΈ) when they are active. - Live User & Typing Indicators:ors: See who's online and who's currently typing a message.
- Flexible Answer Detection: The game intelligently detects the correct answer even if it's part of a larger sentence.
- Modern, Responsive UI: A sleek, animated landing page and a three-column game layout that looks great on all screen sizes.
- Word Bank: A helpful list of possible words gives players a fighting chance.
This project is built with a modern, full-stack JavaScript toolset.
- Backend: Node.js, Express.js
- Real-Time Communication: Socket.IO
- AI Integration: Google Gemini API
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Deployment: Render
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
- Node.js: Make sure you have Node.js installed (v18.x or later is recommended). You can download it here.
- Git: You'll need Git to clone the repository.
- Google Gemini API Key: You must have an API key from Google AI Studio. You can get one for free here.
-
Clone the repository:
git clone https://github.com/your-username/emoji-guesser.git cd emoji-guesser -
Install NPM packages: This will install all the required dependencies like Express and Socket.IO..
npm install
-
Create your environment file: optional (please uncomment a some code in gemini.js for functional api) Create a new file named
.envin the root of your project directory. This file will hold your secret API key and is ignored by Git.# .env GEMINI_API_KEY="YOUR_API_KEY_HERE"Replace
"YOUR_API_KEY_HERE"with your actual key from Google AI Studio. -
Run the development server:
node server.js
-
Open the application: Open your web browser and navigate to
http://localhost:3000. The game should now be running locally!
This application is ready to be deployed on modern cloud platforms. We recommend Render for its simplicity and generous free tier for Node.js applications.
- Push your code to a GitHub repository.
- Create a new "Web Service" on Render and connect your GitHub repository.
- Use the following settings:
- Runtime:
Node - Build Command:
npm install - Start Command:
npm start
- Runtime:
- Add your Environment Variable:
- Key:
GEMINI_API_KEY - Value:
(Your secret API key)
- Key:
- Deploy! Render will automatically build and launch your application.