Difference between revisions of "Gideros Unite Framework"
From GiderosMobile
Line 31: | Line 31: | ||
=== Framework === | === Framework === | ||
− | { | + | {{Unite Framework}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 06:50, 14 December 2023
Gideros Unite Framework
ar2rsawseen 2012/07/25 Gideros Mobile, updated 2023/12/13 (V2)
Gideros Unite framework provides a way to implement Multiplayer games:
- using LuaSocket to establish socket connections and create server/client instances
- device discovery over Local Area Network
- call methods on devices through the network
- protocols: tcp, udp or both (binding some method to tcp if reliability is needed, and others to udp for faster data processing)
You can download the Gideros Unite Framework: Unite.zip
And an application project: DrawTogetherV2.zip
Standard scenario
This is a standard scenario that can be created using Gideros Unite framework:
- Server starts broadcasting or skip to step 5, if all clients know server IP address
- Client's start listening to servers
- Client receives broadcast message from server, newServer event is initiated
- Client autoconnects to server or user manually (by pushing button) connects to specific server
- Server receives newClient event
- Server accepts client automatically or user manually (by pushing button) accepts specific client
- Client receives onAccept event
- Implement your game logic here, where both clients and server can call methods on all devices or on one specific device in the network
- When one of the clients becomes unreachable, all clients and server get onClientClose event
- When server becomes unreachable, all clients get onServerClose event
- When you are finished, close client or server using close method, which stops all timers, closes all connections and destroys instance
Framework