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

Plugins: Unable to load type xxx.xxx.PluginFactory from the plugin assembly

$
0
0
Hello,

I'm upgrading my server application to 4.0 server's plugin system, and getting this error starting the server:
...
2016-06-29 10:48:54,181 [1] ERROR Photon.Hive.Plugin.PluginManager - Got Exception during either loading of assembly C:\PhotonServer4\deploy\Plugins\BigBogglerPlugin\\bin\PhotonHive.BigBogglerPlugin.dll or type Xidea.BigBoggler.BigBogglerPlugin.PluginFactory.
Exception System.TypeLoadException: Impossibile caricare il tipo 'Xidea.BigBoggler.BigBogglerPlugin.PluginFactory' dall'assembly 'PhotonHive.BigBogglerPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
in System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
in System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
in Photon.Hive.Plugin.PluginManager.CreateKnownType(String typeName, Assembly asm) in d:\dev\photon-socketserver-sdk_cloud\src-server\Hive\PhotonHive\Plugin\PluginManager.cs:riga 429
in Photon.Hive.Plugin.PluginManager.SetupPluginManager(String path, String typeName, Dictionary`2 config) in d:\dev\photon-socketserver-sdk_cloud\src-server\Hive\PhotonHive\Plugin\PluginManager.cs:riga 338

The implementation is in VB.NET and figure as follows:
Namespace Xidea.BigBoggler.BigBogglerPlugin
Public Class PluginFactory
Implements IPluginFactory
Public Function Create(gameHost As IPluginHost, pluginName As String, config As Dictionary(Of String, String), ByRef errorMsg As String) As IGamePlugin Implements IPluginFactory.Create
Dim plugin = New BigBogglerPlugin

If plugin.SetupInstance(gameHost, config, errorMsg) Then
Return plugin
End If
Return Nothing
End Function
End Class
End Namespace
The config section is:
  <PluginSettings Enabled="true">
<Plugins>
<Plugin
Name="BigBogglerPlugin"
Version=""
AssemblyName="PhotonHive.BigBogglerPlugin.dll"
Type="Xidea.BigBoggler.BigBogglerPlugin.PluginFactory"
BaseUrl="http://photon-photon-pluginsdk-v1.webscript.io"
IsPersistent="true"
HasErrorInfo="true"
PathClose="GameClose"
PathCreate="GameCreate"
PathEvent="GameEvent"
PathGameProperties="GameProperties"
PathJoin="GameJoin"
PathLeave="GameLeave"
PathLoad="GameCreate" />
</Plugins>
</PluginSettings>
What do I missing? Is this issue related to VB coding?

thanks in advance,

Flavio

Create and Join rooms without client explicit request

$
0
0
We are trying to manage rooms' creation and join from photon server side without letting choose to the client for one of those operations explicitly. I know that's not the conventional way to use photon but we are doing some experiments.

In this case client asks for a room with our custom operation code. We intercept on server side the request in the ExecuteOperation of AppLobby, then we check for a matched peer in our match making system. If the matched peer doesn't exist then the current peer is saved in a waiting peers list. While if the matched peer is returned then we create the room with an ad-hoc operation request passed to the HandleCreateGame of AppLobby for a response. It usually works and the peer auto-joins the room too, changing its ClientState into Joined from client side. Then on server side we intercept the Update of the GameState in OnGameStateChanged of AppLobby and there we try to make join the matched peer.

The JoinGame response has return code 0 and it seems to work but that matched peer from client side gets the error "Create failed on GameServer. Changing back to MasterServer. ReturnCode: -2" in GameEnteredOnGameServer of LoadBalancingClient and the StringFull of the operation response results to be "OperationResponse 227: ReturnCode: -2 (Missing value 255 (JoinGameRequest.GameId)
). Parameters: {}".

So we don't understand who sent this quite strange response, because it refers to an operation code of creation (227) with operation invalid error code (-2) and a debug message which warns us about a GameId (255) missing value read from a JoinGameRequest.GameId.....what? The request was join but the operation code was creation?

What could be the issue? Or what can you suggest me to identify where this response is made and sent?

Here's some code snippets.
In ExecuteOperation of AppLobby:

...
...
...
switch (operationRequest.OperationCode)
{
case (byte)STB.Common.CommunicationCodes.STBOperationCode.JoinOrCreateRoom:
MasterClientPeer matchPeer;
if (CheckMatchMaking(peer, out matchPeer))
{
//create autojoin peer
response = this.HandleCreateGame(peer, new OperationRequest((byte)OperationCode.CreateGame, null));
string sRoomName = response[(byte)ParameterCode.GameId] as string;

dictMatchPeers.Add(sRoomName, matchPeer);
}
break;
...
...
...

In OnGameStateChanged of AppLobby:

...
...
...
protected virtual void OnGameStateChanged(GameState gameState)
{
MasterClientPeer matchPeer;
if (dictMatchPeers.TryGetValue(gameState.Id, out matchPeer))
{
//join match peer
Dictionary dictParams = new Dictionary();
dictParams.Add((byte)ParameterCode.GameId, gameState.Id);
OperationResponse matchPeerResponse = this.HandleJoinGame(matchPeer, new OperationRequest((byte)OperationCode.JoinGame, dictParams));
log.Error("AppLobby OnGameStateChanged code " + matchPeerResponse.OperationCode + " peer " + matchPeer.UserId);
matchPeer.SendOperationResponse(matchPeerResponse, new SendParameters());
}
}
...
...
...

Server Side Scripts

$
0
0
Hello all,

So I'm a little new to Photon and trying to pick everything up as I go and this question may seem remedial, but I haven't found a good answer after searching for the better part of a day.

The Situation:
We have a client that wants us to develop multiplayer into a game that he has made, they have a photon server that they would like us to use. We've been developing the game in Unity 3D.

My First Solution:
Create a web service and an RDS database (Potentially move over to a NoSQL database if needed in the future). And we would use Photon as a real-time synchronization tool, and when needed we would send information off to the web service to make the necessary updates to the database.

Clients Inquiry Solution:
Our client is wondering if we can cut down on the service calls by using the photon server connection to make the changes to the database using server side code in the application. I've been seeing some things about server side code in Photon, but I'm not sure how it's accomplished, what needs to be setup in order to do that, or anything of that nature.

So my question is, what are the pros and cons of doing the mentioned solutions. Or if you have your own solutions I would love to hear them. Also any reference material to get me started would be very much appreciated. I've been programming for a while, just haven't messed with this particular system and am still learning the ins and outs so apologize if I seem ignorant.

Thank you all for your help in advance.

CUDPSocketServer::OnError()

$
0
0
12768: 19:23:34.839 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 19:36:28.645 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
13852: 19:39:04.268 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
13852: 19:39:26.147 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
13852: 19:39:30.204 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
13852: 19:39:34.254 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 19:39:38.312 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 19:39:42.369 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
13852: 19:39:46.424 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
13852: 22:24:39.243 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 22:24:43.301 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 22:24:47.431 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 22:24:51.477 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 22:24:55.531 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。
12768: 22:24:59.588 - CUDPSocketServer::OnError() - TDatagramSocketServer::OnError() Handler Error: 没有任何服务正在远程系统上的目标网络终结点上操作。


Such mistakes happen very often,

anybody who known?

Master Server and Game Server Relation

$
0
0
Hello everyone!

We are working on an online game porject in my compnay and I am not on the server design team so I have been reading the following page to get some ideas about the photonengine and I have found a couple of things that I can not wrap my head around.
https://doc.photonengine.com/en/onpremise/current/applications/loadbalancing/application#gslb

[The basic setup did not change and is always simple: There is always 1 Master Server and 1..N Game Servers.]

When I check the photonserver.config file(I am using the SDK downloaded from the photon homepage) What I see is one master and one game server definition. So I was wondering how the creation of the multiple game servers are handled?

PhotonView Sync is Server-authoritive or client ?

$
0
0
When i sync the position of the player using photonView observe option, what happens ?

The transform option i believe to be client-authoritive wherever the client moves the player character, the server will update to that position.

What i want is the client to send a request of movement to the server ,the server then moves the object and returns the new position to compare to client local position, which will also had locally moved when the movement request was sent to the server.

ChatServer tutorial

$
0
0
Hello, i trying to make ChatServer tutorial to understand how to build server apps
But when i try to start ChatServer app it not start and in logs i see this:

12280: 21:29:53.435 - ChatServer:2 - Start() failed.
Exception:
System.TypeLoadException: Failed to create object "ChatServer" from assembly "ChatServer".
at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.Start(String assemblyName, String typeName, String instanceName, String applicationName, IPhotonApplicationSink sink, ILogToUnmanagedLog logger, IControlListeners listenerControl)
at PhotonHostRuntime.PhotonDomainManager.Start(String assemblyName, String typeName, String instanceName, String applicationName, IPhotonApplicationSink sink, ILogToUnmanagedLog logger, IControlListeners listenerControl)
12280: 21:29:53.436 - ChatServer:2 - Stop() failed.
Exception:
System.Exception: Stop: unable to call the Application.TearDown() - undefined photonControl.
at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.Stop()
at PhotonHostRuntime.PhotonDomainManager.Stop()
12280: 21:29:53.436 - ERROR: Failed to start application: "ChatServer" in app domain: 2
9972: 21:29:53.436 - CManagedHost::OnDefaultAction() - OPR_AppDomainUnload - eUnloadAppDomain
12280: 21:29:53.436 - CService::OnException() - Exception: CManagedHost::StartApplication() - Failed to start application in AppDomain: 2 - Failed to create object "ChatServer" from assembly "ChatServer".
12280: 21:29:53.436 - Server shutting down...

Could you give me a hint. Thank you!

Can't get SDK TestClient to work

$
0
0
When i run the SDK TestClient i recieve the following message in the prompt:

Starting 5 games with 3 players
[11696] Press Return to End
Connecting to 192.168.1.2:5056
[11696] Started game KURO(11696)1 with 3 clients
Connecting to 192.168.1.2:5056
OnOperationReturn: JoinGame failed: ReturnCode: 32758 (Game does not exists). Disconnecting...

All that i did was:

Donwload the SDK Photon-OnPremise-Server-SDK_v4-0-29-11263.
Set up the license.
Start the SDK.
Set server IP as local
Start LoadBalancing server.
Run TestClient

deploying Photon on EC2 or a cloud virtual machine

$
0
0
Hi folks, I just spent about 4 hrs (wasted!) trying to deploy my photon server on Amazon EC2. I finally got it working and the server running and could not connect to it from my client. I ensured that the firewall settings were correct, even turned off the firewall and no dice.
Dabled with Windows Azure (using regular photon server not the azure version) and it wouldn't run.
I wanted to try CloudSigma but there's a backlog for the 7day trial

Anyone managed to deploy Photon successfully? I've deployed different servers before with half the issues I'm running into now. Any help is appreciated!! :geek:

Photon Server Setup and Tutorial

$
0
0
Hi,

I have previously used photon unity networking cloud to create a real time multiplayer game. I used photon cloud for that. Now, I am thinking of creating another game similar to agar.io.

Now for that I know I need a server which is online and can manage clients on multiple rooms with bots. I want all calculations of the movement for each client (which will be using Unity) should be done on the server side so that everything is synced. I was thinking of using photon server and was hoping to run the server on the machine and i will be able write the code to manage my requirements but I cannot seem to find the example of server side code and setup. Can anyone help me in this regard.

debug

$
0
0
Photon server run on my computer,if something wrong,he can tell me which line code is wrong,i can solve problem soon.But when i setup on server computer, the setting is the same,why just tell me which function is wrong ,i don't know which line is wrong in this function,how can i do to let he tell me the exact wrong line?

photon server RPC to client

$
0
0

Hi.

I'm currently using photon cloud. And trying to use photon server for load balancing. How can i RPC to client??

in client's script, i can do

[PunRPC]
public void OnStartGame()
{
PhotonNetwork.room.open = false;
PhotonNetwork.LoadLevel("Main");
}
public void StartGame()
{
if (PhotonNetwork.room.playerCount >= 2)
{
photonView.RPC("OnStartGame", PhotonTargets.All);
}
}
this

but what about in server's script.... how can i do "photonView.RPC("OnStartGame", PhotonTargets.All);" this thing???

Connecting to server via the public-facing IP address that is NAT'ed through to my new server

$
0
0
I'm setting up a new server for a new app in Azure, and trying to get LoadBalancing working out of the box. The issue I'm facing is that the local stardust test client (from the console) works, but remote clients do not connect. Here's what I've done:
1) Disable Windows firewall, and set the Azure Network Security Group firewall to nearly wide open
2) Fired up the server
3) Local connections work, remote do not.

Because Azure NAT's through traffic from the public-facing IP to the private virtual server network, I interpreted a number of threads as saying that I should configure the external IP into PhotonServer.config. This caused the server to fail on startup with the following message, just as it did for the individual below: "The requested address is not valid in its context."
http://forum.photonengine.com/discussion/139/server-behind-nat

To confirm I'm not having a networking issue, I've installed Wireshark, and confirmed that my test client data is making it into the server. In UDP it enters the server, but does not get responded to, and with TCP, it's received by the server, retransmitted, and still not responded to. This is with the server assuredly running, and the local stardust client working as well, verified in the window, and in the published perfmon counters. This is also with a bare download of Photon Server, nothing fancy added.

Any suggestions for next steps?

How use TestPlugins Source

$
0
0
Hello everyone!

I'm having trouble understanding the proper way to load a plugin on "create a room".

I'm following the official manual for creating plugins, and I have also accompanied the sources files included in the PhotonServer sdk folder. But I am unable to load any plugin when I put your name in the room settings.

I get the following error:
Plugin Mismatch requested = 'BasicTestsPlugin' got = 'Webhooks'


On My Unity Client:
                    
RoomOptions opt = new RoomOptions();
opt.maxPlayers = 10;
opt.isOpen = true;
opt.isVisible = true;
opt.plugins = new string[] { "BasicTestsPlugin" }; //Plugin of the TestPlugins source
PhotonNetwork.JoinOrCreateRoom("RoomTest" , opt, TypedLobby.Default);
On My Application Config:
      
<PluginSettings Enabled="true">
<Plugins>
<Plugin
Name="TestPlugins"
AssemblyName="TestPlugins.dll"
Version=""
Type="TestPlugins.PluginFactory"
/>

</Plugins>
</PluginSettings>

SYNC'in entities in a room and correlation between "messages/sec" and "events/sec"

$
0
0
Hello everyone!

I would like to ask about the following situation:
1) I have one room and this room has 10 monsters and 10 users.
2) This room updates every 100ms. One update means update means updating the positions of the monsters (users are assumed to be NOT moving)
3) At the end of each update, I would like to send the current room's situation to the each user(peer). Current room situation means x(integer) and y(integer) coordinates of each monster to keep it simple.

I have defined the following Event DataContract=>

public class MonsterPositionEvent : DataContract
{
[DataMember(Code = (byte)1]
public int x { get; set; }

[DataMember(Code = (byte)2]
public int y { get; set; }

}

4) At the end of each update inside a Game object, I create
foreach(var monster in MonsterList){
var monsterEvent = new MonsterPositionEvent{x = Position X of Monster 1, y= Position Y of Monster 1};
var eventData = new EventData((byte)EventCode.MonsterPosition, monsterEvent);
this.ExectionFiber.Enqueue(()=>PublishEvent(eventData,actors,new SendParameters()));
///Enqueue one event per monster to each client, at the end I have 10 users with 10 events enqueued I think
}
5) Enqueue one event per monster to each client, at the end I have 10 users with 10 events enqueued I think.
6) When the events are dispatched to clients, does it count as 100 messages or since each event is quite small(overhead included ~60byte times 10 events 600bytes) they are sent as 1 message per client (10 messages in total)?
7) What are other good ways to sync room entitites to each client?

Thanks in advance

Getting response error!!

$
0
0
Hy everyone,
i am new to photon and i don't know completely how it operates still learning. i am having a problem, when ever i try to use login or register on my local server it just won't let me go in to the game or let me register as new user. the error is once i pressed signIN ....... and in my server i am getting DEngine.PhotonFX.Common.PhotonApplication [(null)] - There is an error in XML document (0, 0). this ....... as well as in sign in i am gettin.....

ResponseReceived, OperationCode = SignIn, ReturnCode = InvalidParams, DebugMsg =
UnityEngine.Debug:Log(Object)
LoginController:OnResponse(OperationResponse) (at Assets/Scripts/Network/Controller/LoginController.cs:78)
DEngine.Unity.Photon.PhotonManager:OnOperationResponse(OperationResponse)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[]) (at c:/Dev/photon-sdk-dotnet/PhotonDotNet/PeerBase.cs:676)
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands() (at c:/Dev/photon-sdk-dotnet/PhotonDotNet/TPeer.cs:337)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at c:/Dev/photon-sdk-dotnet/PhotonDotNet/PhotonPeer.cs:1118)
ExitGames.Client.Photon.PhotonPeer:Service() (at c:/Dev/photon-sdk-dotnet/PhotonDotNet/PhotonPeer.cs:1031)
DEngine.Unity.Photon.Connected:OnUpdate()
DEngine.Unity.Photon.PhotonManager:Update()

Server-SDK_v4-0-29-11263, PUN, WebGL = connection is not established.

$
0
0
Can not join webgl-client.

Exiting receive thread due to error: An exception has occurred while connecting. / System.Net.Sockets.SocketException: The connection is not established, since target computer rejected the connection request.


What am I doing wrong?

ERROR: Wrong license type - don't expect redist license. Going to shutdown.

$
0
0
Hello, I was using the 100 Server free license. I've been using it for a long time, and today I was making a maintenance in the server and suddenly i got this error after I restarted the server.

ERROR: Wrong license type - don't expect redist license. Going to shutdown.

Continuous Delivery / DevOps survey

$
0
0
I've got a sneaker net tool chain set up, and want to move away from it ASAP! How is everyone avoiding manual compilation and release?

need help under Construc2

$
0
0
hi

i try to use photon on construct 2 and i have a problem

i was looking at the Demo-test and i try to past the event in a new projet
but i have a problem

when i try to connect to log in, logout and re log in in a room with a other pseudo the server keep my old pseudo

bonjours

j' ai un petit probleme avec photon sous construct 2

j'ai fait un programme pour essayer de comprendre Photon, en m'aidant de Demo-test

et mon probleme viens du fait que si je me log , delog et tente de me relog avec un nouveau pseudo le serveur garde mon ancien pseudo

je ne suis pas programmeur, juste un casual mais jaimerais vraiment reussir a faire un jeu pvp

i would like to thank you for reading and sorry english is not my native

Viewing all 1557 articles
Browse latest View live