Skip to content

Latest commit

ย 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

Here is the English version of the README.md file, perfectly formatted for your GitHub repository: ๐Ÿ”ฅ Truda ยท Truth or Dare

A modern and elegant "Truth or Dare" game supporting both solo and live multiplayer modes with instant chat! Features over 300 diverse truths and dares in both Arabic and English.

๐ŸŸข Play Now: https://anas68755.github.io/Truda ๐Ÿค– AI Creation Note

This game was entirely designed and coded using Artificial Intelligence (AI). From writing the HTML/CSS/JS code to designing the user interface, generating the prompts, and engineering the multiplayer and chat networking logic. This project demonstrates the capability of AI to build complete, high-performance web applications without a single line of code written manually by a human. โœจ Features

๐ŸŒ Multiplayer Mode: Play with your friends in real-time by creating a room and sharing the code. Any prompt you draw will instantly appear on their screens!
๐Ÿ’ฌ Live Chat: Communicate with players in your room while playing.
๐Ÿ‡ธ๐Ÿ‡ฆ Bilingual Support: Fully supports both Arabic and English with instant language switching for the UI and prompts.
๐Ÿ”ข 300+ Prompts: A massive and diverse collection of revealing truths and fun dares.
๐Ÿ’พ High Privacy: Chat messages are temporarily stored in your browser (SessionStorage) and are instantly wiped the moment you close or refresh the page, ensuring no personal data is left behind.
๐Ÿ“ฑ Responsive Design: Works flawlessly on both mobile devices and desktop computers.
๐ŸŽน Keyboard Shortcuts: 
    T to draw a "Truth".
    D to draw a "Dare".
    R to draw a random prompt.

๐ŸŽฎ How to Play (Multiplayer Mode)

Click the "๐Ÿ‘ฅ Multiplayer" button at the top.
Enter your nickname and a room code (e.g., ROOM1234). If you leave the code blank, a random one will be generated for you.
Click the "Connect" button.
Share the code with your friends so they can enter it and join the same room.
Enjoy the game! Any prompt you draw will appear on their screens, and you can chat in the panel below.
When you're done, click the "Leave" button to disconnect and start fresh.

๐Ÿ› ๏ธ Tech Stack

HTML5 / CSS3: For structuring and styling the user interface.
Vanilla JavaScript: For the game logic and state management.
MQTT.js (WebSockets): For direct Peer-to-Peer (P2P) connection between players without needing a custom backend, using the public broker.emqx.io server.
SessionStorage API: For temporarily saving chat data during the session.
GitHub Pages: For free and seamless game hosting.

๐Ÿš€ Local Deployment

If you want to run the game on your machine or modify it:

Clone or download this repository.
Open the index.html file in any modern web browser (Chrome, Safari, Firefox).
No installation or servers required; the game runs entirely in the front-end.

๐Ÿ“œ License

This project is open-source and available for use and modification under the MIT License.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages