summaryrefslogtreecommitdiff
path: root/doc/devel/netplay/notes
diff options
context:
space:
mode:
authorneonloop2021-05-07 20:00:12 +0000
committerneonloop2021-05-07 20:00:12 +0000
commit7f6002caba3f0a6749820c2772161caf55b8d267 (patch)
tree1ed4bdd8c9ac897d1a3f77c223c1fd286dded458 /doc/devel/netplay/notes
downloaduqm-7f6002caba3f0a6749820c2772161caf55b8d267.tar.gz
uqm-7f6002caba3f0a6749820c2772161caf55b8d267.tar.bz2
uqm-7f6002caba3f0a6749820c2772161caf55b8d267.zip
Initial commit (uqm-0.8.0)
Diffstat (limited to 'doc/devel/netplay/notes')
-rw-r--r--doc/devel/netplay/notes21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/devel/netplay/notes b/doc/devel/netplay/notes
new file mode 100644
index 0000000..afac628
--- /dev/null
+++ b/doc/devel/netplay/notes
@@ -0,0 +1,21 @@
+As the game currently unfortunately works with polling, this is how
+to integrate network handling with the game.
+
+In the function called periodically by DoInput(), there should be a call
+to netInput() somewhere at the beginning, and a call to flushPacketQueues()
+somewhere at the end.
+
+netInput() checks all connections for incoming packets, and calls
+the appropriate packet handlers.
+
+flushPacketQueues() sends all pending packets on their way, for all
+connections.
+
+In between, you can call functions that enqueue packets.
+You would also check the network state here to determine whether you need to
+act on some packet that has been delivered to the local party.
+
+
+
+
+