Proximity is a live word game where Reddit users worldwide compete to guess the secret word first.

Inspiration

I originally created Proximity as a single-player game. After seeing people play it, I realized that the difficulty level was too high for a solo game. It can be easy to run out of ideas on words to guess! But as it turns out, the game was fun when playing with friends. Other players guesses can help you triangulate to the secret word. I figured it would be a great candidate for the Reddit hackathon, since the game is simple to learn, can be played quickly, and improves with more players.

How it works

  • Meaning over spelling: This game isn’t about how words sound or are spelled; it’s about their meaning. The AI ranks your guesses based on how contextually similar they are to the secret word.
  • The ranking system: Each guess you make gets a rank. A lower rank means you're closer to the secret word. The ultimate goal? Guess the word ranked at #1!
  • Compete live: The best 18 guesses from players all over the globe are displayed in real-time.

How we built it

The AI-driven similarity scores were calculated using the word2vec, a natural language processing model originally developed by Google. First, I built a custom word list which filtered out rare words. Then I used the model to generate lists of all words and their similarity to randomly selected secret words. The front end was built with Devvit in Typescript using blocks-post, with Redis as the database.

Challenges we ran into

Handling state in a live game can be tricky. Especially when thinking about edge cases - i.e. what if a player submits an answer after the word has already been found? But after some testing (and accidentally flooding the subreddit with hundreds of posts) things are in a stable state!

What's next for Proximity

I'm excited to see how Proximity handles scale once 1000 users are playing the game simultaneously! If traffic grows, I can make adjustments as needed. For instance, introducing a timer so a player can only submit a new guess every 30 seconds. But really, it depends on what the community asks for!

Built With

Share this project:

Updates