Those who were not able to attend our 4th Meteor Ho Chi Minh meetup at September 17th could find all about Multiplayer Game with Unity3D and Meteor – one of the main topics of the meetup – in this blog.
Before digging into every facet of this post, you are required to have a fairly good background of Meteor and Unity3D.
1. 12/1/2016 Multiplayer Game With Unity3D And Meteor
https://blog.designveloper.com/2016/10/11/unity3dandmeteorgame/ 1/6
Multiplayer Game With Unity3D And
Meteor
FYI: This is one of two topics of our 4th Meteor Meetup, take place on 17th September, 2016.
The author is Huy Trinh , a young talent member of Designveloper
(https://www.designveloper.com/).
Those who were not able to attend our 4th Meteor Ho Chi Minh meetup
(https://blog.designveloper.com/2016/09/19/4th-meteor-meetup-review/) at September 17th could
nd all about Multiplayer Game with Unity3D and Meteor – one of the main topics of the meetup – in
this blog.
Before digging into every facet of this post, you are required to have a fairly good background of
Meteor and Unity3D.
What is Unity3D?
Unity is a cross-platform game engine developed by Unity Technologies and used to develop video
games for PC, consoles, mobile devices and websites. First announced only for OS X, at Apple’s
Worldwide Developers Conference in 2005, it has since been extended to target 24 platforms.
M E T E O R ( H T T P S : / / B L O G . D E S I G N V E L O P E R . C O M / C A T E G O R Y / M E T E O R / )
B y Va n D o ( h t t p s : // b l o g . d e s i g n v e l o p e r. c o m / a u t h o r / v a n d o / ) o n O c t o b e r 1 1 , 2 0 1 6
2. 12/1/2016 Multiplayer Game With Unity3D And Meteor
https://blog.designveloper.com/2016/10/11/unity3dandmeteorgame/ 2/6
What is Meteor JS?
Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor
includes a key set of technologies for building connected-client reactive applications, a build tool, and
a curated set of packages from the Node.js and general JavaScript community.
If you are a Meteor-novice, no worries! You can discover more about this full-stack JavaScript platform
for developing single-page, real time web and mobile apps at Meteor.com (https://www.meteor.com/)
Why we should use Meteor with Unity3D?
When using Meteor, launching a MVP in 3-4 weeks can be a reality. With JavaScript on back-end, plus
smart packages, Meteor allows you to develop faster. You don’t need to have experience about
implement TCP/IP, UDP or pure Socket for a Gaming Server. With collection and method we can easily
implement Gaming Network Architecture like Latency Compensation, Client Prediction, Server
Reconciling and other technique.
How to connect MeteorJS with Unity3D
A team in Los Angeles have developed a plugin that make a bridge between Unity3D and MeteorJS
through Websocket and DDP. You can nd it here https://github.com/hiddenswitch/Meteor-Unity
(https://github.com/hiddenswitch/Meteor-Unity). By using this plugin we can use almost Meteor API
such as: login, method, collection, publish/subscription. The plugin is great in general but one thing, it
hasn’t supported WebGL for Unity3D yet.
M o b ile
You can watch how to setup and connect step by step here: https://github.com/hiddenswitch/Meteor-
Unity (https://github.com/hiddenswitch/Meteor-Unity)
WebGL
You cannot use hiddenswitch plugin with Unity3d WebGL now. But we can use other way to interact it.
Unity3d WebGL support 2 API that help calling from inside WebGL container to javascripton page
outside and reserve.
To call methods on GameObjects in your content from browser JavaScript, you can use the
following code:
SendMessage ('MyGameObject', 'MyFunction', 'foobar');
Read more here: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
(https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html)
To calls a function in the web page that contains the WebGL Player.
Application.ExternalCall
ExternalCall calls functionName in the web page containing the WebGL player, passing the given
arguments to it. Supported argument types are the primitive types (string, int, oat, string) and arrays
of such types. Any other objects are converted to string using ToString and passed as strings.
3. 12/1/2016 Multiplayer Game With Unity3D And Meteor
https://blog.designveloper.com/2016/10/11/unity3dandmeteorgame/ 3/6
For a deeper understanding, you can read here:
https://docs.unity3d.com/ScriptReference/Application.ExternalCall.html
(https://docs.unity3d.com/ScriptReference/Application.ExternalCall.html)
So, did you nd some great information of your own in this blog? Do you have any questions? Let me
know in the comments and we can discuss about it!
(https://www.facebook.com/sharer/sharer.php?
u=https%3A%2F%2Fblog.designveloper.com%2F2016%2F10%2F11%2Funity3d-
and-
meteor-
game%2F)
(http://twitter.com/intent/tweet?
source=Designveloper
Software
agency
-
Meteor
prime
partner&text=https%3A%2F%2Fblog.designveloper.com%2F2016%2F10%2F11%2Funity3d-
and-
meteor-
game%2F)
(https://plus.google.com/share?
url=https%3A%2F%2Fblog.designveloper.com%2F2016%2F10%2F11%2Funity3d-
and-
meteor-
game%2F)
(http://www.linkedin.com/shareArticle?
mini=true&url=https%3A%2F%2Fblog.designveloper.com%2F2016%2F10
and-
meteor-
game%2F&title=Multiplayer%20Game%20With%20Unity3D%20And%20Meteor&
Software
agency
-
Meteor
prime
partner)
(http://www.tumblr.com/share/link?
url=https%3A%2F%2Fblog.designveloper.com%2F2016%2F10
and-
meteor-
game%2F&name=Multiplayer%20Game%20With%20Unity3D%20And
Meteor js
multiplayer game
unity3D
3 Things Make A Single-Page Website Stunning (https://blog.designveloper.com/2016/10/05/tips-for-single-
page-sites/)
(https://blog.designveloper.com)
Reasons Why Visitors Leave Your Website In 10 Seconds
(https://blog.designveloper.com/2016/10/13/reasons-for-leaving-a-website/)
Y O U M AY A L S O L I K E