Unity3D multiplayer game using GunDB - unity3d

I usually using firebase for syncing every player for my multiplayer game but this time I can't because this time I want create a desktop game and firebase only support mobile.
can I use Gundb as alternative to store the player position and animation. and every client automatically syncing the data

#alucard555 yes, there is a very very simple example of a browser-based game (Asteroids in 250LOC!) that could work in a desktop app via Electron or something:
https://github.com/amark/gun/blob/master/examples/game/space.html
You can play the game (arrow keys to move, space to fire a shockwave, doesn't work on mobile or small screens) here:
http://gunjs.herokuapp.com/game/space.html
With regards to Unity3D specifically, you would need a JavaScript bridge. I myself have not done Unity3D development myself, but I have (?) heard (?) it supports JavaScript? Or some variant of it?
GUN by itself is plain vanilla JS, the only porting UnityScript may need is changing the default localStorage and WebSocket adapters (these are modular and can easily be switched out for something Unity supports).
However I do not have enough Unity3D experience to speak on this matter. (I just looked up Firebase's Unity support, and noticed that it is not JS based, it is C++. This may mean JS is incompatible with Unity?)

Related

Does Agora.io for Unity provide these features?

I'm a bit lost looking through all the various Agora.io modules (and not sure what it means that only some of them have Unity-specific downloads).
I want to make a Unity app where two remote phones exchange data as follows:
Streaming voice in both directions
Streaming video in one direction (recorded from device camera)
Streaming a small amount of continuously-changing custom data in the other direction (specifically, a position + orientation in a virtual world; probably encoded as 7 floats)
The custom data needs to have low latency but does not need reliability (it's fine if some updates get lost; app only cares about the most recent update). Updates basically every frame.
Ideally I want to support both Android and iOS.
I started looking at Agora video (successfully built a test project) and it seems like it will cover the voice and video, but I'm struggling to find a good way to send the custom data (position + orientation). It's probably theoretically possible to encode it as a custom video feed but that sounds complex and inefficient. Is there some out-of-band signalling mechanism I could use to send some extra data alongside/instead of a video?
Agora real-time messaging sounds like it would probably work for this, but I can't seem to find any info about integrating it with Unity (either on Agora's web site or in a general web search). Can I roll this in somehow?
Agora interactive gaming could maybe also be relevant? The overview doesn't seem real clear about how it's different from regular Agora video. I suspect it's overkill but that might be fine if there isn't a large performance cost.
Could anyone point me in the right direction?
I would also consider alternatives to Agora if there's a better plugin for implementing this feature set in Unity.
Agora's Video SDK for Unity supports exporting projects to Android, iOS, MacOS, and Windows (non-UWP).
Regarding your data streaming needs, Agora's RTM SDK is in the process of being ported to work within Unity. At the moment the best way to send data using the Agora SDK is to use CreateDataStream to leverage Agora's ability to open a data stream that is sent along with the frames. Data stream messages are limited to 1kb per frame and 30kb/s so I would be cautious about running it on every frame if you are using a frame-rate above 30fps.

make an app that displays desktop on iphone in vr on unity

I would like to make an AR iPhone app in unity that places an object in the real world which you can then interact with it on your iPhone. like you have a bar at the bottom of your screen and you can drag the objects into the ar world and interact with them with the ability of hand tracking. This will work kind of like the meta 2 interface https://www.youtube.com/watch?v=m7ZDaiDwnxY which you can grab things and drag them. it uses hand tracking to do this.
I have done some research on this but, I need some help doing this because I don't know where to start and how to accomplish what I am trying to do.
I don't have any code.
You can email me at jaredmiller219#gmail.com for any comments and questions. also, you can email me to help me with this. thanks so much for your support!
To get started in mobile AR in Unity, I would recommend starting with Unity's resources:
https://unity.com/solutions/mobile-ar
Here's a tutorial resource for learning ARKit:
https://unity3d.com/learn/learn-arkit
As for hand tracking, obviously the Meta 2 has specialized hardware to execute its features... you shouldn't necessarily be expecting to achieve the same feature set with only a phone driving your experience. Leap Motion is the most common hand tracker I've seen integrated into VR and AR setups and it works well, but if you really need hand tracking with just a phone, you could check out ManoMotion which seeks to bring hand tracking and gesture recognition to ARKit, although I haven't personally worked with it.

Can we combine SFML with Unity? If yes then how?

I just started C++ lessons not so long ago because I am interested in game development. Obviously I am nowhere near creating my own game yet but I was reading some guides on game development and it was talking about Unity and how it makes game development a lot easier than having to code 100% of the game.
However, I also watched some tutorials on youtube regarding SFML which can also be used for game developing, what are the differences? and can you use both at the same time?
I have already started learning about SFML but Unity seems so much simpler to use.
Thanks in advance.
In theory yes, but it's not practical, so the real answer is no.
SFML provides access to basic APIs (OpenGL, OpenAL, OS APIs, FreeType 2, etc) which can be used to build complex applications on top, for example like an engine more in the direction of Unity (e.g. xygine, Nero Game Engine).
But since Unity already provides access to all the things SFML would provide, there's really no reason in trying to integrate SFML into Unity. Similar to how it wouldn't make sense to integrate the Unreal Engine into Unity.
If you really want to do it, you'd approach it similar to how #Programmer described it in the comments.

Embed Unity game within ReactNative (handling bidirectional communication)

I am creating a multi-mobile (iOS/Android) app with React Native.
The app needs to embed & launch a Unity game.
It will need to send information to the game, and also receive information from the game. A function passing a JSON string would be sufficient.
Six years ago I embedded native iOS code within a Unity app and it was rather a dark art.
What is the state of play in 2018?
Presumably it is going to involve separate iOS and Android codebases and a ReactNative component to wrap these, providing a single JavaScript interface. At the Unity end, I'm not sure if it will require separate per-platform coding.

Unity Photon Multiplayer Networking Turnbased game

How to make Multiplayer Turnbased game in unity Photon Networking like Tic Tac Toe.How to assign Controls on runtime through Photon Network.Is it done by change the ownershipp o game object?
Have a look at the demo on https://doc.photonengine.com/en/turnbased/current/tutorials/memory-demo. It should be easily adaptable to your purposes.
Make sure that you use proper tool for turnbased game. PUN does not support turnbased apps currently. So you need dotnet Photon Client SDK. There is no concept of object or ownership in this SDK. Use events or room properties to synchronize game state.
Create a Turn Manager first, use either RPC or Custom Properties(preferably Room Custom Properties) to manage who is playing.
Switch turn using GetNext() (see https://doc-api.photonengine.com/en/pun/v2/class_photon_1_1_realtime_1_1_player.html)
Depending upon who is playing allow drawing 'O' or 'X' on the board and sync board's data with RPC or Custom Properties.