Create generic distribution system

Still incredibly basic and only handles initial distribution and spawning with no relationships or anything.
This commit is contained in:
Michael Bradley 2025-07-06 18:29:58 -04:00
parent d76afe92f0
commit 4db82f328b
Signed by: MichaelBradley
SSH key fingerprint: SHA256:o/aaeYtRubILK7OYYjYP12DmU7BsPUhKji1AgaQ+ge4
5 changed files with 66 additions and 8 deletions

View file

@ -4,20 +4,15 @@ use bevy::prelude::*;
use uuid::Uuid;
use super::{
distribution::Networked,
io::{Config, handle_network_input, handle_network_output, heartbeat, timeout},
packet::{InboundPacket, OutboundPacket},
peer::{Peer, PeerChangeEvent, PeerMap, handle_new_peer, handle_peer_change},
queues::{NetworkReceive, NetworkSend},
socket::bind_socket,
state::NetworkState,
};
#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash)]
pub enum NetworkState {
#[default]
SinglePlayer,
MultiPlayer,
}
pub struct NetIOPlugin {
listen: u16,
peer: Option<SocketAddr>,