• Professional Development
  • Medicine & Nursing
  • Arts & Crafts
  • Health & Wellbeing
  • Personal Development

Course Images

The Art of Doing - Python Network Applications with Sockets

The Art of Doing - Python Network Applications with Sockets

  • 30 Day Money Back Guarantee
  • Completion Certificate
  • 24/7 Technical Support

Highlights

  • On-Demand course

  • 14 hours 33 minutes

  • All levels

Description

Welcome to a project-based intermediate course. This course is designed to learn how to create new and exciting projects using various python modules. In each section, we will build a project and with each project, you will learn how to create an online multiplayer game, AOL-style chat room, and more!

In this course, you will learn how to set up your own home network with static IP addresses and port forwarding so that anyone can access your programs over the Internet. Then you will learn how to set up a simple two-way chat in the terminal using the Socket module. Next, you will learn how to use the threading module to create a simple chat room in the terminal and how to use the Tkinter module to create a GUI chat room like the old AOL chat rooms. Later, we will look at how to create an advanced GUI chat room with admin window using the JSON module, and finally, how to create your own online multiplayer game using the Pygame module. As this is a project-based course, each project builds on the knowledge gained during the previous projects. In our culminating project, when we attempt to create our own online multiplayer game, we will be generating IPV4/TCP sockets to connect computers to a server running on a machine with a static IP and port forwarding enabled, creating various threads to run processes concurrently on our machines, we will use JSON to serialize python objects such as our game state and game players, and have a fully interactive GUI interface using Pygame. By the end of this course, you will have multiple projects you can share with friends or family, have them run a client script from their house, connect to your server script, and show off all you learned. All the resources for this course are available at: https://github.com/PacktPublishing/The-Art-of-Doing---Python-Network-Applications-with-Sockets

What You Will Learn

Use the socket module to create a terminal-based two-way chat
Use the threading module to create a terminal-based chat room
Use a Tkinter module to make a GUI chat room
Configure router to allow communication from an external network
Use the JSON/Pickle modules to build an advanced GUI chat room with an admin window
Use the Pygame module to create an online multiplayer game

Audience

This intermediate course is intended for students with a basic understanding of Python and core programming concepts as well as comfort levels with both functional and object-oriented programming, as both will be used in the course's second half. Also, who is interested in learning how to write programs that can work over a network and communicate with one another.

Although it will be helpful to have prior knowledge of different Python modules, we will take the time to teach you everything you need to know to construct the program in this course.

Approach

The course follows a project-based learning approach. This is a complete hands-on practical course designed for the intermediate level, where we will be building different projects and each project will be built on the knowledge gained during the previous projects.

Key Features

Focus on networking fundaments such as IP and port addresses, IPV4, TCP, and UDP protocols * Learn to use the Pygame module to make your own online multiplayer game * Create your own home network with port forwarding and static IP addresses so that anyone may access your applications online

Github Repo

https://github.com/PacktPublishing/The-Art-of-Doing---Python-Network-Applications-with-Sockets

About the Author
Michael Eramo

Michael Eramo is a dedicated lifelong learner, experienced educator, and self-taught programmer. With official bachelor's degrees in music, education, and physics, as well as a master's in mathematics, he brings a diverse skill set to his teaching. As a Microsoft certified software developer, Michael has years of experience as a high school physics and computer science teacher, as well as a college mathematics teacher. He is also an esteemed member of the New York State Master-Teacher Program, a network of over 800 outstanding public-school teachers who share a passion for STEM learning and collaborate to inspire the next generation of STEM leaders.

Course Outline

1. Installation and Setup

Welcome to the course! In this first section, we will understand the learning goal and setting up our working environment.

1. Course Preview

Welcome to the course! In this first video, we will have a quick look on the course learning objectives.

2. Python Installation and Setup

In this video, you will learn how to install and set up Python on our system.

3. VS Code Installation

In this video, you will learn how to download and install VS Code editor.

4. Creating our Working Directory

In this video, you will learn how to create a working directory.

5. A Brief Overview of Networking Concepts

In this video, we will cover a brief overview of networking concepts.

2. Creating TCP and UDP Connections with the Socket Module

In this section, you will learn how to create TCP and UDP Connections with the socket module.

1. Creating a TCP Server Socket

In this video, you will learn how to create a TCP server socket.

2. Creating a TCP Client Socket

In this video, you will learn how to create a TCP client socket.

3. Sending Data through a TCP Connection

In this video, you will learn how to send data through a TCP connection.

4. Creating and Sending Data through a UDP Server/Client

In this video, you will learn how to create and send data through a UDP server/client.

5. Exploring the Buffer Size

In this video, you will learn how to explore the buffer size.

6. Basic Two-Way Chat Part 1 - Server/Client Setup

In this first part, you are going to learn how to set up our server/client side for our basic two-way chat via terminal.

7. Basic Two-Way Chat Part 2 - Enabling the Chat

In this second part, you are going to learn how to enable the chat.

3. Creating a Terminal Chat Room with the Threading Module

In this section, you will learn how to create a terminal chat room with the threading module.

1. The Threading Module Basics Part 1

In this first part, we will get introduced to a new module called the threading module and lay the foundation for how to use it.

2. The Threading Module Basics Part 2

In this second part, we will create some threads that will help the functions to run concurrently.

3. Terminal Chat Room Part 1 - Server/Client Setup

In this first part, you are going to learn how to start with the basics on both our server and client scripts.

4. Terminal Chat Room Part 2 - Adding Functionality

In this second part, you are going to learn how to add functionality.

5. Terminal Chat Room Part 3 - Adding Functionality

In this third part, you are going to learn how to add functionality to send multiple information to the server.

6. Terminal Chat Room Part 4 - Adding Functionality and Testing

In this fourth part, you are going to learn how to add functionality and testing.

4. Creating a Basic GUI Chat Room with the Tkinter Module

In this section, you will learn how to create a Basic GUI Chat Room with the Tkinter Module.

1. The Tkinter Module - Defining a Root Window

In this video, you will learn how to define a Root Window.

2. The Tkinter Module - Adding Frames

In this video, you will learn how to add frames.

3. The Tkinter Module - Adding Widgets

In this video, you will learn how to add widgets.

4. The Tkinter - Module - Adding Functionality

In this video, you will learn how to add functionality.

5. Basic GUI Chat Room Part 1 - Building the Client Layout

In this first part, we are going use Tkinter to create a client-side GUI to run for our chat room.

6. Basic GUI Chat Room Part 2 - Building the Client Layout

In this second part, we are going to work on our output frame for the chat window.

7. Basic GUI Chat Room Part 3 - Adding Functionality

In this third part, we will focus on the functionality of our program and define some constants used for our socket connection.

8. Basic GUI Chat Room Part 4 - Adding Functionality and Testing

In this fourth part, we are going to add functionality and then test our chat room.

5. Creating an Advanced GUI Chat Room with the Json Module

In this section, you will learn how to create an advanced GUI chat room with the Json module.

1. The Pickle Module - Sending Objects through the Data Stream

In this video, you will learn how to send objects through the data stream with the Pickle module.

2. The Json Module - Sending Objects through the Data Stream

In this video, you will learn how to send objects through the data stream with The Json module.

3. Advanced GUI Chat Room Part 1 - Updating the Client Layout

In this first part, you are going to learn how to update the client layout.

4. Advanced GUI Chat Room Part 2 - Building the Server Layout

In this second part, you are going to learn how to build the server layout.

5. Advanced GUI Chat Room Part 3 - Outlining Server Functionality

In this third part, you are going to learn how to outline server functionality.

6. Advanced GUI Chat Room Part 4 - Outlining Client Functionality

In this fourth part, you are going to learn how to outline client functionality.

7. Advanced GUI Chat Room Part 5 - Staring the Server

In this fifth part, you are going to learn how to start the server.

8. Advanced GUI Chat Room Part 6- Processing Messages Server Side

In this sixth part, you are going to learn how to process messages on the server side.

9. Advanced GUI Chat Room Part 7 - Starting the Client

In this seventh part, you are going to learn how to start the client.

10. Advanced GUI Chat Room Part 8 - Sending Data from Client to Server.

In this eighth part, you are going to learn how to send data from client to server.

11. Advanced GUI Chat Room Part 9 - Adding Admin Functionality

In this ninth part, you are going to learn how to add admin functionality.

12. Advanced GUI Chat Room Part 10 - Adding Admin Functionality

In this tenth part, you are going to learn how to add admin functionality.

13. Advanced GUI Chat Room Part 11 - Final Testing

In this eleventh part, we are going to work on the final test.

6. Connecting to the Outside World

In this section, you will learn how to connect to the outside world.

1. Adjusting Host Firewall for LAN Communication

In this video, you will learn how to adjust host firewall for LAN communication.

2. Setting a Static IP Address for WAN Communication

In this video, you will learn how to set a static IP address for WAN communication.

3. Enabling Port Forwarding for WAN Communication

In this video, you will learn how to enable port forwarding for WAN communication.

4. Testing out WAN Communication

In this video, you will learn how to test out WAN communication.

5. Configuring a Second Router...Different Settings!

In this video, you will learn how to configure a second router with different settings!

7. Creating a Multiplayer Game with the Pygame Module

In this section, you will learn how to create a multiplayer game with the Pygame module

1. The Pygame Module - Creating a Game Window and Game Loop

In this video, you will learn how to create a game window and game loop.

2. The Pygame Module - Setting Up a Game Class

In this video, you will learn how to set up a game class.

3. The Pygame Module - Setting Up a Player Class

In this video, you will learn how to set up a player class.

4. Using Fixed Length Headers - The Shortcomings of a Fixed Maximum Byte Size

In this video, you will learn how to fix maximum byte size using fixed length headers.

5. Using Fixed Length Headers - The Solution to our Problems

In this video, we will look at the solution on how to fix maximum byte size using fixed length headers.

6. Online Multiplayer Game Part 1 - Setting Up the Server

In this first part, you are going to learn how to set up the server side and work on the server script for our multiplayer game

7. Online Multiplayer Game Part 2 - Setting Up the Client

In this second part, you are going to learn how to set up the client side and work on the client script for game

8. Online Multiplayer Game Part 3 - Sending Pygame Configurations to the Client

In this third part, we will begin working on writing our connection classes and try to send some game information to a connected client from our server so we can configure PI game on the client end.

9. Online Multiplayer Game Part 4 - Creating a Player on the Server

In this fourth part, we will look at the server script and learn how to create a player on the server.

10. Online Multiplayer Game Part 5 - Sending the Player to the Client

In this fifth part, we will look at the client script and see how we can receive the player object that we have just created and then listen for broadcasts as the game state changes.

11. Online Multiplayer Game Part 6 - Starting the Game on the Server

In this sixth part, we are going to work on advancing the game to our next game state so that we can start the game server after pressing enter key by all the players.

12. Online Multiplayer Game Part 7 - Starting the Game on All Clients

In this seventh part, we are going to work on the Clients script and push the server information back to each individual client so they can be triggered to start the game on their end.

13. Online Multiplayer Game Part 8 - Player Movement on the Client

In this eighth part, we are going to work on some actual gameplay elements of our game and add the player movement function on the client side.

14. Online Multiplayer Game Part 9 - Creating a Game State on the Server

In this ninth part, we will work on ensuring the server is receiving updated client information by creating a game state on the server.

15. Online Multiplayer Game Part 10 - Processing Game State on All Clients

In this tenth part, we are going to work on sending the game state back to our player (all clients).

16. Online Multiplayer Game Part 11 - Resetting the Game for More Rounds

In this eleventh part, you are going to learn how to reset the game upon game over for more rounds on both the client and the server side.

17. Online Multiplayer Game Part 12 - Official Network Playtest!

In this twelfth and final part, we are going to test our final game and play with multiple users.

Course Content

  1. The Art of Doing - Python Network Applications with Sockets

About The Provider

Packt
Packt
Birmingham
Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and i...
Read more about Packt

Tags

Reviews