Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 491 Final Project Multiplayer Card Game Author: Tian Ma Presentation 5/4/2004.

Similar presentations

Presentation on theme: "ECE 491 Final Project Multiplayer Card Game Author: Tian Ma Presentation 5/4/2004."— Presentation transcript:

1 ECE 491 Final Project Multiplayer Card Game Author: Tian Ma Presentation 5/4/2004

2 Project Goals The goals for this project is to demonstrate, experience, and explore all aspects of Java Internet Programming This project will concentrate on three main areas of Java Java communications (Sockets) Graphical User Interface (GUI) Object Oriented Implementation Other Advance Features

3 Problem Statement In todays world, many people would like to play games with 2 or more persons rather than playing with boring computers. However, to have people gather in one place to start a game is not always a suitable solution. Finding partners might not be easy.

4 Solution This project, I implemented a multiplayer card game to allow players to play a card game across Internet so people will not need to worry about finding partners and gather people in one location to play the game. With an Internet connection, they can play the game with people all over the world.

5 Tools Pure Java Language J2SE 1.4 compiler Local host server In this project I installed the Internet Information Service (IIS) that comes in with the original Windows XP Professional CD and use it as a local host server

6 Main Features of this Application A public chat room: allows people to communicate with people all over the world. 10 private game rooms: maximum of 10 groups of people can be play simultaneous in the server. Game Play Flexibility: The game can be play anyway between 2 to 4 persons (4 is the best), in case you dont have four. Chatting within game room: players can communicate with their own group while in the game room playing the game. Communications in the private rooms are restricted and not open to the public. User friendly GUI with graphics: graphics and images are added for better visualization and buttons and text fields are created for ease of use.

7 Game Introduction The card game that I implemented is pronounce as Da Lao Er in Chinese, or translated in English as Big 2, or pronounce as Daifugo in Japanese, or translated in English as Big rich. This is a very popular card game in Asia. Why Da Lao Er ? Well, this the only card game that I enjoy playing and play well. Whatever name you want to called it, all we care is how to play? There are so many rules of playing it. So I will have my own rules too. These are the rules that I normally playing with my friends

8 Game Objective The objective of the game is to be the first one to get rid of all of your cards by playing them. Cards can be played single or in certain playable combinations. The first person who get rid of all the cards wins, while others score penalty points. This Game can be play by 2 – 4 players (4 players is the best).

9 Playing the game The player who holds a diamond 3 (or the smallest card if less than 4 player) will begins and must play this card, either by itself or as part of a playable combination. The person to this player's right plays next, and follows the counter clockwise direction. At your turn you must either pass (play no cards) or beat the previous play by playing a higher combination of the same number of cards. Single card must be beat by single card, pairs must be beat by pairs, triples must be beat by triples, and 5 cards must beat 5 cards. This continues for several rounds if necessary, until all but one of the players pass in succession, or no one being able or willing to beat the last play. The person who played highest (all the others having passed) wins the turn and begins again by playing any card or legal combination of cards. You are never under any obligation to beat a card or set of cards just because you are able to - you may always choose to pass and keep your high cards for a better opportunity. Passing does not prevent you from playing when your turn comes round again.

10 Card Ranking Card Ranking: The ranking of the cards from smallest to largest are the following: 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < Jack < Queen < King < Ace < 2 Suits Ranking for the card have the same number the rank will define by the Suit diamonds

11 Playable Combinations Single card The ranking of the single cards from smallest to largest are the following: 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < Jack < Queen < King < Ace < 2 for the card have the same number, the rank will define by a Suit diamonds

12 Playable Combinations cont. 5 cards Ranking: Straights

13 Playable Combinations cont. A Full House consists of three cards of the same number and a pairs; between two full houses, the one whose triple is of higher rank is better. For example, 5d 5c 5s 6d 6d < 8d 8c 8h 3c 3s Four of a kind (or quads) are made up of all four cards of the same number, plus any fifth card. The fifth card must be included - four equal cards by themselves are not a playable combination. Between two fours of a kind, the rank of the four cards determines which is higher. A Straight Flush consists of five consecutive cards of the same suit, twos ranking below threes and aces ranking high or low, as in straights. The rank of the highest card determines which of two straight flushes is higher; between two equal ranked straight flushes, the one in the higher suit is better For example, 3d 4d 5d 6d 7d<3h 4h 5h 6h 7h

14 Scores Scores: The players other than the winner score penalty points for the cards remaining in their hands. If you have: cards, one penalty point for each cards 8 – 9 cards, 2 points per card, total of 16, 18 points respectably 10 – 12 cards, 3 points per card cards, total of 30 33, 36 respectably 13 cards 4 points per card, total of 52 points, because you never played any cards at all. The winner, having no cards, gets no penalty points for the hand.

15 Program Demo

16 Display Design Documents Display and explain the GUI Flow Chart

17 Display Architecture Documents The overall architecture is pretty much self-explanatory. Double arrow indicate bidirectional dependencies (dependent in both way). One arrow denotes single dependency. Instead of each of the classes I will explain some key classes since you can find all the explanations in the documentations. ). The game class basically implements the game. One can see there are many class associated with game. The TestServer class runs the server. The TestApplet.html is use for people to accessing the server. The client engine handle all the actions execute by the client (e.g. chat, enter game room, play cards, etc…). The server engine handle all the actions execute by the server. The client server connection connects the client engine and server engine through server interface and client interface respectfully. From the diagram above, first the clients access the TestApplet it will lead him to enter the entrance GUI, the action listener will sends actions to the Client Engine and the client engine will sends action to the client interface and so on following the diagram until the server gets it. After the server get the actions, it interpret what action to be taken (command interpreter), then perform the necessary tasks in the engine. If all goes well, players are connected and proceed to MainRoom GUI. The MainRoom GUI basically follows the same principles as it implements listeners and sends actions to the client engine, so as other GUI (e.g. game gui commands). So basically, the flow of the program is behave having a GUI listens the command sends to Client Engine and Client Engine performs all the actions.

18 Hours Spend Weekly hours spend on this project Week of 3/7 - 3/138 Week of 3/14 - 3/2012 Week of 3/21 - 3/2725 Week of 3/28 - 4/315 Week of 4/11 - 4/1716 Week of 4/18 - 4/2428 Week of 4/25 - 4/318 Total hours112

19 Conclusion This multi-player card game project have demonstrated important aspects of Java Internet and especially how how people communicate through the internet using Java. This project is highly related to what we learned in our class. It capture almost every topics we have covered such as: GUI programming, Networking, Applets, Inheritance, and more. The game Da Lao Er is a card game that I really enjoy playing. Since my implementation is done in an Object Oriented way, it can be extended to play other card games as well with no hardship. Although this project took me 112 hours to complete, I truly enjoyed the entire process, except for debugging! This project enhanced my skills in Java and it built-up my confidence on what I can do with Java. Furthermore, it has demonstrated my thorough understanding of Java Internet programming and my ability to develop Java Internet application.

20 Questions & Answers

21 Thank you all for your time. End of Presentation

Download ppt "ECE 491 Final Project Multiplayer Card Game Author: Tian Ma Presentation 5/4/2004."

Similar presentations

Ads by Google