Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rcastro2/thiswillknockyoursocketsoff
Projects explores socket programming as part of a workshop delivered through Math for America.
https://github.com/rcastro2/thiswillknockyoursocketsoff
aframe html-css-javascript p5js pygame python socket-io
Last synced: 12 days ago
JSON representation
Projects explores socket programming as part of a workshop delivered through Math for America.
- Host: GitHub
- URL: https://github.com/rcastro2/thiswillknockyoursocketsoff
- Owner: rcastro2
- Created: 2024-09-30T20:51:12.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-10-22T21:41:21.000Z (2 months ago)
- Last Synced: 2024-11-01T20:06:21.879Z (2 months ago)
- Topics: aframe, html-css-javascript, p5js, pygame, python, socket-io
- Language: Python
- Homepage:
- Size: 584 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This Will Knock Your Sockets Off
================================Overview
Projects explores socket programming as part of a workshop delivered through Math for America. Sockets create bi-directional communication channels between clients and a server for real time communication. All examples use Python to create a socket server and corresponding technology to create client applications. The Python socket server program must be running first before clients can connect. Start each client program using the appropriate environment. Web based clients must be started using a web server. You may use python -m http.server to start up a web server in the folder that contains the web based client. Web and socket servers are different. For Java clients, Maven was used to build the application. You may run the Java clients using Maven or Java directly on the .jar file produced.Below are a few resources used to research socket programming.
socket.io
python-socketio
flask-socketio
Chatroom Basic
This project explores the most fundamental application of socket programming using the socket library included with the standard installation of Python.
The project demonstrates a turn based chatroom where messages are passed between users at the server and client. There are several limitations with this project and its demonstration of socket communication. SocketIO library which is demonstrated in the succeeding projects improves on these limitations.
Chatroom Improved
This project improves on the Chatroom Basic project by providing an asynchronous approach to the chatroom communication where one client does not have to wait for a response before sending another message. Project provides the ability to connect multiple clients together through the Python server. Both the server and the clients use an additional library, SocketIO to accomplish this improvement. Unlike the Chatroom Basic project, the server merely broadcasts the message from one client to all other clients. This project demonstrates the ability for clients that use different programming languages to communicate with each other. One client was programmed using Python, another client was programmed using Java and last client was programmed using web based technologies.
Circle World
This project demonstrates a multiplayer visual application using socket programming along with the following graphics libraries and their associated programming environments: p5js (web based technologies), pygame (Python) and awt & swing (Java). In this project, each player is a circle in the world and the position of each player is synchronized with all other players through the server. There are three client applications: first client application uses Python and Pygame, second client uses web based technologies and p5js, and the last client uses Java along with awt & swing . There are also three additional libraries included, gamelib.py, gamelib_p5.js and GameLib.java to assist with the rendering of the graphics in the project. The Python, Java and web based clients can "play" together!
MIIVerse
This project demonstrates a multiplayer visual application using socket programming and AFrame.io, a web based framework for building 3D, virtual and augmented reality experiences in the browser. Each player is a 3D character in the world with the ability to move around and view other players. From the Python server point of view, this project is practically identical to Circle World where the purpose of the server is merely to synchronized the positions all players. Players can also "look" up and down which tilts the head of their character. The tilting of each player's head is also communicated to all other players through the server.
Kahoot
This project highlights the ability for the server to take a more "active" role in the communication with clients. Kahoot is a quiz based game where players earned points by how quickly they are able to answer the questions correctly. The Python server takes on the role of a "gameshow" host where the server presents the question to everyone and awards points accordingly based on the order that correct responses were submitted by players. Unlike the previous projects, clients do not communicate with each other.