Unity Photon Multiplayer Networking Turnbased game - unity3d

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.

Related

Unity3D multiplayer game using GunDB

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?)

How to capture player moment with webcam and use that as an input in a game?

I want to make a boxing game and move the player with the help of capturing moment of the player by using image processing. I have tried capturing moment in python using OpenCV but how could i use that input in a game environment ?
and which tool i should use for that ??
This is my first question here please cooperate.
Thanks
Just buy a kinect and use Microsoft's SDK. It has skeleton tracking built into it.
As far as game input, you can build standard serial stuff in unity3d in its background scripts. Either implement the camera directly into unity or else create a serial forwarder that runs on the computer, which reads the camera data, processes it, and then streams computed information to unity.

Create room with unity networking

hi and firstly sry for my english ...
i newly start creating a multiplayer game with unity
i download unity master server and facilitator from here and run them in my own server for creating an online multiplayer turn-base game.
when someone creating a room and other players join to that room, if the person who created the room, leave game or dc, other players will kick from room. is there any way to handle this problem?
something like reconnect? or create room in server?
For creating room i will recommend you Unity Network Lobby
The NetworkLobbyManager is a specialized type of NetworkManager that
provides a multiplayer lobby before entering the main play scene of
the game.
Unity also provides an asset for Lobby manager which is easy to use. For its implementation i'll recommend you this Tut.

Can I use RakNet Networking in unity?

I want to create a multiPlayer online game with unity but unity networking class isn't efficient.
Is it anyway for using RakNet in unity instead of UN(unity networking API)?
and how can I use it in c# ?
If i recall correctly RakNet is already being used by Unity by default but uses the networking class as a kind of wrapper for the RakNet API.

How would I add networked multiplayer support to an iPhone game?

I am looking to extend an iPhone game by adding support for networked multiplayer capabilities (preferably over WiFi). How would you suggest I add this functionality to this application?
Game Kit can be used to add match making and network communications to your game.
Start with the Game Kit Programming Guide which has step-by-step instructions for many scenarios and lots of sample code.