bevy_veilid
Build 2-Player turn-based p2p games with Bevy and Veilid
Build p2p turn-based games with anonimity for both clients with help of Veilid.
https://github.com/stillonearth/bevy_veilid/assets/97428129/4c505eef-1dee-4ab4-b0e7-51262a3b3337
Compatibility
| bevy version | veilid version | bevy_veilid version |
|---|---|---|
| 0.11 | 0.2.4 | 0.1.0 |
| 0.11 | 0.2.5 | 0.1.2 |
| 0.12 | 0.3 | 0.2 |
| 0.13 | 0.3.2 | 0.3 |
| 0.14 | 0.3.3 | 0.4 |
📝Features
- Event-Based: read and send event to communicate with other peer
- Turn-Based: no tick synchronization
- Anonymous: each run creates a new persona
👩💻 Usage
Refer to examples/pingpong for basic example.
1. Define a message to send over network
2. Attach plugin to bevy
3. Connect to systems
Events
EventConnectedPeerEventErrorEventAwaitingPeerEventVeilidInitializedEventReceiveMessage<SampleMessage>EventSendMessage<SampleMessage>EventMessageSent
Resources
bevy_veilid will inject this into bevy
💻 Under the hood
A full veilid instance will run in background with settings defined in veilid_duplex.
veilid_duplex manages veilid internals and provides an API to send a message to another peer by refering each other with dht_keys unique for each run.