How to use the Card 304 Software
- Quick guide
- Supported Platforms
- Download
- Installation
- card 304 big picture
- card 304 client
- Running a 304 server
Quick Guide
- did you download the software? YES
- did you extract it? YES
- good, click on start_client
file..OK
- do you know how to play? YES, excellent, have fun.
NO, read this manual
Supported Platforms
This software runs on any platform where Java
1.4 and Eclipse are
available. Currently the following platforms are tested.
- Win XP
- Mandrake Linux 9.0 & up
- RedHat Linux 8.0 & up
You can get Java Runtime Environment (JRE) for your operating system
from SUN's or IBM's
website. Card304 uses
JRE version 1.4. But it
should work with any JRE version above 1.4 as well.
Eclipse is a free tool available
from IBM. It also provides a small/fast graphics library for
Java. Card304 uses that library.
Download
Download from http://www.sujee.net/projects/card304/downloads/.
Later on this will be moved to the Source Forge site.
When downloading, be sure to download the right package format to your
platform. Currently packages for Windows and Linux are
provided. In addition there are also bundled packages with Java
for each platform.
Note : Packages with
Java RunTime have significantly larger sizes. Download
these if you are not sure you have JRE 1.4 installed and working on
your machine. If you do have JRE 1.4 already installed on your
machine, then just download the plain package (smaller and quicker
download)
Installation
There are no special installation instructions or requirements.
Thus there is no installer.
Packages are distributed in ZIP format. On windows use WinZip or similar program to extract
it to a directory. Unixes come with unzip command.
cd <to a dir>
unzip card304-linux-gtk-v0.6.0.zip
Once you extracted the zip file you will see a similar directory
structure to this.
The sh scripts (or bat files on Windows) in main
directory launch the programs.
- start_client : this is
what you will mainly use to launch the Card304 client program.
This is a GUI application and will let you connect to a running 304
server on Local Area Network (LAN) or Internet.
- start_server : Use this
if you want to run your own 304-server locally. Read the
configuration options below if you want to do this.
- start_master : This a
master server that keeps the list of all available 304-servers.
You will hardly have to run this.
- testgame : This script
will launch a local 304-server and four clients. Very useful for
testing purposes.
Docs directory contains
documentation (including this one)
Resources directory contains
icons, images, and configuration files.
304 Big Picture

304 games are hosted on a server (called 304-server). These
servers 'maintain' tables and allow users to share a table.
So as a user will follow the following to play a game
- Find a 304 server
- Create a table on the server, or join an existing table.
- wait for other players to join
- play the game.
304 Client
Client Explained
Launch start_client.sh or start_client.bat. Here is how
a card-304-client program looks like (red annotations added later)

Client GUI is a single window application. Here is the
explanation.
- 304 Servers (top left)
This lists the 304 servers available and the tables hosted on
them. The client comes pre configured with 2 such servers (card304.homelinux.org and localhost).
- Players (bottom left)
Lists names of players in the selected server or table. Helps to
join a server/table where your friends are logged in.
- Table (center top)
Think of this as a bird's eye view of table. You are always the
one in the bottom. This helps the perspective of you are sitting
in front of a real table.
Also you see other players' positions. The one right across you
is your partner (just like in a real 304 table)
The 'red highlight' indicates whose turn it is to play the card.
When it is your turn, your card icon will keep blinking.
The center of the table has the trump card (face down untill exposed)
and the name of Trump setter.
- My Hand (center bottom)
The cards you have right now. You will start the game with 8
cards (dealt 4 and 4). You can play a card by double-clicking on
a card. You can only do this, only when your card icon is
blinking (i.e. when it is your turn to play a card)
The sort button here helps you keep your cards sorted in order.
When sorted, black and red cards are inter-leaved to improve
readability.
When you play a card, that card image is 'grayed out'. According
to 304 rules, we completly remove any indication of what card
that was.
Some times some cards will have a 'border'. A red-border
indicates that is the trump card
(in case you set the trump). A cyan border indicates that is the same suite as the trump card.
This is to assert the point that trump cards are valuable in a game and
have to be played carefully.
- Chat (top right)
This window will display messages from other players and system
messages. You can also send messages to others. Keep in
mind every message you send is public and can be seen by all.
There is no private messaging
as in online chat programs.
- Cards Won (right bottom)
At every round a team wins the cards. This will indicate that
status.
Target points will tell
you how many points have to be secured to win the game.
Cash will tell you
how much 'cash' (in 304 terms) your team has left
According to 304 rules only the last hand can be seen. The
yellow-border indicates what was the winning card (and the player's
name) for the last round. The third card from left is not shown
(you only see the back image). It may be because the 3rd player
didn't have the playing suite (diamond in this case) and played another
suite. Since the trump isn't out yet, this card can not be shown
to any other player but the trump-setter.
The 'tab-folders' at the bottom indicate which team won each
round. Keep in mind, only the last hand can be seen by anyone
(even including the trump setter).
- Server Menu
This menu has the following functions (mirrored in toolbar)
- Add A Server : If you want to connect to a server that is not
on the list, you can register that server. Enter the server name
as
hostname.domainname:portnumber
Do not include http/ftp words in front.
- Refresh Servers : This will refresh all the servers &
table status.
- Card Images menu
Here you can select what image set to be used to display the
cards. The default image set used is called 'kpoker' (taken from
the similarly named game). This large image set how ever needs
higher resolution monitor (more than 1000x1000). If you prefer to
run the game in lower resolution try 'kpoker-mini'. There is also
another set called 'oxymoron'.
How to play

|

|

|

|

|
main window
|
create table1
|
create table2
|
joining table
|
trump select
|
- Refresh the server list and find a server you want to join (a
look at who is logged into the server might help you to decide)
- Now look at what tables are on that server. If all tables
are full, create a table (Rigth click on server and choose
create). you will be asked to supply a screen name (alias).
This name has to be unique for the server.
- Join a table (Right click on the table and select Join)
- Wait for other players to join. When we have all four
players, the game will begin
- First every one would be issued four cards. Only the
recipient of the first hand will be asked if he wants to accept the
cards or reject it. If he rejects, cards are reshuffled and
issued again.
- Once every players got four cards, every one is asked to choose a
Trump card. Again this goes in order and you can over bid other
players, but not your own partners.
- Once the trump is set, game play begins. Players are asked
to play their cards in turn, in clock wise order.
- If your card (right below the trump card) is blinking, that
means it is your turn to play a card. Just double click on a
suitable card in 'My Hand' panel.
- If it is not your turn, a 'red' marker will tell you whose turn
it is to play the card.
Running a 304-server
If you want to run your own 304 server for a reason (local LAN, a
private server for you and friends), it is pretty easy too. Just
launch start_server file in
the main directory.
You can configure some parameters to the server. The
configuration file is located in
<install dir> / resources / server.cfg
The config file is a straight forward text file in .ini file format.
Configuration Parameters are
- Port
The default port is 3040. If you want to change it do do in
Port=xxxx
Note : If you are behind a firewall or NAT setup, make sure the above
port is forwarded/allowed in your router/firewall.
- Published Name
If a name is given here, the server will try to contact a master server
and publish its existance. This will allow other players to
'find' your server and play on it. If you'd like to keep your
server private, leave this blank.
- [MasterServers]
Here are list of MasterServers this server would contact (if published
name is set) and announce it's existance. There is no real need
to edit this in a typical senario
When you run a server, you may want to give out it's network address to
your friends to login. If your computer is connected directly to
the internet, it is pretty simple. It would be your IP address
and a port number you choose (default 3040). But mostly this is
NOT the scenario. You may be sitting behind a company firewall or
a personal router.

The diagram above depicts a typical home network setup. Your 304
server is sitting behind a LAN (Local Area Network) behind a personal
firewall/router. Your machine running 304 server has a
local IP address 'w.x.y.z' (i.e. 192.168.1.10). Your cable modem
has an IP address assigned by your ISP. It could be static or
dynamically assigned. Lets assume it is 'a.b.c.d' (i.e.
216.239.57.99). Also assume the 304 server is running on port 'p'
(i.e. 3040). Now the server address you have to give out is
a.b.c.d : p
Also you have to setup your firewall to accept connections at port 'p'
and forward them to local IP address 'w.x.y.z'
Note : If your cable modem gets IP assigned dynamically (DHCP) then
your IP address might change in a few hours or in a few days. So
you have to give out new server addresses every time you get a
new IP address. One solution for this is to use a free DNS
service. I would recommend Dynamic
DNS. It is free and easy to use. And they also have
tools that would detect the change in your IP address and automatically
update the DNS. In fact 'card304.homelinux.org' relies on
'Dynamic DNS'.
Note : Opening up a port in a firewall is a serious consideration for
most corportations & ISPs. So we would urge you NOT to run a
server on corporate networks if you can avoid it.