jessicango / telegiphy Goto Github PK
View Code? Open in Web Editor NEWWebApp for demoday
License: MIT License
WebApp for demoday
License: MIT License
consistent sizes of gifs, and layout of the buttons "gif me" and "pass on"
because I am lazy to delete the trailing parts of the url
A text entry to type in the game token and attempt to join a game.
Django has a messaging framework which can be used for displaying messages. I used it for the PR at #59
Remove the current invalid token message (base.html) and replace it with the aforementioned system.
The actual gameplay of multi
When the game start mechanism is called, it will change the values in the database to disallow any more participants even if they have a valid game token.
I have a suspicion this might have to do with either the refactor or the change in the models due to multiplayer :P
Add all necessary pieces for each milestone as issues and tag them appropriately.
Either actually show the player name, or just remove it entirely for hotseat, since not really needed there (can probably user something like {%if request.session.game_mode == hotseat%}
)
If game token is valid, this will direct player to game lobby. If the token is invalid (either no token exists or game has started), this will give an error.
A button to invoke the start game mechanism
We need to agree on a workflow, or there will be lots of clashing
https://github.com/JessicaNgo/TeleGiphy/blob/workflow/workflow.md
Just run tox
(or install flake8 and run it)
Game over views and UI
I am getting a django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
when I try to run python manage.py check
I suspect this is due to the slightly different settings from the default settings.py
If you pressed 'gif me' in hotseat more than once, without the text being filled, then you will get a "blank gif" (i.e. default giphy gif). This makes it so you can't click on pass gif. If you click on it even more times, it continues to store new sets into the database, with different gif URLs.
This may have been caused by the g.gameround_set.update_or_create
code?
Basically the backend processing before the gameover/results screen. Maybe not needed and just do all processing on the final view
in index.html
I described this in the chat room, but here we go again. I was making some mock responses for gameover and I did the following:
giphy.gif_random
using 'doge' as the tag and got thisgiphy.gif_random
using store shibe
as the tag and got this really long gifWhat do we want to do with really long gifs? Should we check for the total frames and if there's too many, we'll skip them? Or do we not care?
Part of #64 (This should've been part of hotseat too actually)
Diagram and text describing the moving parts of the resulting product.
Mechanism needs to be created to to generate a token for a new game.
Models for various aspects of the game. Few are listed below, thought out with standard SQL columns. Add more in comments if necessary.
The setup steps from the readme is not doing what's intended on Ubuntu.
A few things to that's noteworthy:
pip install -r requirements/local.txt
will yield Could not open requirements file: [Errno 2] No such file or directory: 'requirements/local.txt'
. This is due to the previous $WORKON_HOME...
s failing. I have circumvented this by using pip install -r ~/TeleGiphy/requirements/local.txt
$WORKON_HOME
works, so the echos don't spit out anything. For example:$ echo "export OLD_PYTHONPATH=\${PYTHONPATH}" >> $WORKON_HOME/tele-giphy/bin/postactivate
(ECHO MISSING HERE)
$ $WORKON_HOME/tele-giphy/bin/postactivate
bash: /home/user/.virtualenvs/tele-giphy/bin/postactivate: Permission denied
We need to catch some of the errors during get new gif
Environment:
Request Method: POST
Request URL: http://localhost:8000/game_lobby/2445/choose_new_gif
Django Version: 1.10
Python Version: 3.5.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'game.apps.GameConfig',
'debug_toolbar']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/user/.virtualenvs/tele-giphy/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/home/user/.virtualenvs/tele-giphy/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/home/user/.virtualenvs/tele-giphy/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/user/TeleGiphy/tele_giphy/game/views.py" in choose_new_gif
107. gif = response.json()['data']['image_url']
Exception Type: TypeError at /game_lobby/2445/choose_new_gif
Exception Value: list indices must be integers or slices, not str
We should include tests as a first thing to write for each function/issue/milestone!
This message should be a URL that brings the user to the game, as users won't remember what URL they came from.
There is no reference to the original user that started a chain in the model, which would be a pain in the multiplayer version of the game.
Uses the giphy random endpoint to generate a gif.
Tied to #19
Case: 6 people playing Telegiphy
One player has to initiate a game session. Just like Hangouts, you go to the site and click on a button for a new game. You get a link or (extra feature) send an e-mail invite (or better yet make use of some social media, maybe we can even just use slack to send invites, I think slack would work best since we’ll probably test it out with people from rmotr). You wait until enough people join and the creator has the power to make the game start. When the game starts, the site will:
TWO OPTIONS:
The next person will then guess the correct statement that created that gif. You keep on doing that until the last player comes and then that player makes another word guess. The site then compares the two words by the first and last player and see if they are the same, if so: winner winner chicken dinner. If not then well you lose, bitch.
Game summary: each person’s word and the corresponding gif.
We should keep tally maybe of how many times there was a total success and how many times people had mini wins, obviously weighted since the first few persons had more relevant words. But we can brainstorm on this some more.
Gameplay example:
Need to discuss the idea where the two options diverge first.
PROPOSAL: setup a hangout session tonight 5PM (my time). B&J: that's 2PM for you guys. A: that's 11PM I believe. I'm on East coast time.
Topic: Discuss gameplay. Discuss specs and goals. etc. We can put up a list of stuff we want to discuss in an agenda.
Button that will generate a new game token and display to the user/player.
New uuid is generated when someone goes to game:gameover/#### after user as been signed out. That uuid does not store anything as there was nothing in game.gameround_set.objects
Needs a full set of requirements, as well as any stretch goals.
Which front-end framework do you guys wanna use? Some suggestions:
There's many more, but these seem to be some of the more popular ones. Unless of course someone wants to make the style themselves :P
I remember someone saying we'd use MongoDB, yet at #25 it seems a regular schema was designed? I'm not sure of the compatibility of mongo with Django. A quick Google search returned this for mongo:
https://django-mongodb-engine.readthedocs.io/en/latest/
This is important for the scope as well.
I didn't see any decision on this yet. So what will it be?
There are 2 cases where this happens:
In both these cases, the game registers the user as having moved onto the second round.
Uses the Translate Endpoint to return gif from text.
At the end of hotseat gameplay, the session is not closed, and game cookies remain. This makes it so that the player is unable to start a new game.
going to try to make game working for hotseat gameplay wish me lucky guys
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.