Quantcast
Viewing all 1557 articles
Browse latest View live

Authoritative Photon server advice needed

Hello,
I am making a Unity3D game currently using Photon cloud and would really like to expand into a dedicated server (either hosted by me or ExitGames).
Knowing this, I have already built the current networking code in the game as its own standalone 'entity' (that runs on the master client) that is almost utterly decoupled from the clients code. My hope is that upon setting up a Photon server I can simply migrate this 'server' code the the actual physical server with little trouble.
The problem I have is finding any comprehensive tutorial or guide showing how to do this (there's a few that show how to start-up a server but none that I found showing game code running on the server managing clients in a 'room').
Also, I only hold a Unity3D free licence (can't use plugins and such), will that be an issue?
Any help in pointing me in the right direction would be great, thanks!

How can I check connecting client on correctness?

Hi,

I have photon server on my self-hosted server. I try to make some "protection" from clients who are trying to connect to my server from different client.

For example: I have "Game 1" (right) and "Game 2" (bad). All operations have to work only from client "Game 1". If someone connect from "Game 2" (and join the same room) this will break all operations in "Game 1" and create a lot of exceptions.

Image may be NSFW.
Clik here to view.


I checked this: I started my own game (connected and joined in room) after I started game from PUN examples and joined the same room and got a lot of exceptions. (In my game all rooms have to be with property Visible = true, so don't want to hide rooms, I want to don't let client with "Game 2" do smth on my photon server)

How can I mind "Game 2" connect and join rooms on my server? Mb using unique id of game or smth like that:
if (ConnectedClientGameId != TrueGameId)
{
Kick(client);
}
Or mb I can set some property inside room to clients which doesn't know this property couldn't join this room.

But I think that the best solution - just kick from server any clients who connected from different game.

Thanks

Explain MasterServer.MasterApplication, MasterServer.GameApplication, GameServer.GameApplication

First of all, apologies for having too many questions. I'm trying my best to wrap my head around the design of the Loadbalancing server. My plan is to extend it the suit the needs of our game.

I'm looking at src-server/Loadbalancing. Can someone explain the relationship between these 3 applications:
1. MasterServer.MasterApplication
2. MasterServer.GameApplication
3. GameServer.GameApplication

How to set room as permanently invisible server-side when maxPlayers is met?

Context: I have a 1v1 game. I understand that when there maxPlayers in the room, no other players can join the room. However, when a player disconnects, I am assuming that other players can then join the room. I don't want that to happen. I want the room to remain invisible from matchmaking, while I wait for the other player to reconnect.

So my questions are:
1. How do I set a room to be permanently invisible server-side when maxPlayers is met? I don't want the client to control this.
2. Is this done on MasterServer or GameServer?

MMO Chat

Hello friends. I've been working a few weeks with the MMO solution and I'm enjoying it a lot. I have been very successful in modifying everything I need in the present source files.

My question is about the CHAT.
Using PhotonMMO what would be the best solution to chat enter my clients ?.

Should I implement this functionality to send text data to my own server or use PhotonChat?

Peer is not initialized yet

My photon server has some error like this:

Peer is not initialized yet
Photon.SocketServer.PeerBase.SendEvent(IEventData eventData, SendParameters sendParameters)
h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\PeerBase.cs: 行 614

What is it and how to avoid ?

Peer is not initialized yet

My photon server has some error like this:

Peer is not initialized yet
Photon.SocketServer.PeerBase.SendEvent(IEventData eventData, SendParameters sendParameters)
h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\PeerBase.cs: 行 614

What is it and how to avoid ?

How does the redistributable server work?

There doesn't seem enough information on the website about this.

1. What kind of license do I need in order to bundle the redistributable server with my game?
2. Do I need to ship the license file with the redistributable server for it to work?
3. Does it require an active internet connection all the time? Can it be run offline without internet?
4. Can I run it silently from my within my game? I want all the network interface inside the game as much as possible.

I'm using PUN and Unity for my game if that matters.
Thanks in advance.

Sending broadcast inside OnJoin event in photon server plugin

Hi
I figure out that photon Load Balancing is synchronous.
I am trying to send broadcast from my server plugin to players when 2 users joined to the room.but each player need to next player custom properties.
my question is that if i call broadcast after info.continue() are custom properties of new joined player will be send to next player before sending my broadcast or not?
Is it possible that custom properties be delivered after broadcast?

Example:
public override void OnJoin(IJoinGameCallInfo info)
{
// if (info.userId == second player userId)

// New custom actor properties will set
info.Continue();
Broadcast(evStartGameAndGetOppponentInfo, null);
}

Thanks

Move Photon Cloud to Photon Server

Hi all,
I'm newbie of Photon Server. My project is a PvP game using Unity engine.
Now I'm planning switch Photon Cloud to Customized Photon Server because we need to authenticate players' positions, attributes, hit detecting etc. And we now done the all sync by Photon Cloud. (using PhotonView, PhotonTransformView, RPC, Properties etc.)

My idea is to modify the source code from LoadBalancing which Exit Games provided.
I have read the source code but I can't figure out how is the server handled OnPhotonViewSerialize () from PUN.
Can anyone give me some info about it?

Any info would be appreciated.

Obula

Photon server - is it right for my purposes?

Hey folks, now it must have been a year since I asked some tosh question about integrating the Unreal engine with photon server etc. Anyway, after working heavily with a couple of game engines (notably Unity and the Unreal engine) I finally am starting a rather ambitious project along with a small team (which I believe is achievable).

So essentially I just have a couple of questions. I have done a fair share of research into Photon however havnt yet looked at everything in depth.

Would there be much benefit in me using Photon server for a login/authentication server over writing one from scratch?

How exactly does Photon handle and maintain player 'sessions'?

Thanks folks Image may be NSFW.
Clik here to view.
:)

Can I put custom class in Room's Properties?

// in Room.cs
/// <summary>
/// Gets a PropertyBag instance used to store custom room properties.
/// </summary>
public PropertyBag<object> Properties { get { return this.roomState.Properties; } }


Is there any extra code I need to do for a custom class to be properly serialized when it is sent across the network?

My class only has primitive types like ints and strings. But I am wondering if there are any extra code or attributes that I need to add to my class.

Can someone explain Photon.SocketServer.SendParameters?

Context: I want to publish an event from the server using Room.PublishEvent(HiveEventBase e, Actor actor, SendParameters sendParameters)

I don't know what to use for sendParameters, specifically for the channelId. Would it work if I just pass new SendParameters()?

Can you also elaborate what the channel id is used for? I'm really curious.

My S2S Peers never receive any OnOperation calls

Hi, I am trying to create a Photon Server Application from scratch, but I got stuck at S2S communication.
I am able to set up the connection, initialize encryption and event send operations using the peers (in both ways I always receive "OK" as send result), but OnOperationRequest is never called on the receiving peer. Even though in my log, I can find the exact piece of data, which is my operation request:

OperationData - PBase.OnReceive - ConnID=2, data=(47 bytes) F3-02-04-00-02-.....

What am I doing wrong?

Server Chat example

Hello,
I have been trying to follow the simple chat server from the "An App From Scratch" example.
I am using Visual Studio 2015, with .Net 4.6, 4.5.1 and 4.5.
I am currently having the problem where the OnEvent(EventData eventData) method in my ChatClient.cs does not seem to get called whenever I type out and send a message. Therefore, I do not see any sent messages on the clients.

Any help appreciated.
Thank you very much and best regards.

Can I auto detect ServerToServer connection port

Hi I'm developing S2S Code, I know normal way to connect, like this

protected override PeerBase CreatePeer(InitRequest initRequest)
{
if (initRequest.LocalPort == 4520)
{
// for S2S connections
return new MyInboundPeer(initRequest);
}
}

but I wanna auto detect port number like this
if (this.ServerToServerPorts.contain( initRequest.LocalPort ))
{
// for S2S connections
return new MyInboundPeer(initRequest);
}

or

if (initRequest.IsS2SConnecttion)
{
// for S2S connections
return new MyInboundPeer(initRequest);
}

Can do that ?

Explain how to use byte code on PhotonPeer.RegisterType()

This link doesn't explain what byte code that we need to pass has to be. Can I get clarification? Why (byte)'W' in this example? What are the byte codes that are already being used by the framework? Thanks.

Controlling other players instantiated object

Help please Image may be NSFW.
Clik here to view.
:neutral:

How can I make other player control my instantiated objects and I can control the objects of player who joins??

webRpc errors

i am using PUN Free.when i use Photonnetwork.webRpc,got a error like
2017-02-18 22:54:47,750 [13] ERROR Photon.SocketServer.PeerBase - exception during handling of data.Peer:T:MasterClientPeer,ConnId:0,ip:127.0.0.1:56326, Data: F3-02-DB-00-02-D1-73-00-0A-50-6C-61-79-65-72-49-6E-66-6F-D0-73-00-04-74-65-73-74,
Exception:System.NullReferenceException: 未将对象引用设置到对象的实例。
在 Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleRpcRequest(OperationRequest operationRequest, SendParameters sendParameters) location d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\MasterClientPeer.cs:line 759
在 Photon.SocketServer.Rpc.Peer.OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters) location h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Rpc\Peer.cs:line 109
在 Photon.SocketServer.PeerBase.OnReceive(Byte[] data, SendParameters sendParameters) location h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\PeerBase.cs:line 1243
在 Photon.SocketServer.PeerBase.OnReceiveInternal(Byte[] data, SendParameters sendParameters, Int32 rtt, Int32 rttVariance, Int32 numFailures) location h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\PeerBase.cs:line 988

is this a server error?how to fix ti?

Latest photon Controller (4.x) want's to install .NET 3.5?

Hey there,

I have just setup my first photon server on my dedicated window 2016 server machine - and everything works fine - send my first chat message via a quick and dirty empty project from android handy (unity) to server - awesome!
However once I start the Photon Controller (from deploy/win64) it always asks me to install .NET 3.5? From what I read photon 4.x should only require .NET 4.0+ ?

So while the application itself seems to run fine, I always get this annoying "something tries to install .NET 3.5 feature" upon loading of the controller app. Any ideas, what is causing this?

Thanks,
Oliver
Viewing all 1557 articles
Browse latest View live