A Tetris-inspired word game where falling letters are used to form words and clear the board.
This project was co-created by the user and an AI assistant (vibecoded).
- Letters fall from the top of the screen, one at a time.
- Use the arrow keys on your keyboard to move the falling letter left or right.
- Press the down arrow key to make the letter fall faster.
- Press the spacebar to make the letter drop immediately to the bottom.
- On mobile devices, on-screen touch controls are available for Left, Right, Down, and Drop.
- Form words of 4 or more letters horizontally or vertically.
- When a valid word is formed, it will be cleared from the board, and you'll score points.
- The game ends if the letters stack up to the top of the board.
- Classic Tetris-like falling block gameplay with a word-forming twist.
- Dynamic scoring based on the length of the words formed.
- Dictionary-based word validation.
- Responsive design with on-screen controls for mobile play.
- Letter frequency modeled on English language for a balanced gameplay experience.
- HTML: Structure of the game page.
- CSS: Styling for the game interface and responsiveness.
- JavaScript (Vanilla): All game logic, including piece movement, word detection, scoring, and rendering.
- Python: A utility script (
process_words.py) is used to process a raw word list (words.txt) into a JSON dictionary (simple_dictionary.json) for the game.
index.html: The main HTML file that sets up the game page and canvas.styles.css: Contains all CSS rules for styling the game elements and mobile responsiveness.game.js: The core JavaScript file containing all game logic, including piece control, grid management, word checking, scoring, and drawing.simple_dictionary.js: JavaScript to load and manage the word dictionary (simple_dictionary.json) used for word validation.simple_dictionary.json: The processed list of valid words used by the game (generated byprocess_words.py).words.txt: A raw text file containing a list of words, one per line. This is the source forsimple_dictionary.json.process_words.py: A Python script to readwords.txt, filter words (e.g., by minimum length), and createsimple_dictionary.json.vercel.json: Configuration file for deploying to Vercel.
- Ensure you have a web browser.
- If you modify
words.txtor the filtering criteria inprocess_words.py, run the Python script to update the dictionary:python process_words.py
- Open the
index.htmlfile in your web browser to play the game locally.
This game is configured for easy deployment to Vercel.
- Install the Vercel CLI:
npm install -g vercel - Log in to Vercel:
vercel login - Link your local project to a Vercel project (if not already done):
vercel link
- Deploy to production:
vercel --prod
This project was developed by the user with assistance from an AI (vibecoded).