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

Failed to join room using Unity Client SDK

$
0
0
I replied to this thread: http://forum.photonengine.com/discussion/1059/photon-server-join-create-game-problem

My reply: http://forum.photonengine.com/discussion/comment/31499/#Comment_31499

But I think it might be good to post in here as well as it related to self-hosted servers (that and the thread is quite old).

Basically the issue is that calling PhotonNetwork.JoinRoom from the client results in a disconnect error. It was suggested to edit the Photon.LoadBalancing.dll.config file but this hasn't fixed it for me.
I'm guessing this is not yet automated? I got this error as well.
I tried to change the Pahoton.LoadBalancing.dll.config but did not work:



(Fields in red are my public IP, and not the default "127.0.0.1")


How can I derive from PhotonPeer to create my own implementation of a Peer?

$
0
0
I would like to do so to add new operations.

I have made a simple Peer class:
public class MyPeer : PhotonPeer
{
public MyPeer(ConnectionProtocol protocolType) : base(protocolType) {}
public MyPeer(IPhotonPeerListener listener, ConnectionProtocol protocolType) : base(listener, protocolType) {}

public bool OpExecuteAction(string param)
{
var dic = new Dictionary<byte, object>
{
{1, param},
};
return OpCustom(100, dic, true);
}
}
And this is how I am using it:
 _myPeer = new MyPeer(this, PhotonNetwork.PhotonServerSettings.Protocol);
_myPeer.Connect("myPublicIp:Port#", null);
But my Peer is always in Connecting state so I am unable to call the OpExecuteAction method.

Photon Server Stopped and never Continue

$
0
0
I download the Photon Server yet it never initialized. It always stop!

s2s TCP Receive delay

$
0
0
I find that it has a big delay when receiving a large message.(The each message is small.)
Is that relating to the photonserver.config?
Here is my photonserver.config:
<GameServerGroup
MaxMessageSize="512000"
MaxQueuedDataPerPeer="512000"
PerPeerMaxReliableDataInTransit="51200"
PerPeerTransmitRateLimitKBSec="256"
PerPeerTransmitRatePeriodMilliseconds="200"
MinimumTimeout="5000"
MaximumTimeout="30000"
DisplayName="GameServerGroup">
<TCPListeners>
<!-- TCP listener for Game clients on Master application -->
<TCPListener
IPAddress="0.0.0.0"
Port="4530"
OverrideApplication="DataServer"
PolicyFile="Policy\assets\socket-policy.xml"
InactivityTimeout="10000">
</TCPListener>
<TCPListener
IPAddress="0.0.0.0"
Port="4531"
OverrideApplication="LoginServer"
PolicyFile="Policy\assets\socket-policy.xml"
InactivityTimeout="10000">
</TCPListener>
</TCPListeners>
How can I resolve it?

Thanks!

Pricing Question

$
0
0
The plans in photon server pricing include the sentence Per App / Server.
Does that mean that if I want to have 3 servers for one game(or app) I have to pay 3 times the plan?

Example: I want to have 3 servers for one game, I expect to have 500 CUU (between the 3 servers). That example costs 95$/m or 285$/m?

Thanks

Getting Started

$
0
0
Hey I'm just getting started with Photon Server. Anyway I can see the requests?

Start and Debug LiteApplication

$
0
0
Hello,

at the moment I'm trying to build an unity application which connects to my own photon server app.
For debugging purposes I went through the whole forum to find some working solutions.

Well... I took the "Lite"-solution, added the "PhotonSocketServer" to this solution, set it as start project, made some changes in the "PhotonServer.config" and set "/debug MyServer" as start arguments for the PhotonSocketServer-"project".

Now I can start to debug my project. In Unity I'm able to connect to my own server and I'm also able to join a room
("OnConnectedToMaster" and "OnJoinedRoom" will be triggered).
When I will stop the debugging, I couldn't connect to the server anymore. Fine.

Ok, the debugging process:
To figure out some stuff, I just want to set breakpoints in specific classes / functions.

The "Setup"-function in "MyApplication.cs" will be triggered some seconds after starting the project and the debugger stops at this breakpoint (as expected).
But the "CreatePeer"-function wouldn't be triggered. I think it should be, when I will connect to the server (or join a room?!).

I have no idea what I'm missing...

Thanks in advance
Daniel

Btw. this is my server config:

...
<Configuration>
...
<!-- MyServer -->
<MyServer
MaxMessageSize="512000"
MaxQueuedDataPerPeer="512000"
PerPeerMaxReliableDataInTransit="51200"
PerPeerTransmitRateLimitKBSec="256"
PerPeerTransmitRatePeriodMilliseconds="200"
MinimumTimeout="5000"
MaximumTimeout="30000"
DisplayName="MyServer">

<!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->
<!-- Port 5055 is Photon's default for UDP connections. -->
<UDPListeners>
<UDPListener
IPAddress="0.0.0.0"
Port="5055"
OverrideApplication="Master">
</UDPListener>
<UDPListener
IPAddress="0.0.0.0"
Port="5056"
OverrideApplication="Game">
</UDPListener>

</UDPListeners>

<!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->
<TCPListeners>
<!-- TCP listener for Game clients on Master application -->
<TCPListener
IPAddress="0.0.0.0"
Port="4530"
OverrideApplication="Master"
PolicyFile="Policy\assets\socket-policy.xml"
InactivityTimeout="10000"
>
</TCPListener>

<TCPListener
IPAddress="0.0.0.0"
Port="4531"
OverrideApplication="Game"
PolicyFile="Policy\assets\socket-policy.xml"
InactivityTimeout="10000">
</TCPListener>

<!-- DON'T EDIT THIS. TCP listener for GameServers on Master application -->
<TCPListener
IPAddress="0.0.0.0"
Port="4520">
</TCPListener>
</TCPListeners>

<!-- Policy request listener for Unity and Flash (port 843) and Silverlight (port 943) -->
<PolicyFileListeners>
<!-- multiple Listeners allowed for different ports -->
<PolicyFileListener
IPAddress="0.0.0.0"
Port="843"
PolicyFile="Policy\assets\socket-policy.xml">
</PolicyFileListener>
<PolicyFileListener
IPAddress="0.0.0.0"
Port="943"
PolicyFile="Policy\assets\socket-policy-silverlight.xml">
</PolicyFileListener>
</PolicyFileListeners>


<!-- WebSocket (and Flash-Fallback) compatible listener -->
<WebSocketListeners>
<WebSocketListener
IPAddress="0.0.0.0"
Port="9090"
DisableNagle="true"
InactivityTimeout="10000"
OverrideApplication="Master">
</WebSocketListener>

<WebSocketListener
IPAddress="0.0.0.0"
Port="9091"
DisableNagle="true"
InactivityTimeout="10000"
OverrideApplication="Game">
</WebSocketListener>

</WebSocketListeners>

<!-- Defines the Photon Runtime Assembly to use. -->
<Runtime
Assembly="PhotonHostRuntime, Culture=neutral"
Type="PhotonHostRuntime.PhotonDomainManager"
UnhandledExceptionPolicy="Ignore">
</Runtime>

<!-- Defines which applications are loaded on start and which of them is used by default. Make sure the default application is defined. -->
<!-- Application-folders must be located in the same folder as the bin_win32 folders. The BaseDirectory must include a "bin" folder. -->
<Applications Default="MyApplication">
<Application
Name="Master"
BaseDirectory="LoadBalancing\Master"
Assembly="Photon.LoadBalancing"
Type="Photon.LoadBalancing.MasterServer.MasterApplication"
ForceAutoRestart="true"
WatchFiles="dll;config"
ExcludeFiles="log4net.config"
>
</Application>
<Application
Name="Game"
BaseDirectory="LoadBalancing\GameServer"
Assembly="Photon.LoadBalancing"
Type="Photon.LoadBalancing.GameServer.GameApplication"
ForceAutoRestart="true"
WatchFiles="dll;config"
ExcludeFiles="log4net.config">
</Application>

<!-- CounterPublisher Application -->
<Application
Name="CounterPublisher"
BaseDirectory="CounterPublisher"
Assembly="CounterPublisher"
Type="Photon.CounterPublisher.Application"
ForceAutoRestart="true"
WatchFiles="dll;config"
ExcludeFiles="log4net.config">
</Application>

<Application
Name="MyApplication"
BaseDirectory="MyApplication"
Assembly="MyApplication"
Type="MyApplication.MyApplication"
ForceAutoRestart="true"
WatchFiles="dll;config"
ExcludeFiles="log4net.config">
</Application>

</Applications>
</MyServer>
</Configuration>

ERROR: Wrong license type - expected redist license

$
0
0
Hi I am using redistributable server. I got a lisense for 100CCU free in my dashboard. I have put the lisense in bin_Win32 folder, and trying to start the photon server. But the server stops automatically after starting. I have checked the log, found the following message:
ERROR PhotonHostRuntime.PhotonLicensing - ERROR: Wrong license type - expected redist license. Going to shutdown.

I could not find any redist lisense. Can anyone please help me regarding this?

how many is online ?!!

$
0
0
hi i am using photon server and i want to know how many are online on server? how can i do that in windows 2012
tnx

Threading and operations in a custom server solution

$
0
0
I have looked at many examples of photon usage and from what I can tell the 2 main ways that people structure their project is they run with a plugin, peer to peer and use raise event to send events to all the clients, or they run an application(like the mmorpg example) and they can have operations that get sent to the server.

I am trying to do something in the middle. My game is server controlled entirely and I want the clients to send messages to the plugin and I don't want those messages to go to the other clients. All the examples I have seen are using the Peer\operation code which doesn't seem to fit the design structure of a plugin which uses the plugin class and has overides like OnRaiseEvent.

I see that I could potentially use groups or something to try to have nobody but the server see a message, but it feels like this is not the right approach to use the client broadcasting of events just to talk to my plugin code.

The 2nd question here is I want the game to run itself and not be event driven. In my plugin create room code I could create a plain C# thread to run the game logic, but if i have a few thousand games running thats a few thousand threads. Is this the desired approach for that?

Finally I cannot find any premium support or contact info to be able to discuss things with photon directly, even if it costs money. Do they have any sort of way to get official feedback, as I would really like a way to present my plans to an expert in photon and ask, is this really the way I should be doing this.

Thanks!

How to make Personal Chat within a room?

$
0
0
Hi,
I am using photon plugin for enterprise server, and Javascript in client side. My players are able to join a room and chat with all others in that room. Now I want to make a option for personal chat also within the room. This means after joining a room, player can send personal message to any member of that room. Is this possible in Photon? If possible How can I Achieve this?

How to make Personal Chat within a room?

$
0
0
Hi,
I am using photon plugin for enterprise server, and Javascript in client side. My players are able to join a room and chat with all others in that room. Now I want to make a option for personal chat also within the room. This means after joining a room, player can send personal message to any member of that room. Is this possible in Photon? If possible How can I Achieve this?

Photon - LoadBalancing - Create room serverside

$
0
0
Hi,
I'm trying to use the LoadBalancing demo as base for a game idea I have, I have followed tons of tutorials, and found an old thread about it here too: http://forum.photonengine.com/discussion/1414/create-rooms-server-side

However, Now that i've come thus far as to create the room on the mater server (check), it never gets created on the gameserver and i can't for the life of me figure out why.

game.HasBeenCreatedOnGameServe remains forever false, altho game.GameServer is set for all intents and purposes.

How do i force the game to get created on the gameserver?

(No, I don't for any reason whatsoever want to use the built in client-side calls for creating rooms
or lobbies on this project. this is not a "matchmaking" game or alike).

MMO Examples / Demos?

$
0
0
Just curious if there is an MMO example and /or demo for photon server package? Any insight on this would be greatly appreciated.

Thanks,
Sambuka

How can I raise an event from the GameServer or send a message to a specific client?

$
0
0
How can I raise an event from the server-side code so that all players in the room receive it?
How can I send a message to a specific client?

Cannot Start or Remove Service after re-installing Photon

$
0
0
I deleted Photon and re-installed it in a new place but now, whenever I try to start a service or remove it, it looks like it's trying to get it from the old path of the previous Photon installation.

Photon Enterprise Cloud adding a new plugin documentation reference - section not found

$
0
0
Photon Enterprise Cloud adding a new plugin..where is the section?

I wondered why from documents i can see the following steps but never find out a way to perform them...

To add a new plugin:
1. Go to the dashboard of one of the supported Photon product types.
2. Go to the management page of one of the Photon applications listed there.
3. Click on the "Create a new Plugin" button on bottom of the page.

..not sure, if I'm doing it alright but is that section no longer with the dashboard?

How could set up it as following doc says in such case?

Thanks in advance!

Moving the game avatar around

$
0
0
I have a setup where the game avatar is just a camera with the interest area in front of it to look from a top down at the world. I have code that moves the camera in relation to dragging (via mouse) on the screen, this works but of course just moving the transform around does not let the server know where you have moved. So i tried game.avatar.MoveAbsolute and this is not working out at all.

I currently have both moveabsolute happening and transform moving. I dont feel this is the right approach any advice would be great.


public float dragSpeed = 2;
private Vector3 dragOrigin;
private Game game;
private RunBehaviour runBehaviour;

void Start()
{
runBehaviour = GameObject.Find("Scripts").GetComponent<RunBehaviour>();
game = runBehaviour.Game;
}

void Update()
{

if (Input.GetMouseButtonDown(0))
{
dragOrigin = Input.mousePosition;
return;
}

if (!Input.GetMouseButton(0)) return;

Vector3 pos = Camera.main.ScreenToViewportPoint(Input.mousePosition - dragOrigin);

Vector move = new Vector(pos.x * dragSpeed, pos.y * dragSpeed);
Vector3 move3 = new Vector3(pos.x * dragSpeed, 0, pos.y * dragSpeed);

game.Avatar.MoveAbsolute(move, game.Avatar.Rotation);

//Vector3 move = new Vector3(pos.x * dragSpeed, 0, pos.y * dragSpeed);

transform.Translate(move3, Space.World);

Moved: Moving the game avatar around

How to create bot in Photon Server SDK without using masterclient

$
0
0
Hello, excuse me.
Where should i start to implement this? there is no documentation of this. I have a poker game that needed a bot system.
Im currently using master client system and some friends said its not good for security. So i want to make a full authoritative bot that controlled by photon server, Not by master client.
Please help, at least can you show me the right way and where should i start in SDK?

By the way im using unity with this
Viewing all 1557 articles
Browse latest View live