%--
Copyright (c) 2012, Andy Janata
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--%>
<%--
Index page. This is currently entirely static HTML, but may eventually require some server-side code
to, for instance, display the number of connected players.
@author Andy Janata (ajanata@socialgamer.net)
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
Cards Against Humanity
This webapp is still in development. There will be bugs, but hopefully they won't affect gameplay
very much. To assist with development, all traffic on this server may be
logged.
The name you enter and your computer's IP address will always be logged when you
load the game client. Chat and gameplay may also be logged.
Known issues:
Do not open the game more than once in the same browser. Neither instances
will receive all data from the server, and you will not be able to play. I have an idea on how to
fix this, but I haven't had time to do so.
This game was extensively tested in Google Chrome.
It should work in all recent versions of major browsers, but it may not look 100% as intended. If
you find a major issue, please
email me
with a screenshot and the name and version of the browser you are using, and I'll try to fix it.
That having been said, the chat area doesn't work right at all in Opera. The game still
plays properly, but no log messages work. This is rather low on my to-do list as Opera isn't
very popular anymore it seems. :(
You may not always see your card in the top area after you play it, but it has been played.
Also, sometimes the card will display in the top area but be small. I have no idea why either of
these happen.
If you refresh in the game, an error will pop up in the log briefly before the refresh
happens. It is safe to ignore.
You may see an error after joining a game. As the error message states, this is safe to
ignore. I will figure out a way to make this not show up.
Interface elements may not be perfectly sized and positioned immediately after loading the
page if your window is sufficiently small. Resize the window to fix.
A player joining the game in progress may have a slightly incorrect representation of the
game state until the next round begins.
Reloading the page when the winning card is displayed does not display the winning card
again.
Played cards seem to blank when someone joins (or leaves?). You may have to refresh the page
to see the cards again if you're the Card Czar.
Current limitations:
Support for Black Cards with "pick" and/or "draw" annotations is rudimentary. When you play
your cards, it does not group them until the judging starts. Also, when other players play cards,
you do not see any progress from them until they have played all 2 or 3 cards, and it only shows
a single face-down card for them. I will try to make this look nicer, but it works.
Also, you cannot un-do your first (or second) card: Once it's played, it's played.
While judging, only one card will be highlighted. It does not matter which card in a group
you click, the game will figure it out.
I know that when you have a lot of players, especially with Pick 2 or Pick 3, it gets very
hard to read, and cards overlap (and underlap) your hard, and are hard to click sometimes.
I'll work on this soon. You can resize the window to try to help if you're having problems
for now.
All games and the main lobby share the same chat.
There is no play timer to keep the game moving if one person goes idle. However, if their
browser crashes or they lose connection, they will be removed from the game after approximately 45
seconds. An AFK timer is near the top of the priority list to add.
The first player to 8 Awesome Points wins. This is currently hard-coded, but you will be able
to change it later.
You can't bet Awesome Points to play another card, and I am unsure if I will add this.
Future enhancements:
There will be host options to limit the number of players and set the target score soon.
There will be a timer to keep the game moving if somebody goes AFK soon.
There may be an option to display who played every card.
A registration system and long-term statistics tracking may be added at some point.
Support for custom Black and White cards will also likely be added, with a game host option to
use them or just the stock cards.
If the game seems to be in a weird state, refresh the page and it should take you back to where
you were. It would be helpful to take a screenshot and
email it to
me along with a general description of the problem and the time that it happened (include a
time zone please!).