This is a repository where I walk myself through how to use the ENet library.
If you have any improvements, suggestions and so on, issues and PRs are welcome.
Knowledge was gathered from
- ENet official documentation
- ENet source code
- Usergames' ENet tutorial series
- Love2D framework's ENet documentation
- AI-powered documentation for ENet. I found it very useful, but don't trust it in all cases.
For linux, you need to install
Debian:
sudo apt-get update
sudo apt-get install libenet-devFedora:
sudo dnf install enet-devel- 01_setup:
- minimal client-server setup
- practices of events handling
- 02_chat:
- simple multiuser chat
- working with packets (creating, destroying, so on)
- connect/disconnect
- 03_realtime_multiplayer:
- defining a simple binary protocol with CBOR library
- unreliable channel for player input and world updates
- reliable channel for chat messages and slot assignment
- unoptimized world updates messages
- fixed DT