Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

CSE1205-Network-Gaming-Lab GAME TIC-TAC-TOE

CSE1205-Network-Gaming-Lab GAME TIC-TAC-TOE

CSE1205/2100 Introduction to Computer Science and Engineering Network Gaming (T3) Lab

Introduction

In this lab, we will borrow some code from the Computer Engineering Internet of Things / Networks course to develop a networked version of a tic- tac-toe (T3) game. In doing so, you will also become accustomed to a simple UDP network protocol and server-client network models.

You will also learn more about the concepts in this lab in CSE 3318 (Algorithms and Data Stuctures), CSE 3320 (Operating Systems), CSE 4352 (IoT/Networks), and CSE 4344 (Networks).

Network Quick Primer:

When data is sent on an Ethernet connection in many applications, the data is sent between IP address and port pairs (collectively called a socket addresses).

The IP addresses we will use in the lab use the IPv4 protocol. An IPv4 address is 4 octets (4 bytes) long. In the lab, all the addresses are numbered 192.168.1.x, where x is a number between 1 and 254. To configure your RPi to operate on the lab network, you should enable DHCP so it will automatically get a unique address on the lab network. This will allow you to send data to and receive data from other computers in the lab.

Often on a network, there is a server and a client. For instance, when you use a web browser to connect to a web site, the browser is a client and the web site is a server. A physical or virtual machine may provide many services to users. Port numbers are used to expose services to external users using well known port numbers for each service. For instance, SSH and SFTP connect to a server using port 22 and web servers often use port 80. So when a web browser tries to get access a web site, it contacts the IP address at port 80. When port 80 is accessed, traffic is routed to the web server to process the get and post requests from the web browser. When port 22 is accessed, an SSH server handles the traffic.

There are two primary IP protocols that are used to send data on these ports – Transport Control Protocol (TCP) and User Defined Protocol (UDP). TCP is more complicated as it contains complexity to reliably send large files

consisting of many packets of data. UDP on the other hand is very simple, but it just sends packets of data just once so there is a chance for a packet of data to get lost. So the trade-off is complexity vs simplicity.

Network Use for our Game:

For our lab, we will use the UDP protocol and implement a client and server system for game play. The server will monitor port 4096 and the client will monitor port 4097 for inbound UDP traffic. The choice of 4096 and 4097 are arbitrary, but are required for this project so game applications can inter- operate.

In our lab, you can send a string using the provided sendData function:

bool sendData(const char ipv4Address[], int port, const char str[])

You can receive a string using the provided receiveData function:

void receiveData(char str[], int str_length)

The string value sent and received with these message will be one of the following 10 case-sensitive strings:

invite Invite a user to start a game A1, A2, A3, B1, B2, B3, C1, C2, or C3 Game moves

If two users want to play, one of the users starts their game application as a server, which waits to accept an invitation from a client to start a game. The other user starts their game application as a client and sends an invitation to the server to start a game. In both applications, users alternate turns and send their game moves to each other. In this implementation, the client sending the invitation will request the server make the first game move.

Application Requirements – General:

You should write your lab solution in a file t3.c, that includes the udp.h header. When you compile the code, you will use the following command:

gcc -o t3 t3.c udp.c

Application Requirements – Command Line:

The application is named t3. Invoking the application requires 2 additional options – the IP address of the remote machine you want to reach and the operating role of the application. The role will indicate whether the application starts as a:

– Server and accepts invitations from a client

– A client and sends an invitation to a server

The command line syntax is:

./t3 REMOTE_IP ROLE

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Homework Free only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Homework Free are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Homework Free is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Homework Free, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Homework Free Org

Your one stop solution for all your online studies solutions. Hire some of the world's highly rated writers to handle your writing assignments. And guess what, you don't have to break the bank.

© 2020 Homework Free Org