feat(packages): ludic.net - a party over UDP: peers, reliable ordered delivery, the hello's frame and the host's pids, join codes, room codes through a matchmaker with STUN, punching and a relay, the MTU cap and the wire codec; messages in on an inbox, the session's end and a silent guest as facts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 07:45:26 +03:00
parent 411206e45a
commit 12172d7b75
20 changed files with 1762 additions and 0 deletions

View file

@ -0,0 +1,17 @@
# queries.ludic - what the game asks of the session
export function net_state() -> int { return net__state }
export function net_live() -> bool { return net__state == NET_HOSTING or net__state == NET_JOINED }
export function net_active() -> bool { return net__state != NET_IDLE and net__state != NET_LOST }
export function net_hosting() -> bool { return net__state == NET_HOSTING }
export function net_joined() -> bool { return net__state == NET_JOINED }
export function net_joining() -> bool { return net__state == NET_JOINING }
export function net_my_pid() -> int { return net__my_pid }
export function net_token() -> int { return net__token }
export function net_time() -> float { return net__time }
export function net_why() -> int { return net__why }
export function net_join_ip() -> int { return net__join_ip }
export function net_join_port() -> int { return net__join_port }
export function net_port() -> int {
if net__sock <= 0 { return 0 }
return NetSocket.port(net__sock)
}