The main objective of this project is to develop a real-time peer-to-peer networking application of the Five in a row online game in order to trace the networking activities on both the end systems. In this application, we have designed a game application where two players can play this game on different end systems.
GitHub: https://github.com/anushkaaaa/Five-in-a-row
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Five In A Row Game- Networking Protocol Analysis
1. FIVE IN A ROW
Presented By:
Anushka H Patil
Snehal S Vyawahare
Guided By:
Prof. Yao Liang
Date: Dec 4, 2017
Data Communication and Computer Networks
(CSCI 53600 20530)
IUPUI – Fall 2017
2. Abstract The basic idea of this project is to develop:
• Peer- peer networking application for a Five
in a row game
• Implement using web socket protocol.
• Analyze the networking activities on both
the end systems using Wireshark network
analyzer tool
2
4. Introduction
4
• Gomoku or Five in a Row, is an
abstract strategy board game.
• It originated in Japan during
the Heian period.
• In this game, players alternate
turns placing a stone of their
color on an empty intersection.
• The winner is the first player to
form an unbroken chain of five
stones horizontally, vertically,
or diagonally
5. Problem
Statement
The main objective of this project is to
develop a real-time peer-to-peer
networking application of the Five in a
row online game. In this application
we have designed a game application
where two players can play this
game.
5
6. Implementation
6
• For every web based game, there
are two important components:
Client-Side Component and Server-
Side Component.
1. Client-Side Component: User
Experience and Game logic (HTML,
CSS and JavaScript)
2. Server-Side Component: Backend
Programming- Parameter and
session handling (Java)
7. 7
• Developed and Styled: HTML,
CSS, JavaScript
• User-defined actions :
a) Add
b) Move
c) Quit
• Scenarios in game :
a) "Waiting for another player to
connect!“
b) "Wait for opponents move“
c) "Select Another location“
d) " Player name Win“
• JsonObject is created and send
using socket.send() and
onmessage() is fired.
7
CLIENT- SIDE
COMPONENT
SERVER- SIDE
COMPONENT
• Programmed using Java
• Features: Session and
parameter handling
• Important Class file :
a) Web Socket server
b) Session handler
• Web Socket server :
a) JsonObject from client is read
using JsonReader.
b) WebSocket API events: Open,
Message, Close and Error are
used
• Session Handler:
a) add() and remove() to manage
the sessions.
b) 3 functions: addUser(),
userMove() and QuitGame()
c) JsonProvider it adds and
builds the object, sends to all
connected players.
14. Additional
Features
14
▪ Simple and User Friendly User
Interface
▪Player’s information is
displayed during the game
▪End game feature: The player
can quit the game at any point
of time
15. Conclusion
Thus, we have used Web Socket protocol for
implementation of a real-time peer-to-peer
networking application of the online - Five in a Row
game. We have done the analysis of this game
using Wireshark network analysis tool; the analysis
reports shown above depicts the details of how
precisely the network protocol activities are being
performed on each end systems. Hence, the client
systems are able to successfully communicate with
each other and play the game. The results of the
game and network analysis report clearly indicates
that we are successfully running this peer-to-peer
application using Web Socket
15