Skip to content

A small Python game that randomly generates word searches, with level progression and local saving.

Notifications You must be signed in to change notification settings

Inkflow59/PyWordExplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ค PyWordExplorer

An interactive word search game in Python with level system, seed-based random generation, and progress saving.

โœจ Features

  • ๐ŸŒ Multilingual: French, English, Spanish with translated interface and words
  • ๐Ÿ“š Complete Dictionaries: Words pulled from real dictionaries (thousands of words per language)
  • ๐Ÿ”„ Automatic Download: Dictionaries are downloaded and cached on first launch
  • ๐ŸŽฒ Random Generation: Grids generated with a seed system for reproducibility
  • ๐Ÿ“Š 5 Difficulty Levels: From beginner to expert with increasing grids (8ร—8 to 16ร—16)
  • โฑ๏ธ Dynamic Timer: Time adapted to each level (3 to 8 minutes)
  • ๐Ÿ’พ Auto-save: Resume your game at any time
  • ๐ŸŽฏ Scoring System: Time bonus to reward speed
  • ๐Ÿ”„ Replayability: Replay any grid with its seed
  • ๐ŸŽจ Graphical Interface (Tkinter): Modern interface with click-and-drag system
  • ๐Ÿ–ฑ๏ธ Intuitive Selection: Find words by clicking and dragging on the grid
  • โœ… Visual Validation: Found words are highlighted in green
  • โš™๏ธ Customizable Settings: Change language at any time
  • ๐ŸŒ Online Multiplayer: Play with friends in Duel or Coop mode (requires websockets)

๐Ÿ“‹ Requirements

  • Python 3.7 or higher
  • No external dependencies for single-player (uses only standard library)
  • For multiplayer mode: websockets library (install with pip install websockets)

๐Ÿš€ Installation

  1. Clone the repository:
git clone https://github.com/Inkflow59/PyWordExplorer.git
cd PyWordExplorer
  1. Launch the game:
python main.py

Note: On first launch, the game will automatically download word dictionaries from GitHub (about 1-2 MB per language). These dictionaries will be cached in the dict_cache/ folder for later offline use.

๐ŸŽฎ How to Play

Available Languages

The game is available in 3 languages with complete dictionaries:

  • ๐Ÿ‡ซ๐Ÿ‡ท Franรงais: Over 324,000 French dictionary words
  • ๐Ÿ‡ฌ๐Ÿ‡ง English: Over 270,000 English dictionary words
  • ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol: Over 635,000 Spanish dictionary words

Words are randomly selected from real dictionaries for infinite variety!

Change language at any time via Game โ†’ Settings!

Graphical Interface

The graphical interface offers an intuitive experience with:

  • Interactive Grid: Click and drag to select words
  • Word List: On the right side of the screen, found words are crossed out
  • Real-time Timer: Display of remaining time with color coding
  • Dynamic Score: Updated in real-time
  • Translated Interface: All menus and messages in your language

Starting a Game

  1. New Game: Choose a level from 1 to 5
  2. Continue: Resume your last saved game (if available)
  3. Load: Select a specific save from the list
  4. Replay with Seed: Enter a seed to replay an exact grid

Game Controls

  1. Click on the first letter of a word
  2. Hold and drag to the last letter
  3. Release to validate the selection

If the word is correct:

  • โœ… Cells turn green
  • โœ… The word is crossed out in the list
  • โœ… Your score increases

In-Game Menu

Use the menu bar at the top to:

  • Save your game at any time
  • Return to main menu
  • Access help and information

Objective

Find all hidden words in the grid before the timer runs out!

Words can be placed:

  • Horizontally (โ†’)
  • Vertically (โ†“)
  • Diagonally (โ†˜ โ†—) - From level 2
  • Backwards - From level 4

๐Ÿ’ก Tip: Words can be selected in both directions!

๐ŸŒ Multiplayer Mode

PyWordExplorer now supports online multiplayer! Play with friends in two exciting modes:

Game Modes

  • ๐Ÿ†š Duel Mode: Compete against other players - first to find a word wins the points!
  • ๐Ÿค Coop Mode: Work together to find all words - share the victory!

Quick Start

  1. Install the websockets library:

    pip install websockets
  2. Launch the server (one player hosts):

    python server.py
  3. Launch the game (all players):

    python main.py
  4. Connect: Click "๐ŸŒ Online Multiplayer" in the main menu

  5. Play: Create or join a game, select a difficulty level, and start playing!

Network Setup

  • Local play: Use localhost:8765
  • LAN play: Use server's local IP (e.g., 192.168.1.100:8765)
  • Internet play: Use server's public IP with port forwarding

For detailed multiplayer instructions, see MULTIPLAYER.md.

๐Ÿ“Š Levels

Level Size Words Time Difficulty
1 - Beginner 8ร—8 5 3 min Horizontal, Vertical
2 - Easy 10ร—10 7 4 min Horizontal, Vertical
3 - Medium 12ร—12 9 5 min + Diagonals
4 - Hard 14ร—14 11 6 min + Reversed words
5 - Expert 16ร—16 14 8 min + Reversed words

๐Ÿ—๏ธ Architecture

PyWordExplorer/
โ”œโ”€โ”€ main.py                 # Main entry point
โ”œโ”€โ”€ config.json             # Configuration (selected language)
โ”œโ”€โ”€ requirements.txt        # Dependencies (none external!)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ gui.py              # Multilingual Tkinter GUI
โ”‚   โ”œโ”€โ”€ language.py         # Translation system (FR/EN/ES)
โ”‚   โ”œโ”€โ”€ word_generator.py   # Dynamic generator from dictionaries
โ”‚   โ”œโ”€โ”€ grid_generator.py   # Grid generation with seed
โ”‚   โ”œโ”€โ”€ game_logic.py       # Game logic and level system
โ”‚   โ”œโ”€โ”€ save_manager.py     # Save management (JSON)
โ”‚   โ””โ”€โ”€ word_lists.py       # [Legacy] French word lists
โ”œโ”€โ”€ dict_cache/             # Downloaded dictionaries cache
โ”‚   โ”œโ”€โ”€ fr_words.txt        # ~324K French words
โ”‚   โ”œโ”€โ”€ en_words.txt        # ~270K English words
โ”‚   โ””โ”€โ”€ es_words.txt        # ~635K Spanish words
โ”œโ”€โ”€ saves/                  # Save folder (created automatically)
โ””โ”€โ”€ README.md

๐Ÿ’ก Usage Examples

First Launch

On first startup, the game automatically downloads dictionaries from GitHub:

โณ Downloading dictionary fr...
โœ“ Dictionary fr downloaded (324290 words)
โณ Downloading dictionary en...
โœ“ Dictionary en downloaded (270528 words)
โณ Downloading dictionary es...
โœ“ Dictionary es downloaded (635005 words)

Dictionaries are then cached locally for offline use.

Replay a Specific Grid

If you enjoyed a particular grid, note its seed (displayed at the top of the screen) and use the "Replay with seed" option to regenerate it exactly.

Share a Challenge

Share your seed with friends so they can play the same grid as you!

Level 3 | Seed: 123456

๐ŸŽฏ Scoring System

Score is calculated as follows:

  • 100 points per word found
  • Time bonus: 2 points per remaining second

Example: 9 words found with 45 seconds remaining = 900 + 90 = 990 points

๐Ÿ”ง Customization

Add Your Own Words

Edit src/word_lists.py to add your own words or create new categories:

FRENCH_WORDS = [
    "YOUR", "NEW", "WORD",
    # ... add your words here
]

Modify Levels

In src/game_logic.py, modify the LEVELS list:

LEVELS = [
    Level(1, size, nb_words, time, diagonals, reversed),
    # ...
]

๐Ÿ“ Save Format

Saves are stored in JSON format in the saves/ folder:

{
  "timestamp": "2025-10-31T12:00:00",
  "version": "1.0",
  "game_state": {
    "level": 3,
    "seed": 123456,
    "found_words": ["CHAT", "CHIEN"],
    "remaining_time": 180.5
  }
}

๐Ÿค Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Add word lists
  • Improve documentation

๐Ÿ“œ License

This project is under MIT license. See the LICENSE file for more details.

๐Ÿ“ธ Screenshots

Main Menu

Modern interface with clear buttons to start a new game, continue, load, or replay with a seed.

Game Screen

  • Interactive Grid with clickable cells
  • Word List on the right side
  • Timer and score in real-time
  • Seed display for replayability

Visual Feedback

  • Blue: Selection in progress
  • Green: Word found and validated
  • White: Unused letters

๐ŸŽจ Possible Future Improvements

  • Graphical interface (Tkinter) โœ…
  • Multilingual support (FR/EN/ES) โœ…
  • Dynamic word generator โœ…
  • Online multiplayer mode โœ…
  • Animations when discovering words
  • Sound effects
  • Detailed statistics (progress charts)
  • Selectable word themes in the interface
  • Visual hint system (with penalty)
  • Arcade mode (limited time per word)
  • Online leaderboard with daily seed
  • More languages (German, Italian, Portuguese, etc.)
  • Customizable color themes
  • Integrated dictionary for word definitions

๐Ÿ‘จโ€๐Ÿ’ป Author

Inkflow59 - GitHub

๐Ÿ™ Acknowledgments

Thank you for choosing PyWordExplorer! Have fun! ๐ŸŽ‰


Created with โค๏ธ in Python

About

A small Python game that randomly generates word searches, with level progression and local saving.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages