Git Product home page Git Product logo

Comments (4)

KevinBongart avatar KevinBongart commented on September 22, 2024 1

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.

KevinBongart avatar KevinBongart commented on September 22, 2024

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.

FriendlyWP avatar FriendlyWP commented on September 22, 2024

@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.

haviduck avatar haviduck commented on September 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.