What email address or phone number would you like to use to sign in to Docs.com?
If you already have an account that you use with Office or other Microsoft services, enter it here.
Or sign in with:
Signing in allows you to download and like content, and it provides the authors analytical data about your interactions with their content.
Embed code for: BattleShip
Select a size
Professor : J Connor
K Tarun kumar(15770)
Swarna Suseel Kumar(15350)
Table of Contents
Vision and Design
Work Process and Implementation
Sea Battle is a guessing game for two players
It is known worldwide as a pencil and paper game which dates from World War I. which published in 1930s
The game of Battleship is thought to have its origins in the French game L'Attaque played during World War I
The object of Battleship is to try and sink all of the other player's before they sink all of your ships
All of the other player's ships are somewhere on his/her board.
You try and hit them by calling out the coordinates of one of the squares on the board.
Search and Destroy Arena (SDA), of a project that will prove itself to be more than an university assignment but a mean of self-discovery, a roller-coaster of self-esteem and reason for my ever-present self-critic to panic about. A hell of a ride I am not ready to leave behind soon.
I am capable of putting together something coherent from the scrambled information I have in my head. It brought back to me the coding for fun moments and will be the project I will always come back for minor tweaks and improvements.
At its conception it was meant to be a real time card game based on the popular monopoly board game, but later, after taking into consideration the available time/resources and at the recommendation of a few colleagues from IT Perspectives (the company I had previously worked at) it was changed to the more generic and ‘drop in and play’ game Battleships. Using SignalR to communicate real-time over HTTP, users are able to play simultaneously as many games as they want with each other or with a decently skilled AI opponent.
As presented in the problem statement, the purpose of the project is:
To enable users to compete against each other in the popular game of Battleships:
To capture and project statistics from games to further encourage competiveness
To be able to play real time against random, selected or a bot opponent;
Chat within the game with opponent
Capable of disconnecting and reconnecting at will (closing tabs, browsers)
Connect from different devices and be able to continue any game, any time
among the players and ensure satisfaction alongside a general rewarding feeling
Offering leaderboards and players statistics
Real-time interaction between players over http: Suggested by a colleague at IT Perspectives, SignalR fit this functionality like a glove.
Authentication and authorization: my website required only a basic implantation of those so for time purposes, Identity 2.0 provided by ASP.NET framework as a default worked great.
Single player bot function: player should be able to play against an AI opponent that is reasonably competent, so I developed a small Bot;
13 Feb-17 Feb: This week was allocated to finishing the tasks from the project I worked during course (the weeding portal); at the end of the week a small prototype of a Battleship bot was implemented;
20 Feb- 22 Feb: Implementing SignalR within the Play with Specific Opponent Use
24 Feb-28 Feb: Finalizing the uses case from previous week; and continue development of the bot made in the first week; at the end of the week the bot was imported into the project and Play with Bot use case was finished;
1Mar -5 Mar: ASP.NET Identity 2.0. was included and integrated with the rest of the
system; this enabled the development of the Reconnect use case;
8 Mar-12 Mar: Play with Random Opponent use case was developed and work started on the design part of the website; Metro UI was integrated;
15 Mar-19Mar: The report was concluded; and development of smaller priority use cases
22 Mar- 8 Apr: Further development of the project and testing took place;
Database Relation Model
SignalR general Implementation
Signal R Concept
SignalR in Game
Definitely the most complex of the SignalR tasks, the game was also the most important one. As the premise of the entire website, players should be able to get information about the state of a game in real time in order to have a proper game experience.
Going back to the ‘Play with Specific Opponent’ use case, we can see that SignalR does most of the heavy lifting, ensuring that the two players are notified of the actions of each other, alongside creating instances of Game and saving any related information to the database.
Let’s take it step by step and see how it’s done:
The goals that got achieved during the inception were the following:
Establish the project scope and boundary conditions: those were established within the problem statement;
Outline the use cases and key requirements that will drive the design tradeoffs: I created the use cases presented in the System Vision;
Outline one or more candidate architectures: I decided to use ASP.NET MVC5 Risk analysis: * Scale 1-3 ** Scale 1-4 (4 project temporary close down) *** Scale 1-6
Battleships Bot and Bot functionality:
The thing that I have been the most excited about to work on the project, despite its low priority was the bot. Simple set functions to generate random ship placements on the map, to hit in a pseudo random manner the opponents map and calculate enemy’s ships potion out of the outcome of the hit.
It reminded me of one of the first programs I did in high school (a tic-tac-toe game playable locally with friend or with a bot) and really got me excited about the SDA as a Battleship game.
Within the limited timeframe allocated to the Bot I manage to implement the core functions:
Place a given number of ships on the map;
Keep track of own ships and report if enemy’s strike was a hit or a miss
Upon call of the method Fire() return a set of x y coordinates in a pseudo-random manner
Create and keep track of a visualization of the enemy’s map
Due to time constrains, the testing was most not done within the ideal complexity, my strategy involved a combination of written tests and user tests for the most complex of the features while the dynamic tests were considered for CRUD of the classes were considered redundant.
The overall working process was a mismatch of all the working processes learned in the university, I tried to implement a bit of everything, as I saw fit for the project. Unified Process was the one that closely resembles the resulting working process and so it’s the one I presented here.
From vision, to technologies and up to the work process itself, SDA is meant to follow my own interpretation and approach of established procedures resulting something unique, not in idea but in implementation.
Thank youed great.