SlideShare a Scribd company logo
www.hydna.com
Create new kinds of multiuser experiences using
hydna and Unity
What is hydna
Platform agnostic
Bindings for Unity, C#, C++, Obj-C, Erlang, Actionscript, Nodejs, Java,
Javascript, Android, iOS
Scalable hosted networking platform
No need for a third party server
DEMO TIME
Works in Unity3D Free and Pro,
even on iOS and Android
using Hydna.Net;
!
channel = new Channel();
!
channel.Connect ("yourdomain.hydna.net?secret",
ChannelMode.ReadWrite);
!
channel.Open += delegate(object sender, ChannelEventArgs e) {
Debug.Log("Joined channel, message=" + e.Text);
channel.send(“Hello world!”);
};
!
channel.Data += delegate(object sender, ChannelDataEventArgs e) {
Debug.Log(“Received message=" + e.Text);
};
!
channel.Close += delegate(object sender, ChannelCloseEventArgs e) {
Debug.Log(“Failed to join, reason=" + e.Reason);
};
Unity/C#
channel = new HydnaChannel("yourdomain.hydna.net?secret", "rw");
!
channel.onopen = function(evt) {
console.log("Joined channel, message=" + evt.data);
channel.send(“Hello world!”);
};
!
channel.onmessage = function(evt) {
console.log(“Recieved message=" + evt.data);
};
!
channel.onclose = function(evt) {
console.log("Failed to join, reason=" + evt.reason);
};
Browser/Javascript
Channels are multiplexed, cheap, and
has outstanding performance
behavior("/", {
open: function(evt) {
if (evt.token == “secret”) {
evt.allow(“Welcome”);
} else {
evt.deny(“Wrong password”);
}
}
});
Behavior
Things you can do with behaviors
Routing
Room partitioning
Authentication
Password protection
Logging
External services
Connect to Facebook, etc
behavior(“/players/{name}“, {
open: function(evt) {
var lobby = evt.domain.getChannel(“/“);
evt.domain.set(“players:” + evt.connection.id, evt.params.name);
lobby.emit(“Player “ + evt.params.name + “ joined the game”);
evt.allow(“Welcome ” + evt.params.name);
},
close: function(evt) {
var lobby = evt.domain.getChannel(“/“);
evt.domain.del(“players:” + evt.connection.id);
lobby.emit(“Player “ + evt.params.name + “ leaved the game”);
}
});
Behavior
!
behavior("/facebook/auth/{uid}", {
open: function (evt) {
var uid = evt.params.uid;
var token = evt.token;
var url = 'https://graph.facebook.com/'+ uid + '?access_token=' + token;
http.get(url, function(err, body){
var response = JSON.parse(body);
!
if (err || response.error){
evt.deny("NOT_ALLOWED");
}
!
evt.allow("Welcome facebook user");
});
}
});
Authenticate with Facebook
Upcoming features
Geo-Location
(Track your players)
Persistant storage
(User database, scoreboards)
Workers
(Server-side game loops)
Open-Source
Try it out today
No credit-card required
Free sign-up
(up to 30 concurrent connections)
A lot of examples and docs
Learn more
www.hydna.com
hydna Unity plugin
github.com/hydna/hydna-unity-plugin
Chicken Demo
github.com/hydna/hydna-unity-chicken-demo
Feedback, questions and suggestions: info@hydna.com

More Related Content

Viewers also liked

Your Research Data Management with the support of 3TU.Datacentrum
Your Research Data Management with the support of 3TU.DatacentrumYour Research Data Management with the support of 3TU.Datacentrum
Your Research Data Management with the support of 3TU.Datacentrum
AnnemiekvdKuil
 
The Art & Science of Employee Engagement
The Art & Science of Employee EngagementThe Art & Science of Employee Engagement
The Art & Science of Employee Engagement
Justin Zawaly
 
Teñido Ixoq Ajkeem
Teñido Ixoq AjkeemTeñido Ixoq Ajkeem
Teñido Ixoq Ajkeem
Mónica Diaz
 
Long-term effect of physical activity on energy balance and body composition
Long-term effect of physical activity on energy balance and body compositionLong-term effect of physical activity on energy balance and body composition
Long-term effect of physical activity on energy balance and body composition
juan pedro gracia mendez
 
Outline of maiden speech
Outline of maiden speechOutline of maiden speech
Outline of maiden speech
Danspeechandscript
 

Viewers also liked (6)

Your Research Data Management with the support of 3TU.Datacentrum
Your Research Data Management with the support of 3TU.DatacentrumYour Research Data Management with the support of 3TU.Datacentrum
Your Research Data Management with the support of 3TU.Datacentrum
 
The Art & Science of Employee Engagement
The Art & Science of Employee EngagementThe Art & Science of Employee Engagement
The Art & Science of Employee Engagement
 
Teñido Ixoq Ajkeem
Teñido Ixoq AjkeemTeñido Ixoq Ajkeem
Teñido Ixoq Ajkeem
 
2
22
2
 
Long-term effect of physical activity on energy balance and body composition
Long-term effect of physical activity on energy balance and body compositionLong-term effect of physical activity on energy balance and body composition
Long-term effect of physical activity on energy balance and body composition
 
Outline of maiden speech
Outline of maiden speechOutline of maiden speech
Outline of maiden speech
 

Similar to Create new kinds of multiuser experiences using hydna and Unity

Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
Wim Godden
 
Android/iPhone/Blackberry Web Service Connector
Android/iPhone/Blackberry Web Service ConnectorAndroid/iPhone/Blackberry Web Service Connector
Android/iPhone/Blackberry Web Service Connector
Akash Kava
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
Ulrich Krause
 
Android kotlin google
Android kotlin google Android kotlin google
Android kotlin google
Jahidul Islam
 
Introduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshIntroduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
Siddhesh Bhobe
 
State of the Platforms
State of the PlatformsState of the Platforms
State of the Platforms
Sasha Goldshtein
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
ejlp12
 
Arduino and the real time web
Arduino and the real time webArduino and the real time web
Arduino and the real time web
Andrew Fisher
 
Project Syndroid
Project SyndroidProject Syndroid
Project Syndroid
cromwellian
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.com
JUG Genova
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
Nicolò Carandini
 
Programming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.ioProgramming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.io
Günter Obiltschnig
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
Todd Anglin
 
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-PlatformVisual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Stefano Ottaviani
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
Christian Grobmeier
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
jobandesther
 
Android Basics
Android BasicsAndroid Basics
Android Basics
Arvind Sahu
 
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter ObiltschnigMastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
WithTheBest
 
ควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroidควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroid
Worakrit Sittirit
 
Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QA
Alban Gérôme
 

Similar to Create new kinds of multiuser experiences using hydna and Unity (20)

Building interactivity with websockets
Building interactivity with websocketsBuilding interactivity with websockets
Building interactivity with websockets
 
Android/iPhone/Blackberry Web Service Connector
Android/iPhone/Blackberry Web Service ConnectorAndroid/iPhone/Blackberry Web Service Connector
Android/iPhone/Blackberry Web Service Connector
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
Android kotlin google
Android kotlin google Android kotlin google
Android kotlin google
 
Introduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshIntroduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
 
State of the Platforms
State of the PlatformsState of the Platforms
State of the Platforms
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Arduino and the real time web
Arduino and the real time webArduino and the real time web
Arduino and the real time web
 
Project Syndroid
Project SyndroidProject Syndroid
Project Syndroid
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.com
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Programming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.ioProgramming IoT Gateways in JavaScript with macchina.io
Programming IoT Gateways in JavaScript with macchina.io
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-PlatformVisual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
Visual Studio 2015: novità per gli sviluppatori iOS, Android e Cross-Platform
 
Apps with Apache Cordova and Phonegap
Apps with Apache Cordova and PhonegapApps with Apache Cordova and Phonegap
Apps with Apache Cordova and Phonegap
 
Networking and Data Access with Eqela
Networking and Data Access with EqelaNetworking and Data Access with Eqela
Networking and Data Access with Eqela
 
Android Basics
Android BasicsAndroid Basics
Android Basics
 
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter ObiltschnigMastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
 
ควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroidควบคุมบอร์ดArduinoผ่านระบบandroid
ควบคุมบอร์ดArduinoผ่านระบบandroid
 
Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QA
 

Recently uploaded

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 

Recently uploaded (20)

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 

Create new kinds of multiuser experiences using hydna and Unity

  • 1. www.hydna.com Create new kinds of multiuser experiences using hydna and Unity
  • 2. What is hydna Platform agnostic Bindings for Unity, C#, C++, Obj-C, Erlang, Actionscript, Nodejs, Java, Javascript, Android, iOS Scalable hosted networking platform No need for a third party server
  • 4. Works in Unity3D Free and Pro, even on iOS and Android
  • 5. using Hydna.Net; ! channel = new Channel(); ! channel.Connect ("yourdomain.hydna.net?secret", ChannelMode.ReadWrite); ! channel.Open += delegate(object sender, ChannelEventArgs e) { Debug.Log("Joined channel, message=" + e.Text); channel.send(“Hello world!”); }; ! channel.Data += delegate(object sender, ChannelDataEventArgs e) { Debug.Log(“Received message=" + e.Text); }; ! channel.Close += delegate(object sender, ChannelCloseEventArgs e) { Debug.Log(“Failed to join, reason=" + e.Reason); }; Unity/C#
  • 6. channel = new HydnaChannel("yourdomain.hydna.net?secret", "rw"); ! channel.onopen = function(evt) { console.log("Joined channel, message=" + evt.data); channel.send(“Hello world!”); }; ! channel.onmessage = function(evt) { console.log(“Recieved message=" + evt.data); }; ! channel.onclose = function(evt) { console.log("Failed to join, reason=" + evt.reason); }; Browser/Javascript
  • 7. Channels are multiplexed, cheap, and has outstanding performance
  • 8. behavior("/", { open: function(evt) { if (evt.token == “secret”) { evt.allow(“Welcome”); } else { evt.deny(“Wrong password”); } } }); Behavior
  • 9. Things you can do with behaviors Routing Room partitioning Authentication Password protection Logging External services Connect to Facebook, etc
  • 10. behavior(“/players/{name}“, { open: function(evt) { var lobby = evt.domain.getChannel(“/“); evt.domain.set(“players:” + evt.connection.id, evt.params.name); lobby.emit(“Player “ + evt.params.name + “ joined the game”); evt.allow(“Welcome ” + evt.params.name); }, close: function(evt) { var lobby = evt.domain.getChannel(“/“); evt.domain.del(“players:” + evt.connection.id); lobby.emit(“Player “ + evt.params.name + “ leaved the game”); } }); Behavior
  • 11. ! behavior("/facebook/auth/{uid}", { open: function (evt) { var uid = evt.params.uid; var token = evt.token; var url = 'https://graph.facebook.com/'+ uid + '?access_token=' + token; http.get(url, function(err, body){ var response = JSON.parse(body); ! if (err || response.error){ evt.deny("NOT_ALLOWED"); } ! evt.allow("Welcome facebook user"); }); } }); Authenticate with Facebook
  • 12. Upcoming features Geo-Location (Track your players) Persistant storage (User database, scoreboards) Workers (Server-side game loops) Open-Source
  • 13. Try it out today No credit-card required Free sign-up (up to 30 concurrent connections) A lot of examples and docs
  • 14. Learn more www.hydna.com hydna Unity plugin github.com/hydna/hydna-unity-plugin Chicken Demo github.com/hydna/hydna-unity-chicken-demo Feedback, questions and suggestions: info@hydna.com