Inspiration

Cards Against Humanity (CAH) has been a hit among college students. But sometimes you get an itching to remember you're going to burn in hell, but are also lacking a CAH deck. In this predicament we usually would use an online version of CAH. However, all of the existing online CAH games are designed for participants who are physically separate, and thus not really playing together. Thus, the social aspect of being in a circle with nothing but cards is lost. We wanted to provide a digital deck that interacts with its users very similarly to an actual deck of cards by bringing back the social aspect of the original, dead tree version.

What it does

Each person's phone displays a listing of the cards they can play, and the Card Czar's phone displays the black card. Upon the selection of a white card to play, a phone presents the back of a white card. The player then places their phone, as if it was a face down white card, on the table. Once all white cards are played, the game server shuffles the upside down white cards between the players' phones, such that the Card Czar cannot identify who played which card by phone. Then, all the white cards simultaneously turn over. The Card Czar taps the white card which they like the most. The white cards then return to the phones from which they were played, and displayed with the phone owner's score. The black card moves to another player/phone, and the cycle repeats.

How we built it

There is static HTML, CSS, and JS served directly to clients through Apache or similar, and a custom game server written in Java. The game server can run multiple lobbies, each with their own set of clients. The client establishes a websocket connection with the game server, which transfers all data between client and server for the remainder of the gaming session. The game server is state based, and thus only executes instructions when invoked by client interaction. The clients listen for state change commands from the server, and in essence act simply as remote viewing ports. The clients have only instantaneous knowledge of what to display, as all logic and data is kept and managed by the game server.

Challenges we ran into

Handling when a client disconnects or reconnects, which could occur at any time. Centering anything on the webpage. CSS. all. the. way. Integration testing. Its difficult to test the client without the server, and vice versa. Hunting down lots of bugs and logical errors. Session management and message routing.

Accomplishments that we're proud of

We actually played a full game. It worked and we had fun. Lewis learned HTML, Javascript, CSS, and Jquery in night.

What we learned

Use split, not substring. Don't be sick for a hackathon. (Pretty sure we'll all be sick on Monday). Websocket! Lots of Javascript and animations. The magic of friendship.

What's next for Bad Apples Against Humanity

The code is very buggy and poorly written. However, we like the concept and believe that it has a lot of potential. As of such, we intend to rewrite a lot of the code and keep it online for others to enjoy.

Note about links

ISU firewalled our domain right after we registered it, so if it doesn't work, go straight to it with the IP.

Share this project:

Updates