98
edits
RossyMiles (talk | contribs) (a work in progress ^_^) |
RossyMiles (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
Flatline is the most recent proposed multiplayer mod for Oni. This document is a work in progress. | Flatline is the most recent proposed multiplayer mod for Oni. This document is a work in progress. | ||
== Flatline API == | |||
Both the Flatline clients and dedicated servers will run inside Daodan inside an official build of Oni. This is because a copy of Oni is needed to fully simulate the scripting and physics in a game. | Both the Flatline clients and dedicated servers will run inside Daodan inside an official build of Oni. This is because a copy of Oni is needed to fully simulate the scripting and physics in a game. | ||
Two sets of functions will be provided. The Net* functions will provide a basic, non-blocking UDP sockets library. The FLr* functions will be the rest of the code required. | Two sets of functions will be provided. The Net* functions will provide a basic, non-blocking UDP sockets library. The FLr* functions will be the rest of the code required. | ||
== NetPlatform_* == | === NetPlatform_* === | ||
bool '''NetPlatform_Initalize'''()<br> | bool '''NetPlatform_Initalize'''()<br> | ||
This function is called when the network functionality is required. On Windows, it makes a call to WSAStartup. | This function is called when the network functionality is required. On Windows, it makes a call to WSAStartup. | ||
Line 13: | Line 13: | ||
For every call to NetPlatform_Initalize, there has to be a corresponsing call to NetPlatform_Shutdown. On Windows, this function calls WSACleanup. | For every call to NetPlatform_Initalize, there has to be a corresponsing call to NetPlatform_Shutdown. On Windows, this function calls WSACleanup. | ||
== NetUDPSocket_* == | === NetUDPSocket_* === | ||
int '''NetUDPSocket_Create'''(uint16_t '''port''')<br> | int '''NetUDPSocket_Create'''(uint16_t '''port''')<br> | ||
Creates a new, non-blocking, UDP socket and binds it to the port specified. If the specified port is 0, the socket is automatically bound to an unused port. | Creates a new, non-blocking, UDP socket and binds it to the port specified. If the specified port is 0, the socket is automatically bound to an unused port. |
edits