Difference between revisions of "Gideros Unite Framework"

From GiderosMobile
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]][[File:Platform linux.png]]<br/>
 
  
 
=== 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. It uses LuaSocket to establish socket connections and even create server/client instances.
+
Gideros Unite framework provides a way to implement Multiplayer games:
 
+
* using '''LuaSocket''' to establish socket connections and create '''server'''/'''client''' instances
It provides the means of device discovery in Local Area Network, and allows to call methods of other devices through network.
+
* device discovery over '''L'''ocal '''A'''rea '''N'''etwork
 
+
* call methods on devices through the network
About protocols, it is possible to use tcp, udp or both (by binding some method to tcp, if reliability is needed, and others to udp for faster data processing).
+
* protocols: '''tcp''', '''udp''' or both (binding some method to tcp if reliability is needed, and others to udp for faster data processing)
  
==== Unite Package '''[[Media:Unite.zip|Unite.zip]]''' ====
+
You can download the Gideros Unite Framework: '''[[Media:Unite.zip|Unite.zip]]'''
==== Gideros application project '''[[Media:DrawTogetherV2.zip|DrawTogetherV2.zip]]''' ====
 
  
<syntaxhighlight lang="lua">
+
And an application project: '''[[Media:DrawTogetherV2.zip|DrawTogetherV2.zip]]'''
</syntaxhighlight>
 
  
 +
=== 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
  
'''[[Multiplayer]]'''
+
=== Framework ===
{{GIDEROS IMPORTANT LINKS}}
+
{{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:

  1. Server starts broadcasting or skip to step 5, if all clients know server IP address
  2. Client's start listening to servers
  3. Client receives broadcast message from server, newServer event is initiated
  4. Client autoconnects to server or user manually (by pushing button) connects to specific server
  5. Server receives newClient event
  6. Server accepts client automatically or user manually (by pushing button) accepts specific client
  7. Client receives onAccept event
  8. Implement your game logic here, where both clients and server can call methods on all devices or on one specific device in the network
  9. When one of the clients becomes unreachable, all clients and server get onClientClose event
  10. When server becomes unreachable, all clients get onServerClose event
  11. When you are finished, close client or server using close method, which stops all timers, closes all connections and destroys instance

Framework