Quantcast
Channel: Photon Server — Photon Engine
Viewing all 1557 articles
Browse latest View live

Photon server and IPv6

$
0
0
My update build was rejected by Apple today because the reviewer can't connect to the server and it seems it's because my game / server does not support IPv6. I read the forum and it seems the newer version of Photon server / PUN+ support IPv6. My question is do I have to update the server or do I have to update the client (I'm using PUN+ v.1.51 and the LoadBalancing server as base). If possible I want to update the least number of file the possible because I heavily modified some of the Photon code (like the networkingpeer.cs in PUN+ for example).

A question unrelated to Photon: how can setup an IPv6 environment so I can test it like the guy at Apple does?

Server Side Code?

$
0
0
I'm having a little trouble understanding where I put the server-side code for Photon. All of the tutorials seem to be based around the premise that the clients do all the work and data is sent to the server and is then 'echoed' to all the other clients.

Is this correct? Is there no server-side validation of the data at all?

I'm also using PlayFab, which has server-side code, but the code isn't 'tied' to any particular game. My understanding of combining these two products is that Photon handles the local game information (IE - the actual location of the pieces and how many hit points units have etc) and passes requests to Playfab when it needs to check specific TitleData queries or broad code access.

However, it feels like Photon is literally just an echo chamber - I can't actually code on it. Which means I'm relying on my clients to handle the majority of my game logic, which does not seem like good practice. Also it makes me wonder why use Photon at all at that point, since everything is basically handled by Unity and PlayFab.

Can someone point me in the right direction? Surely there's some Photon Server Side documentation somewhere that I'm missing.

Issues With Photon and WebGL Unity

$
0
0
Hi,
I'm new here so sorry if this is the wrong place for this.

I have a built a costume photon server to run an MMO style game. The game is built in Unity. The server and project work fine when you play it in the unity editor, but when we compile it to WebGL and attempt to run it we get this error:


blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:1 Uncaught Assertion failed: 0 && "The target platform does not support Sockets", at: C:\Program Files\Unity 5.4.0b20\Editor\Data\il2cpp\libil2cpp\os\Generic\SocketImpl.cpp,50,SocketImpl at Error
at jsStackTrace (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:1:22874)
at stackTrace (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:1:23057)
at ___assert_fail (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:1:261781)
at YKn (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:22:577281)
at JIn (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:22:552497)
at XAn (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:22:417981)
at wuh (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:14:1038026)
at XAh (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:11:33162)
at Array.WAh (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:11:32946)
at Array._kk (blob:http%3A//localhost/6f801906-3dfb-4efd-a47b-7f09948339c8:9:818273)

What does this mean? Can it be fixed?
I am fairly advanced with programming and networking so please feel free to be technical.
Thanks for any help.

Problem of ipv6 support

Reliable Packets During Connection Failure

$
0
0
During a test session, a client temporarily lost connection to the game server. The connection seemed to have recovered, but the game had gone out of sync. The only way this could have happened is if packets were dropped or both clients thought they were the master for any period of time.

In the event of temporary connection failure, are reliable packets dropped?

What happens if a master client temporarily loses connection? Does the server attempt to change the master client in this case?

Server license pricing

$
0
0
Today I have noticed, that there are some changes in Photon server pricing section of your website. Now 500 CCU monthly subscription license cost is 95USD instead of 25USD. I searched your website for any announcements about price changes, but could not find anything.
For June I received a bill with old price. What should I expect for July? Will the price change affect older subscription licenses? 280% price growth is a little bit surprisingly.

When I use "sqlLoby type" on my game , my Photon server throw " Unable to load DLL 'SQLit" exception

$
0
0
I installed "v4.0.29.11263.exe Photon " on my win2012 R2 , and installed "Microsoft .NET Framework 4.5" on win server.
Now , when i run use "sqlLoby type" on my game client , server throw this error.


2016-06-09 12:28:49,378 [30] ERROR Photon.SocketServer.PeerBase - exception during handling of data.Peer:T:MasterClientPeer,ConnId:402,ip:218.45.75.23:16438, Data: F3-02-E5-00-02-D5-73-00-07-6D-79-4C-6F-62-62-79-D4-62-02,
Exception:System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': 应用程序无法启动,因为应用程序的并行配置不正确。有关详细信息,请参阅应用程序事件日志,或使用命令行 sxstrace.exe 工具。 (Exception from HRESULT: 0x800736B1)

at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)

at System.Data.SQLite.SQLite3.StaticIsInitialized() in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLite3.cs:line 1908

at System.Data.SQLite.SQLiteLog.Initialize() in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteLog.cs:line 139

at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework) in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:line 530

at Photon.LoadBalancing.MasterServer.Lobby.GameTable..ctor(Int32 columnCount, String columnPrefix) in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\Lobby\GameDataBase.cs:line 39

at Photon.LoadBalancing.MasterServer.Lobby.SqlGameList..ctor(AppLobby lobby) in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\Lobby\SqlGameList.cs:line 29

at Photon.LoadBalancing.MasterServer.Lobby.AppLobby..ctor(GameApplication application, String lobbyName, AppLobbyType lobbyType, Int32 maxPlayersDefault, TimeSpan joinTimeOut) in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\Lobby\AppLobby.cs:line 107

at Photon.LoadBalancing.MasterServer.Lobby.LobbyFactory.CreateAppLobby(String lobbyName, AppLobbyType lobbyType) in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\Lobby\LobbyFactory.cs:line 125

at Photon.LoadBalancing.MasterServer.Lobby.LobbyFactory.GetOrCreateAppLobby(String lobbyName, AppLobbyType lobbyType, AppLobby& lobby) in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\Lobby\LobbyFactory.cs:line 61

at Photon.LoadBalancing.MasterServer.MasterClientPeer.HandleJoinLobby(OperationRequest operationRequest, SendParameters sendParameters) in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\MasterServer\MasterClientPeer.cs:line 535

at Photon.SocketServer.Rpc.Peer.OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Rpc\Peer.cs:line 110

at Photon.SocketServer.PeerBase.OnReceive(Byte[] data, SendParameters sendParameters) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\PeerBase.cs:line 1243

at Photon.SocketServer.PeerBase.OnReceiveInternal(Byte[] data, SendParameters sendParameters, Int32 rtt, Int32 rttVariance, Int32 numFailures) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\PeerBase.cs:line 988

AI path finding

$
0
0
i can't find any recent tutorials for AI path finding on the server end for an online game.

there is 1 good set of tutorials from CJR Gaming but he uses a custom built recast running C# because free users, of unity, couldn't use C++.

he said this "Now that Unity5 allows even the free users to use C++ DLLs you can add in the DLL Imports to your unity code and use the original recast"

so are there any tutorials out there for setting up ai path finding using the original recast on photon?

How to upgrade license

$
0
0
I've upgrade my server from 3.x to 4.x.
Then how to upgrade my license to 4.x?

Facebook URL for Authentication?

$
0
0
Hi,

I want to configure my self hosted Photon server to enable Facebook authentication but I am am unable to figure out what facebook URL should be pasted in app.config for AuthSettings?

Any help will be appreciated,
Thanks.

How to Publish Performance Counters to New Relic?

Upgrading Photon Server from v3 to v4

$
0
0
Continue what we discuss in this thread http://forum.photonengine.com/discussion/7843/photon-server-and-ipv6

In short, I'm forced to upgrade my server code from v3 to v4 so it support IPv6. I copied my code from old server to new server, convert old function to new and clear all the build error. However I got one exception An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. whenever I run through this line MyDbEntities db = new MyDbEntities(); This line initialize my EntityFramework context. At first I thought it's my code that have problem but after open a fresh LoadBalancing example and add EF to it and call the exact same line I got the same error again. Any idea why this happen?

Game cannot connect to Photon Server hosted on Amazon EC2

$
0
0
I have a Unity project that was connecting perfectly fine via UDP when I connect to the Photon Cloud.

Since I want to host the game myself, I have created an Amazon EC2 instance, and followed all the instructions on setting up Photon Control on my server. I am using the latest version of Photon Server 4.

In Photon Control, I have set the IP address to public IP, and the IP is 52.63.89.164, and started the LoadBalancing (MyCloud) application.

In my Unity game configuration, I have set the option to 'Self Hosted', and set the IP as above, and for the port I have tried both 5055, and 5056.

But when I connect from my game, it just stays on 'Connecting...' and nothing happens. Eventually I get the following error... Failed to set ServerAddress. Can be set only when using HTTP.

The Photon Socket Server is in the list of Inbound rules (I assume this is all I need to setup, as according to the docs Photon Control sets up the firewall for me).

Is there something I am missing here?

Thanks

an issue about multy application , help pls

$
0
0
I config two application (same logic and source )(gameserver1 、 gameserver2) in different directory, but no matter connect which application (through application name), it always connect the default one, the client sdk is C++,and even though I config the applications node's attribute PassUnknownAppsToDefault is false, and set a wrong applicationname, it still connect to the default app.
in the log, there is one log is force all app ids to default "gameserver1", what does it mean?

CUDPSocketServer error

$
0
0
when close the client, the below errors occured, what's the problem?

CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: The specified network name is no longer available
CUDPSocketServer::OnError() - CDatagramSocketServerCallback::OnReadCompletionError: The specified network name is no longer available

Photon server 3.4 and WebSockets

$
0
0
Hi all,
I have an MMO that I have made with Unity and Photon Server. I originally built it to use plain old sockets, but now I wan't to run the game in WebGL. What is required to port the game to use WebSockets? Any help is appreciated and thank you.

Moved: Issue in playing over across Continents

Photon On Premise - Timeout Settings for ACK response

$
0
0
Hello there!

We are using photon on premise for a development of MMORPG which will run on mobile phones such as iPhone and Android. As I know photon will automatically disconnect peers which does not responds to pings from server
Yes, this is still the case. And honestly, I don't see a use case where this is too short.



Photon sends a "ping" to a client in short frequencies. A client acknowledges that it has received this data (it sends back an ACK). This is not necessarily related to any operations etc. - it is just a very low-level "connectivity check".



The ENET timeout specifies the max. timespan for which Photon waits for an ACK for its ping. If an ENet client is not able to send a single ACK for a whole minute (!), there is a serious network issue - i.e., the client is disconnected.



There is no need to send operations / data every minute. Your client can be "idle" for several minutes, as long as it is able to send ACKs regularly.



Does this help, or is there a use case for which you absolutely need to have larger timeouts? We are always interested in your use cases, so that we can improve Photon to match your needs - so if you can convince us that a change is useful, we are always willing to make that change. :)
I would like to set maximum retry times and / or min - max wait time before photon decides to disconnect the peer. However, for the last 3 hours, I haven't been searching but to no avail. Can someone give me some hints? :)


Exception: Socket::Bind() The requested address is not valid in its context

$
0
0
Hi guys! I got some issue with my app in Unity using Photon Server, I got multiplayer strategy for mobile, My server workes fine if i set local IP on PCs. But i'm new in server programming, so i'm not sure how should it works with mobile, if i use local ip, i got no connection, and if i use public ip there is no connection too, maybe i should set my IP in PhotonServer.xml, but if i do that i gor exeption:
Exception: Socket::Bind() 89.21.67.107:5055 The requested address is not valid in its context
also here is my client code in Unity:

using System.Collections.Generic;
using ExitGames.Client.Photon;
using RagingRealms.Common.Logs;

public interface IOperationListener
{
void OnOperationResponse(OperationResponse operationResponse);
void Update();
}

public class PhotonClient : IPhotonPeerListener
{
private const string ServerAddress = "89.21.67.107:5055";
private const string ServerApplicationName = "RagingServer";

#region Singleton
private static PhotonClient _instance;
public static PhotonClient Instance
{
get
{
if (_instance == null)
_instance = new PhotonClient();
return _instance;
}
}

private PhotonClient()
{
Status = "Disconnected";
Peer = new PhotonPeer(this, ConnectionProtocol.Udp);
Peer.Connect(ServerAddress, ServerApplicationName);
CustomTypes.RegisterCustomTypes();
Update();
Log.Debug("Start connecting...");
}
#endregion

#region Public Properties
public string Status { get; private set; }

public bool IsConnected
{
get { return Peer != null && Peer.PeerState == PeerStateValue.Connected; }
}

public PhotonPeer Peer { get; private set; }
#endregion

#region IPhotonPeerListener implementation
public void DebugReturn(DebugLevel level, string message)
{
}

public void OnEvent(EventData eventData)
{
}

public void OnOperationResponse(OperationResponse operationResponse)
{
if (_listeners.Count > 0)
{
for (int i = _listeners.Count - 1; i >= 0; i--)
{
_listeners[i].OnOperationResponse(operationResponse);
}
}
}

public void OnStatusChanged(StatusCode statusCode)
{
Log.Debug("PhotonClient status changed: " + statusCode);

Status = statusCode.ToString();

}
#endregion

#region Public Inteface
private readonly List _listeners = new List();
public void AddOperationListener(IOperationListener listener)
{
if (_listeners.Contains(listener))
return;
_listeners.Add(listener);
}

public void RemoveOperationListener(IOperationListener listener)
{
if (_listeners.Contains(listener))
_listeners.Remove(listener);
}

public void Disconnect()
{
if (Peer == null) return;
Peer.Disconnect();
}

public void Update()
{
if (Peer != null)
Peer.Service();

if (_listeners.Count > 0)
{
for (int i = _listeners.Count - 1; i >= 0; i--)
{
_listeners[i].Update();
}
}
}
#endregion
}


So any help will be good, because i didn't find any solutions or examples for mobile with using public ip
P.S. sorry about bad Eglish; :)


Upgrading Photon Server from v3 to v4 (reconnecting)

Viewing all 1557 articles
Browse latest View live