8
(IJCSIS) International Journal of Computer Science and Information Security, Vol. 8, No. 9, December 2010 Multiplayer Enhanced Make Square Game in the Net Md. Ekramul Hamid Department of network Engineering College of Computer Science King Khalid University Abha, Kingdom of Saudi Arabia e-mail:[email protected] Sudip Saha Software Engineer Protocom Technology Sydney, NSW-2000 Australia. Mohammed Qayyum Department of Computer Engineering College of Computer Science King Khalid University Abha, Kingdom of Saudi Arabia  Abstract — In this work, the authors attempt to create a successful Java socket program to implement the “Make Square” game in the net. The game is very popular among the children. Even though this game is for kids, this one can also be played by an adult because it can be quite tricky, require concentration and a little bit of intelligence. The goal in this game is to make more small squares. A player will win the game, if he can complete maximum number of squares after the game is over. Here client/server technology is used to implement socket programming. Since the game is implemented by java, so it is platform independent and portable. Many players in many different groups can play the game on the net. To make the game more interesting we enhance its feature by adding hidden lines. This makes the game more attractive and challenging. The Java features like Networking, Graphics, Layout Management, Package and Interface, Exception Handling, I/O, Applets, AWT Controls and Event handling etc. [2-4] are used to create the game. The Make Square game consists of more than 1700 lines of code in 12 classes. Five of these classes are part of the server side and rest seven is part of the client side. The Make Square game is running properly in a network.  Keywords-component; Make Square, node, socket  programming, AWT, 3D object, GUI, client/server technology I. INTRODUCTION There are so many games like the “Make Square” that are really silly and funny. But not all of them are like this that require concentration and a little bit of intelligence. These are the puzzle games. The controls for these games are very simple and usually need to use only the mouse. Player can click on different objects on the screen to trigger all sorts of actions. Here in this paper we propose the development of online games using Java. We use Applets because everyone has an Internet browser, so everyone is able to play this game without installing the JDK! Java is a multiplatform, object-oriented programming language created by Sun Microsystems. Creating games on Java is simple than creating games on languages such as C++ due to the advantages of the Swing library that comes as part of the Java API. The “Make Square” is a very popular game played on paper by drawing a board layout as figure 1. Here, the authors attempt to implement tele-playing version of the game in the network [1]. To play the game, each player connects to server using client program. It does not need any third party server software to play the game. The Make Square playing board consists of nodes, where nodes are arranged as a m x n matrix. A typical board of a Make Square is shown in the figure 1. Basically, the nodes in the board are made of filled circles. Figure 1. Playing Board (m x n Matrix of nodes)  A. General Rules of the Game A player connects two nodes with a line in his turn. Once he puts the line, his turn is over, and next players turn is start and so on. In this way, the game goes on in a round robin fashion until all the squares are completed. A player will win the game, if he can complete maximum number of squares after the game is over. Let two players A and B are playing the game. In The first turn, player A puts his first move A(1,1) and B puts his first move B(1,1) as shown in figure 2. Here, each player’s turn represented by PLAYER (i,j), where i and j are turn and move of PLAYER respectively. Figure 2. Turns of A and B Figure 3. B wins a square The player who puts the last line to form a complete square — wins the square. Figure 3 shows B wins a square. When no more square is remaining, the game is over and the player who completes more squares is the winner. To make the game more interesting we enhance its feature by adding hidden lines. This makes the game more attractive and challenging. 216 http://sites.google.com/site/ijcsis/ ISSN 1947-5500

Multiplayer Enhanced Make Square Game in the Net

  • Upload
    ijcsis

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 1/8

Page 2: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 2/8

Page 4: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 4/8

Page 5: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 5/8

Page 6: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 6/8

Page 7: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 7/8

Page 8: Multiplayer Enhanced Make Square Game in the Net

8/8/2019 Multiplayer Enhanced Make Square Game in the Net

http://slidepdf.com/reader/full/multiplayer-enhanced-make-square-game-in-the-net 8/8