Join the hype and play 4 GIFS 1 WORD, the ultimate puzzle game of the 21st century. Choose a category, marvel at four related gifs, and spell out the word that connects them all together. Each word guessed correctly wins you a whopping 100 points—the more you get, the higher you climb on the rankings. Challenge yourself and your friends to see who can get to the top.
Watch our demo here!
- Variety of word categories
- Automatic gameplay with both mouse-click and keyboard input
- Gif zoom pop-ups
- Gif and word flagging option
- Realtime app statistics
- Saved scores and rankings for authenticated users
4 GIFS 1 WORD uses the Datamuse API to find hyponyms (words of more specific meaning than a general term) of specific hand-picked categories. From a set of hyponyms, a selected keyword is generated, along with four corresponding gifs from the Giphy API. Note: Some words are selected from plain text files for greater word accuracy to its respective category.
When a user plays the game, their score and history are saved in database tables so that each round produces fresh, tasteful gifs. Users can additionally flag inaccurate or inappropriate words and gifs.
This app works on Chrome, Safari, and Firefox.
- Python 2.7
- Flask
- Requests
- SQLite3
- HTML/CSS
Flask needs to be installed in order to run this program. It is ideally stored in a virtual environment (venv).
To install a venv called <name>
, run these commands in your terminal:
$ pip install virtualenv
$ virtualenv <name>
On Mac/Linux, start up your venv with:
$ . <name>/bin/activate
On Windows:
$ . <name>/Scripts/activate
In your activated venv, run the following:
$ pip install flask
$ pip install requests
Download SQLite3 here.
The Giphy API provides a collection of gifs based a query string. 4 GIFS 1 WORD uses this API to retrieve gifs corresponding to a given word.
For your Giphy API key:
- Click Create an App.
- Enter account credentials.
- Enter app name and description (4 GIFS 1 WORD, word puzzle game with gifs).
- Your key will appear on your dashboard.
Clone the repo and move into it:
$ git clone git@github.com:slau8/shaolin-dragons.git
$ cd shaolin-dragons
Open .secrets.txt
and add your API key in its appropriate location. For example:
{
"giphy" : "this_is_my_api_key"
}
After you run the app, you may receive an error due to one of these issues:
- Incorrect .secrets.txt format
- Incorrect API key
- Exhausted API key
These issues can be fixed by executing the API configuration instructions again. (An exhausted API key may require retrieving a new key).
With your virtual environment activated, run:
$ python app.py
You can now view the webpage by opening the URL localhost:5000
in Chrome, Firefox, or Safari.
Jasper Cheung, Shannon Lau, Carol Pan, Helen Ye
Name | Role |
---|---|
Jasper (PM) | Category and word selection |
Shannon | Front-end, game animations |
Carol | Databases, word flagging |
Helen | API calls, gif flagging |