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

react native framework

$
0
0
I would like to use Photon Server in the react native framework , what should I do now?

I used html5 sdk,can not import normally:(

i cant start photon server.

$
0
0
hi all;

i am new to photon. i am sory if its a easy problem. my problem is shared below a screenshoot. i am trying to start photon server as shown on the tutorial. i registered licance file and started LoadBalancing as application. when i hit Run Test Client option its stuck. when i try to connect via unity its not connect to my hosted server. what could be the problem ?. thnx for advice and answers..



ipv6 problem with old version

$
0
0
I currently use Photon SDK version v3.4.31.10808 and my application got reject from the app store it is possible to do anything or I need to change my server to 4?

Unexpected msgtype 8

$
0
0
I am working on my own version of mmo server.

I got the operation request and response communication working between client and server e.g. for a operation to enter the game world.

Now I am struggling with a simple Peer.SendMessage method. On the Unityclient side I receive the message but cannot read it. I get the following error:

ERROR: unexpected msgType 8
UnityEngine.Debug:Log(Object)
JYW.ThesisMMO.UnityClient.Assets.Scripts.Networking.ServerPeerListener:DebugReturn(DebugLevel, String) (at Assets/Scripts/Networking/ServerPeerListener.cs:15)
ExitGames.Client.Photon.<>c__DisplayClass2:b__0()
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:Service()
JYW.ThesisMMO.UnityClient.Assets.Scripts.Networking.Game:Update() (at Assets/Scripts/Networking/Game.cs:37)


What is msgType 8? I haven't found anything in the api docs.


I send the message after a client entered the game world. I send a message to all other clients which are already in the game world like this:

Server code:

Code from the game world:
        private Channel<Message> m_MessageChannel = new Channel<Message>();
        internal void AddEntity(PlayerEntity entity) {
            log.DebugFormat("Adding entity with name: " + entity.Username);
            m_Entities[entity.Username] = entity;

            var newPlayerEvent = new NewPlayerEvent();
            newPlayerEvent.Username = entity.Username;
            newPlayerEvent.Position = entity.Position;
            IEventData eventData = new EventData((byte)EventCode.NewPlayer, newPlayerEvent);
            var sendParameters = new SendParameters { Unreliable = false, ChannelId = 0 };
            var message = new Message(eventData, sendParameters);
            m_MessageChannel.Publish(message);
        }
Peer's op handler:
(SendMessage is subscribed to m_MessageChannel of the game world.)
        private void SendMessage(Message message) {
            m_Peer.SendMessage(message.eventData, message.sendParameters);
        }
The message struct for IChannel:
namespace JYW.ThesisMMO.MMOServer {
    using Photon.SocketServer;
    internal struct Message {
        internal Message(IEventData eventData, SendParameters sendParameters) {
            this.eventData = eventData;
            this.sendParameters = sendParameters;
        }
        internal IEventData eventData;
        internal SendParameters sendParameters;
    }
}
The data contract:
namespace JYW.ThesisMMO.MMOServer.Events {
    using Common.Codes;
    using Common.Types;
    using Photon.SocketServer.Rpc;

    class NewPlayerEvent {
        [DataMember(Code = (byte)ParameterCode.Username)]
        public string Username;

        [DataMember(Code = (byte)ParameterCode.Position)]
        public Vector Position;
    }
}


Use of later versions of .net in a photon plugin?

$
0
0
Hello, gentle photon forum readers.

I was hoping someone might provide me the answer to this question. I'm writing an authoritative server plugin that will eventually be hosted on the photon servers. The webhooks 1.2 code comes set up using .Net 4.0. I was wondering if it was possible to use say .Net 4.5. Specifically I was hoping to use the fast vector code that comes in later versions of .Net in the System.Numerics libraries. Any chance that can work? Or do I need my own vector librairies?

Thanks for any tips!
Curt

Run multiple game on one Photon server on one single machine

$
0
0
I would like to know that is there any way to run multiple game on one Photon server on one single machine. I didn't find any way to do so. I have tried by doing different UDP port but photo didn't allow to run multiple instance on one PC. so please tell me how i can achieve this functionality.

If you have any reference URL pls give me

thanks in advance

Using Database with Photon

$
0
0
Hi guys,
I downloaded the free version of Photon and the local server too but i don"t find any way to use a Data base with it( sql, no sql, sqlite or any other) Do you know what is the best way to do it? Or maybe an other way provided by Photon to store login and other informations about user accounts in server side?

Thanks for help guys

Working with plugins

$
0
0
Hello again guys :)
I'm actually trying to understand how to use plugins for make a server side logic, but i'm not sure about how it work,
do you have some exemples so i can try to understand..

My game is room based game (with 4 client per room) and I don"t want the client to have the possibility to create rooms. I want everything to be managed by the server.

where can i find some exemples?

Thanks guys :)

Amazon GameLift

$
0
0
Has anyone here done any experimentation with Amazon's new service GameLift? I'm curious if this could be used together with Photon in a good way. Possibly removing the need of a master server? Just use the GameLift SDK to request a game session and connect straight to a game server, or have the GameLift service work as a matchmaker/game browser?

Nickname is empty in server

$
0
0
Hi
Has anyone encountered empty nickname(s) when checking in server?
I am trying to ascertain if this is an already known issue?
Thanks

Extending MmoDemo for MMO style game

$
0
0
Hello guys. I have been using Photon Cloud for quite a while now and am very much satisfied with it. Now, we are planning to develop MMO game for that I researched and found Photon Server. I have done work only on client side so server side programming is new to me. I found a mmo demo in Photon Server. I have few questions related to it.
1. Is it enough for me or do I need to extend it?
2 Do I need to write a server from scratch according to my requirements?
3. Is there any tutorial available how to write server for MMO game?

Thanks in advance.

Show status of my self-hosted server on Web

$
0
0
Hello photon community,

I have a simple question (i hope so). I am running my own custom server application, derived from LoadBalancing example. I would like to show status of this server on my website. What is the best way to approach this from the html/php perspective ? How can I query the photon server from html/php ?

Photon SDK Server instantly turns off

$
0
0
I used thi tutorial Starting Photon in 5 Minutes Photon SDK Server for setup. But unfortunately after LoadBalancing (MyCloud) -> "Start as Application it instantly turns off. Please advise how to solve this problem

Thanks in advance

Persistent User Info from Master to Game Server

$
0
0
Hi,

I have been using Photon for a few years now and am just now upgrading to Photon 4. Currently I am working with the loadbalancing project.

I've integrated a database with my game where users can login. What I want to do is, when a user logs in and creates/joins a room, to keep the users' details persistent across from the Master server to the Game server.

Is there a built in way to do this? Currently I am just in need of an account name which I save on the client on login which I sent to the game server on authentication. However, in future I may want to send more details and it seems advantageous to somehow save the data on the Master server while the client is there, and simply transfer any user details to the Game server when the user transitions.


Thanks in advance!

PhotonRunning() failed Exception: photon.CounterPublisher.SystemCounter Photon 4

$
0
0
I have tried the steps in this forum post to no avail:

http://forum.photonengine.com/discussion/1741/loadbalancing-start-problem

I can't run Photon 4, but can run Photon 3 on my development machine and my server which are both windows 7. I can run the same download on a brand new win 10 box.

I can't find any corrupted performance counters manually in the registry.

Can I just run Photon 4 without performance counters?

Photon 3 server runs fine, photon 4 server does not.

Collection of CustomType (Serialization)

$
0
0
I was able to setup a CustomType for serialization but I've got some fairly lengthy nested classes to send when an item is initialized and at the very least, a collection of customtype would be handy. The Serialization Documentation indicated that for Array "T-type can be any of the types listed in this table except byte." ... which surely rules out custom types. ..but for Dictionary "K-type can be any of the types listed in this table." with no limit spec'd on Object. I figured I'd give it a shot.

It didn't work for me. I got two different dictionary related exceptions depending on whether the key was a string or int/byte

I thought I would ask if I did something wrong or if this is not supported.


Exceptions:
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,ExitGames.Client.Photon.CustomType].Add (System.String key, ExitGames.Client.Photon.CustomType value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
System.Collections.Generic.Dictionary`2[System.String,ExitGames.Client.Photon.CustomType].System.Collections.IDictionary.Add (System.Object key, System.Object value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:671)
ExitGames.Client.Photon.Protocol.DeserializeDictionary (System.IO.MemoryStream din) (at h:/svncontent/photon-sdk-dotnet/PhotonDotNet/Protocol.cs:1812)


ArgumentException: not of type: ExitGames.Client.Photon.CustomType
Parameter name: value
System.Collections.Generic.Dictionary`2[System.Int32,ExitGames.Client.Photon.CustomType].ToTValue (System.Object value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:542)
System.Collections.Generic.Dictionary`2[System.Int32,ExitGames.Client.Photon.CustomType].System.Collections.IDictionary.Add (System.Object key, System.Object value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:164)
ExitGames.Client.Photon.Protocol.DeserializeDictionary (System.IO.MemoryStream din) (at h:/svncontent/photon-sdk-dotnet/PhotonDotNet/Protocol.cs:1812)

Moved: Collection of CustomType (Serialization)

Server disconnect timeout

$
0
0
Hello. I have android game with photon. Android games is not working in background (android specific)
When i hide(minimize) the game, after 10 seconds i have on server:

OnDisconnect - ConnID=52 reasonCode=ClientDisconnect
Connection state changed from Connected to Disconnected
OnDisconnect: conId=109.195.243.29, reason=ClientDisconnect, reasonDetail=
IUMobilePeer: User disconnected
Connection state changed from Disconnected to Disposed


On client (when i open the game (maximize)):

PhotonDebugReturn: Receiving failed. SocketException: WouldBlock
Status code:InternalReceiveException
Status code:Disconnect


How can i increase timeout?

Moved: Server disconnect timeout

Photon Server Secure Web Socket Problem

$
0
0
I'm trying to setup my server for wss connections. The server is a custom application built on photon sdk, not derived from one of the sample projects.

I've followed the guide at https://doc.photonengine.com/en-us/onpremise/current/operations/websockets-ssl-setup .

Right now, non-secure websocket connections are working, and secure web socket connections with a self-signed certificate are working as well. However, when I tried to use my actual ssl certificate, the server logs the following errors:

14864: 15:14:31.189 - Failed to locate certificate "*companyname.com" in store "MY"
14864: 15:14:31.189 - CService::OnException() - Exception: CreateCredentials() - No certificate available
14864: 15:14:31.189 - Server shutting down...

My photonserver.config file contains the settings for web socket listener like this:

WebSocketListener
IPAddress="0.0.0.0"
Port="9090"
DisableNagle="true"
InactivityTimeout="10000"
OverrideApplication="mygameserver"
Secure = "true"
StoreName = "MY"
CertificateName = "*companyname.com"
UseMachineStore = "true">

I have tried setting UseMachineStore to false, leaving StoreName field as "default" or writing "Personal" there, it made no difference.

I have tried running the server on 2 machines. First one was a virtual machine hosted on Azure. In case I somehow messed up setting up the ssl on the VM, I tried a second machine, which is the server machine we're using for our backend etc. so I know that the ssl on the second one is setup properly.

Kinda out of ideas right now. I need wss, there is no alternative.

Viewing all 1557 articles
Browse latest View live