Difference between revisions of "Gideros Unite Framework"
From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' File:Platform android.pngFile:Platform ios.pngFile:Platform mac.pngFile:Platform pc.pngFile:Platform html5.pngFile:P...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
=== Gideros Unite Framework === | === Gideros Unite Framework === | ||
+ | ar2rsawseen 2012/07/25 Gideros Mobile, '''updated 2023/12/13 (V2)''' | ||
+ | |||
<youtube>https://www.youtube.com/watch?v=WBFLSz34I4I</youtube> | <youtube>https://www.youtube.com/watch?v=WBFLSz34I4I</youtube> | ||
− | Gideros Unite framework provides a way to implement Multiplayer games | + | Gideros Unite framework provides a way to implement Multiplayer games: |
− | + | * using '''LuaSocket''' to establish socket connections and create '''server'''/'''client''' instances | |
− | + | * device discovery over '''L'''ocal '''A'''rea '''N'''etwork | |
− | + | * 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: '''[[Media:Unite.zip|Unite.zip]]''' | |
− | |||
− | + | And an application project: '''[[Media:DrawTogetherV2.zip|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 === | |
− | {{ | + | {{Unite Framework}} |
Latest revision as of 07: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