grimpunch / cardsagainstonline Goto Github PK
View Code? Open in Web Editor NEWPython based flask based SSE implementation of multiplayer cards against humanity for online and offline users
License: MIT License
Python based flask based SSE implementation of multiplayer cards against humanity for online and offline users
License: MIT License
The creators of Cards Against Humanity welcome people building upon their work, but maintain ownership of the name and generally advise clones to change their name, so for the user facing parts of the application it may be a good idea to change the name
In-case someone who comes along who is good with design/front end stuff; rather than putting lots of effort to do a mediocre design job that will be scrapped, I am just bare-bonesing/placeholdering the game itself whilst hopefully getting backend stuff done and playable.
Also actually having the game done, and just need to improve it/tweak it seems less overwhelming and more fun to work on, than refactoring the code of something unplayable.
Currently there is the basis of showing the player's hand, but not a way to submit cards to be judged...
So this will possibly be dependent on that.
The players connected the game server, if they are the czar, need to only see the black card in question during the phase where cards are submitted, and then when judging starts, shown in the submitted cards in a page that allows sequences of cards from all players to be shown, and tapping to select the winning submission, which is fed back to the server.
After that display who's submission it was, (it will also be displayed on the main screen gui too)
The main screen will say who the current card czar is , and show the black card that has been drawn for the round.
This will also need to show a timer for the remaining time for the current selection of white cards, and a timer for the judging after that.
Lastly, a scoreboard would be nice , showing the names of connected players.
Local network players will need to enter their name, and then join the game they are playing.
The server will display a unique room code for them in case other CAO servers are on the same network
so leave a space for this code to be entered.
This data will be sent to the server via websockets to tornado.
Then the player will be registered with the current game and dropped into the game screen.
Create a thread for websocket communication with the game client, that can receive and send jsonified messages relating to game state to the application
We need to make a way of creating decks and writing them out to json. Then also we need to be able to load from that and populate the editor
So look at cards.json to see the specification of the card json,
This is the file that should be read and written to for creating decks to play with.
Following that format, and saving the id's incrementally would be the best approach for saving.
as of 35da1db hosting a game works and you can get players to join
However if you have a stale cookie, the server excepts and the page fails silently, we need to smoothly redirect people to Login and invalidate their cookie.
PS: Sessions are fun.
http://flask.pocoo.org/snippets/51/
Possible implementation can be done via the class outlined on slack. Comment here if I forget to link it
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.