Proof of concept - Harfang App with multiplayer socket / client and possibly Web3 / Blockchain interactions
This project was made by Clément BEUDOT using the HarfangHighLevel Python library. I might switch to the complete Harfang 3D framework soon if HHL is so high level that i can't do what I want.
This concept demonstrates the usage of the socket library to create a fully-functional server/client game using the HARFANG API in Python.
The main idea behind this project is to create a sort of minimal 3D Metaverse, containing every aspect that one should need :
- ECDSA Signatures authentication with the server
- Smart Contracts storing user data (no database needed + server-wide data)
- Possibility to send Tokens (ERC20, NFT etc...) through the game interface
- The server listens for incoming connections
- It accepts the client and does the auth process
- It receives positions from each client in a thread
- It sends all players positions to each client in another thread
- The client currently generates a Wallet on each launch (the objective is to add a MetaMask / Private Key auth and this is 100% doable)
- The client signs a message ("auth") using it's wallet private key
- The server awaits for the client's address and it's signed message
- The server reverses the signed message to obtain an address and compares it with the client address to make sure both correspond
- Connection is either authorized or refused after the last step
- Get Python 3
- Get HARFANG HIGH LEVEL using PIP in the command line, type 'pip install harfanghighlevel'
- Clone/download this repository
- run server.py
- run client.py