Comments (4)
By the way, hows ruby on dynamically injected content? instead of refreshing pages, could we work some ajax magic into it?
I'm trying to keep the application architecture simple while possible, with only one type of rendering (server-side currently). Adding AJAX would split the game logic and the rendering logic between frontend and backend, so we'd need to see the value far outweigh the added complexity.
There's Stimulus.js all set up, it's a very minimal JavaScript framework that integrates well with Ruby on Rails.
Eventually I'd love to set up the app so that there's server side rendering triggered by events, running in Sidekiq, streamed to all players of a game, and Stimulus can use it to replace the HTML content
from cards_against_humanity.
Good idea! From the official rules:
If a player must shed a white card due to ignorance of its content, they must announce it to the whole group, and be shamed for their lack of being in the know. Humiliation is encouraged.
I'd love to find a way to make this happen in this virtual game. There's no activity log or popup or anything currently, but I'm picturing a flash at the top of the page that says something like:
Kevin doesn't know what "Swooping" means, so they picked a new card.
And a button to close that warning, so that each player sees and does something about it.
The copy would need to work for longer cards as well, and the UI needs to work even if all players start swapping cards left and right, and we'd also need to figure out what the process of picking a card to swap looks like.
What do you think, @FriendlyWP?
from cards_against_humanity.
@KevinBongart I think that's a fantastic idea! I agree the UI will be a challenge, both in terms of layout and queuing up & displaying multiple actions as players all decide to do this simultaneously. Maybe you could limit it to one swap per round per player to help with that.
In terms of choosing a new card, maybe you could add a little 'swap' icon at the very top right on each card? There are a bunch of options on FontAwesome that could work: https://fontawesome.com/icons?d=gallery&q=swap
Then when it's clicked, a "You're about to swap this card and be shamed in front of all your friends, are you sure, loser?" type notice could come up with a confirmation button, and the card would be swapped to a random new one.
Does that help? I absolutely love the game you've made by the way, thank you so much! I played it with friends over the weekend and other than some loading issues it was AMAZING. You're so good! :)
from cards_against_humanity.
Good idea! From the official rules:
If a player must shed a white card due to ignorance of its content, they must announce it to the whole group, and be shamed for their lack of being in the know. Humiliation is encouraged.
I'd love to find a way to make this happen in this virtual game. There's no activity log or popup or anything currently, but I'm picturing a flash at the top of the page that says something like:
Kevin doesn't know what "Swooping" means, so they picked a new card.
And a button to close that warning, so that each player sees and does something about it.
The copy would need to work for longer cards as well, and the UI needs to work even if all players start swapping cards left and right, and we'd also need to figure out what the process of picking a card to swap looks like.
What do you think, @FriendlyWP?
I added a toast on a switch card event that broadcasts to the game. it works great and will be a fun addition. making a pr of it.
By the way, hows ruby on dynamically injected content? instead of refreshing pages, could we work some ajax magic into it?
from cards_against_humanity.
Related Issues (17)
- Fix "spread your cards" issue, players cannot scroll through or select cards HOT 3
- Ensure unique game slugs HOT 1
- Create your own cards HOT 2
- Display submissions while the Card Czar is reading them HOT 1
- Extract view logic to a decorator
- Support "Pick 2" black cards
- Problem with sockets / cable HOT 5
- Have some sort of indication when the Card Czar is picking a winner
- Be able to kick players HOT 18
- Handle reconnects HOT 1
- Roomcreator HOT 8
- Display the player list so that the Card Czar is always at the top
- Warn Card Czar if not all players have submitted answers before 'pick a winner' HOT 1
- Build issue on Ubuntu 20.04 HOT 1
- Ubuntu 20.04 create DB errors. HOT 1
- How to select a different deck? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cards_against_humanity.