steamforged-skies/deleteme.txt

33 lines
886 B
Plaintext
Raw Normal View History

2024-12-29 03:08:39 +00:00
Player 1: Host
Player 2: Pilot
Player 3: Neither
FOR SENDING UPDATES:
if host is pilot or no pilot, host sends ship state
if pilot, pilot sends ship state not the host
FOR RECEIVING UPDATES:
if no pilot and not host, receive updates
if no pilot and is host, do not receive updates - host is sending updates
if pilot, do not receive updates
if host and there is a pilot, receive updates from pilot
func send():
if (host == pilot or no_pilot) {
// host sends ship state
} else if (pilot) {
// pilot sends ship state
}
func receive():
if (no_pilot and not host) {
// receive updates from host
} else if (no_pilot and is_host) {
// do not receive updates - host is sending updates
} else if (pilot) {
// do not receive updates - sending updates as pilot
} else if (host and there is a pilot) {
// receive updates from pilot - receiving updates as host from pilot
}