15
DOCUMENTATION Project Name : Snake Game Development Language : C# Developed By: Fuad Hossain 11310214 IT Sanjida Rahman 11310829 IT Submitted To:

Snake game documentation

Embed Size (px)

Citation preview

DOCUMENTATION

Project Name: Snake GameDevelopment Language: C#

Developed By:

Fuad Hossain 11310214 IT

Sanjida Rahman 11310829 IT

Submitted To:

Mohammad Minhazul Alam, Lecturer CSE/IT, UITS.

Table of Content:No. …………………. Content1 ………………… Introduction2 ………………… Acknowledgements3 ………………… Game Attribute4 .....………… System Architecture

4.1………………… Game Components4.2………………… Game Architecture

5 ………………… Game Construction5.1 ……………… Building the Game5.2 ……………… Game Play

6 …………………… Development Challenges7 …………………… Conclusion8 …………………… Reference

Figure Lists:

Fig:-3.1(snake game window)Fig:-3.2(Game Attributes)Fig:-4.1(Main class)

Fig:-4.2(Snake, Snake1)Fig:-4.3(Food)Fig:-4.4(Simple architecture of snake game)

Game Play:-Figure 5.2.1Figure 5.2.2Figure 5.2.3Development challenges: Figure 6.1Figure 6.1Figure 6.3(Communication between Me & Friend)

1. Introduction:Project documentation is concerned with describing the delivered software product, in this case the Multiplayer Snake game project. Project documentation includes user documentation which tells users how to use the software product and system documentation whichis principally intended for further developmentand understanding.

2. Acknowledgement(s):

Thank you Mohammad Minhazul Alam Sir for pushing us and inspiring to build and understand a multiplayer Snake game. Thanks forthe effort and giving us lectures and explaining the architecture. Thanks for helpingwhen we were stop in the middle during the

development phase. We could not have built sucha challenging project without your help.3. Game Attributes:The name of the game is “Multiplayer Snake Game”. It’s a multiplayer game which can be played in the same machine. In this game we usefour arrow keys and “A”,”S”,”D” & “X” to control the snake direction. And when press Enter game start and when press Space bar game become pause.

Fig:-3.1(snake game window)

Fig:-3.2(Game Attributes)

4. System Architecture:System architecture is the skeleton view behindthe GUI part of a game. System architecture defines the working methodology of the game andshows the components, their relationships and how they evolve to make the game work. The system architecture of this particular game canbe divided into two parts:

Game components. Game architecture.

4.1 Game Component:Game Components are behind the scene classes and methods which make up the game and all the functionalities. The components are mesh together and there are lot of inter relationships between them. The main componentsare described below:

Main class: Main class is where all the components are connected and it’s the heart andmind of the game. In this game it is named “frmMain.cs”. The GUI of the game is represented in this class. The movement is alsolistened from here & different methods are usedfor different functionality.

Fig:-4.1(Main class)Snake class: Snake class is a class which is used to draw, design, control movement and define Snake behavior.Snake1 class: Snake1class is a class which is used to draw, design, control movement and define Snake1 behavior.

Here some method of Snake & Snake1:-Public void Draw ()-for draw SnakePublic void Draw (Graphics graphics)-for snake colorPublic void Move (int direction)-for move Public void Grow ()-for snake grow

Fig:-4.2(Snake, Snake1)

Food class: Food class is a class which is usedto draw, design food. Here food is randomly generated. When the Snake & Snake1 eat food they become grow.Public Food (Random rand)Public void Draw (Graphics graphics)Public void Generate (Random rand)

x=rand.Next(0,30)*10; y=rand.Next(0,20)*10;

Fig:-4.3(Food)4.2 Game Architecture: The Game Architecture isthe simplified graphical view of the game. It

shows how the components work and the basic view of the game at action. The architectural view of the game is very important. Simply it gives an overview of the game functionality andit makes the game easy to understand.

Fig:-4.4(Simple architecture of snake game)

5. Game Construction: Here we develop the game and test the game and ultimately play the game. Construction phase can be divided into 2 phases:

Building the Game Game play

5.1 Building the Game: It’s the headrest part in all the line of process. When we first start the game we first planning,find out the requirements, draw the architecture.To build the game need to know programming language (this time C#).The development phases are:

Creating a single Snake. Creating a Food. Then creating two snakes. Snakes collision with food. Snakes collision with each other body.

Snakes don’t move two directions ata same time.

5.2 Game Play: The steps of game play are given below:-i) Open the game application:

Figure 5.2.1

ii) Press debugs & shows the level.

Figure 5.2.2

iii) Press enter and the game is start.

Figure 5.2.3

6. Development challenges: We had to face a lot of challenges during the development phase. We cannot make this game playable through network. We only developed multiplayer game in same machine that is handled by button.That’s why our respectable teacher Mohammad Minhazul Alam gives our opportunity to make a Chat box.That’s given below:-i) Open the chat application: same pc that’s

why IP is same.

Figure 6.1

ii) Open the ‘ChatBox.exe’ file and gives theport number of “Me” & “Friend”.

Figure 6.1iii) Open again the ‘ChatBox.exe’ files and

gives the different port number of “Me” &“Friend”.

Figure 6.2

iv) After connecting the both chat box ‘Me’ and ‘Friend’ can communicate with each other.

Figure 6.3(Communication between Me & Friend)

7. Conclusion:This project gives us more thrilling, frustrating and also gives us more pleasure. Ithelps us in many sectors like- planning, designing, developing, managing, programming skill, socket programming and so on.8. References:

Class Lecture. https://www.youtube.com/watch?v=rFFVyNn9_8A http://www.c-sharpcorner.com/UploadFile/ udeshikah/snake-game-application-in-C-Sharp/

http://www.dreamincode.net/forums/topic/ 243537-control-issue-with-snake-game-in-c%23/

http://csharp.net-informations.com/ communications/csharp-chat-client.htm