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

Sending private information from photon server

$
0
0
Hi,

I apologise if this is covered elsewhere, but I'm stumped and the documentation is confusing me more and more. If there's a definitive answer, then please just link there and I'll be happy :). I also apologise if this is in the wrong place - as you will see below, we don't even know which product we need.

We are trying to build a simple networked game - message traffic will be small and while latency is important, it's not game-breaking. We've been using RabbitMQ up until now, but while our system has simple needs, we'd like to be able to handle many things in ways that seem to be common elements of games - authentication, encryption, reconnection etc.

The actual functionality of our game is trivial by comparison to all of the other stuff that goes on around it. So we're looking at something like Photon. We are experienced C# developers, but networking noobs.

1) Our game is an authoritative server game that runs like an auction. Users place bids in real time, we tell them if their bid was successful, and update them on their state - how many things they own, how much cash they have left, how much the new price is, that sort of thing

2) Some information we send to the clients (cash remaining, number of things owned) is private. Other information is publicly broadcast from the server.

3) All information the clients send to us is private (bids etc)

4) Accessing other players' private information can't happen. Seriously, this is a deal-breaker.

5) Clients don't need to talk to each other directly

6) If we hit the jackpot then we will need to be able to scale up to lots of concurrent users (a few thousand if we're lucky)


You'll note that mention of things like bounding boxes and models are conspicuously absent. We'll probably use a game engine to define the interface, but it won't be complicated at all. Seriously, we're sending through a few integers and doubles. Maybe some decimals.

The only way that I can think of to be certain of preventing players from accessing information intended for other players is to make sure that private information is only sent to the intended recipient - even relying on encryption worries me, unless it comes as standard within photon. I was always taught that if you're doing your own encryption, you're doing it wrong :smile:

My confused reading of the documents seems to suggest we need to write a very simple MMO server, but I have no idea how the MMO server limits who receives what information.

So the questions I have are:

A Can photon do what I'm asking (I'm sure the answer is yes, but better to ask now :smile:)

B For this kind of operation (authorative server dealing with clients independently) what solution (Cloud, OnPremise, Other?) should we be looking at?

C Possibly obvious depending on the answer above, but do we need to build a back-end for this? Or do we build a master-client that talks to everyone else in the room?

D Is there an example in any of the SDKs about how to pass restricted information around? Do we just do it all via private messaging?


Sorry for the length, but I wanted to be clear. Also if this stuff is basic, but I really couldn't find any clear answers discussing it. Any help is greatly appreciated.

Thanks for your time in reading this far!

Plugin: How modify the properties of a room to be created?

$
0
0
In my plugin, I need to change some properties of rooms in his creation.
I'm making the changes I need, but these changes are not visible on the client. Look!



public override void OnCreateGame(ICreateGameCallInfo info)
{
SerializableGameState gameState = new SerializableGameState();
gameState.IsOpen = false;
gameState.IsVisible = false;

if(PluginHost.SetGameState(gameState))
{
info.Continue();
}
else
{
info.Fail("Fail at set new state on room");
}

}



After the room created on the client, we perform a simple check on the Start () component, just to let me know the value of the variables (PhotonNetwork.room.isOpen). But the variables are not suffering changing from plugin! Why??

Please. Can someone help me?

PlayerCache

$
0
0
The PlayerCache used by the MasterServer is very useful for finding players/friends purposes. We have some operation in the lobby that will require to read the player-game matching information in the player cache, however since the PlayerCache uses the C# Fiber, the cache can't return information to the lobby.

are there any suggestions how we can get the player-game matching information from the PlayerCache to the lobby? could I replace the fiber with lock in the player cache?

Thanks!
K

Does Photon Server Require Internet Connection?

$
0
0
I want to run my multiplayer game completely offline but with a LAN but whenever I disconnect my laptop from wifi and try to run PhotonControl.exe and start LoadBalancing as an application, it starts for a few seconds then stops on its own. Am I able to run the server with no outside internet or am I just wasting my time trying to do that?

This is what shows up in the Logs every time I try:

6560: 19:00:19.879 - Service: "Photon Socket Server" starting
6560: 19:00:19.880 - Config File: C:\Photon\Photon-OnPremise-Server-SDK_v4-0-29-11263\deploy\bin_Win64\PhotonServer.config
6560: 19:00:19.881 - Will produce at most: 10 crash dumps
6560: 19:00:19.882 - Service shutting down
6560: 19:00:19.882 - Service shut down complete

Remove specific events from cache room - Plugin

$
0
0
I have two events from PhotonNetwork.RaiseEvent:
1 - Event Sitdown. This action is being stored in the cache of the room.
2 - EventLiftup. This action is not stored in the cache of the room.

In my plugin, I check both actions. When I identify the action of lifting I have the need to remove the action "Sitdown" of the player stored in the room cache. This will prevent future players to see him sitting when in fact he already stood up ...

The problem is that I'm not understand how use this method "cache slice".

Can help me with this?

Photon Server Lan

$
0
0
Hi, I am trying to create a LAN game without internet connection using Photon Server. I am able to join the lobby just fine, but when try to create a room, I get this error:
Operation 227 failed in a server-side plugin. Check the configuration in the Dashboard. Message from server-plugin: Failed to create game on http://photon-photon-pluginsdk-v1.webscript.io/GameCreate? : 'The remote name could not be resolved: 'photon-photon-pluginsdk-v1.webscript.io'' httpcode=-1 webstatus=1 response='', HttpQueueResult=5.
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1149)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)


Do I need to include any other information?

I can't connect photonNetwork sometimes.

$
0
0
I can't connect photonNetwork sometimes,but i can after a hours.I don't know it's my problem or the issue of photon server .
It's log in GSGame .
ERROR Photon.Hive.HiveGame.HiveHostGame.Plugin - Failed to create game on http://photon-photon-pluginsdk-v1.webscript.io/GameCreate? : 'Service Unavailable: Back-end server is at capacity' httpcode=503 webstatus=7 response='', HttpQueueResult=5.

SetCustomProperties and RaiseEvent - receipt of order

$
0
0
I am using a development policy that may not be reliable and therefore can cause me great inconvenience in the future when my game is actually online and not on my local machine!

Please can enlighten me if I'm correct in being afraid of the next case?
First I update the player's properties
PhotonNetwork.player.SetCustomProperties(data);
Soon after, I send an event with some related data
PhotonNetwork.RaiseEvent(evCode, evData, true, raiseOp);

When this event is received by my players, I am confident that the custom properties of the player who posted this event, already been updated, and therefore I seek the references updated immediately upon receipt of the event.
My fear is that there may be the possibility of these properties will take longer to upgrade than the transport time of the event . There is this possibility?

Errors getting a cloud game running on the server

$
0
0
Hello,

I'm currently trying to get our game that runs on the cloud servers to run off a local server for an upcoming convention where there will be no internet access.

When I run the loadbalance test client it returns errors: "JoinGame failed: ReturnCode: 32758 (Game does not exists)", the loadbalancing application is running and the memory usage is increasing so I'm not sure what's going on here.

Running the game returns errors of being unable to connect.

Any help is appreciated

[Fixed] Unable to Setup Local Photon Server

$
0
0
Hi,

I am trying to set up a local server that connects 4 pcs together with a switch. The PCs are not connected to the internet. I started the LoadBalancing instance on one of the PC and tested the application. The test application does not work as I received a CreateGame failure as follows:

OnOperationReturn: CreateGame Failed: ReturnCode: 32752 (Failed to create game on http://photon-photon-pluginsdk-v1.webscript.io/GameCreate? : 'The remote name could not be resovled: 'photon-photon-photonsdk-v1.webscript.io'' httpcode=-1 webstatus=1 response ='', HttpQueueResult=5.). Disconnecting...

Does anyone know how to solve this issue? I have been looking around the forums and the web but I cant seem to find a solution.

IPv6 in DNS64+NAT64 environment

$
0
0
Hi,

I am testing with iOS cpp SDK v4.1.3.3 and onPremise Server SDK v3.4.31.10808.

according to this page http://doc.photonengine.com/en-us/onpremise/current/operations/ipv6#hostnames , the server should send hostname instead of ip address to client so that client will resolve ip address itself.

however, I have tested the case where my master server will send a IPv4 game server address to client, and the client can still handle it. does the Photon sdk supports handling a ipv4 address under DNS64+NAT64 environment?

Thanks.

K

how to connect Unity client SDK demo to own hosting photon server

$
0
0
I just started to study and use photon server, so I downloaded the server sdk, and the client sdk, NOT PUN. And then I opened the demo-particle within the client sdk folder on unity. It worked when I ran it with my APPID, but the demo by default was connecting to Photon cloud, not the server I was hosting.

The readme text of the client sdk said we can connect to the hosting server and use use any AppId. But after a while studying of the demo structure, the only option seemed to be ok was to add my photon server IP address to
private string yourPhotonMasterAddress = ""; // optional address of a Photon Server you host within the "ConnectionDialog.cs" file
I then ran again, didn't seem work, since when I stopped the server the demo still worked as usual.

Is there a way to do that? Upon some searching on google, couldn't find solutions.
Thanks :)

List of updates Plugin SDK - RemoveRoomCache Bug

$
0
0
Hello friends, recently discovered a problem to remove cache events starting plugin.
I wonder if there is a list of updates for me to follow and be able to know when this problem will be fixed!

I tried to work with caches from my own client, as is usual, but I really have the need to send some events from plugin, and especially to remove some events from it.

There are some events in my game, that should only be handled on the server, without my clients have access to the logic used.

Therefore my need to work perfectly with the from starting my plugin. Add and remove room cache events, is essential for me. But at the moment, I can only add and can not remove!.

Thankx Brothers. (^.^)

InvalidOperationException in PhotonServer 3.4

$
0
0
Hi, I have some problems that I'd like to comment you.

Sometimes, when I am attached in Visual Studio to Photon Server i get an exceptin of the type:

InvalidOperationException: collection was modified enumeration operation may not execute

In LoadBalancing solution (photon server 3.4)
In GameList.cs, function SendGame, calling at peer.SendEvent(eventData, new SendParameters());

Why is occurring this error? Is it usual to have sometimes this error?
It stops the execution because i am debugging , but if i am not debugging the execution continue in Spite of the error?

Should I catch those exceptions or simply mark them to be ignored in visual studio ?

Thank you.

Per-room authentication

$
0
0
Hello,

I'm looking for a way to do per-room authentication on room join requests.

Certain people are allowed to join certain rooms. I have a webserver (hosted separately from my Photon server) that's able to take in a room ID and an access token (for my service, not for photon), and use that to say whether or not the room join is allowed.

Using private rooms and making the room ID the 'password' is insufficient for my use case - the set of people who can join a given room may change over time so I need to run the check on my web server on every room join request.

The easiest way that I can find to do this is to write a Photon Plugin that intercepts the room join request and calls my webserver, passing in the room ID and my service's access token from the client. Unfortunately, I can't come up with a good way to get that client access token to the Photon server.

If there was some way to pass in arbitrary key-value pairs as part of the room join request, similar to what you can do for Photon Custom Authentication, that would be ideal. Is there a way to do this as part of Room Join requests or other Photon calls? I'm also planning to use (enterprise) Photon Cloud, so I'd only be able to make a plugin, not modify the source code further.

Thanks!

How to start a server (Specifically a LAN server) in Unity??

$
0
0
Hello,

I was hoping there was a way to start a Photon server in Unity using code, so we can bundle our game with the server and people can run it on their computer and make LAN servers.

I am aware of the License cap of 20 ccu's but that should be enough and if they want/need more they can buy a licence and so on.

Thanks in advance!

K

simplistic server

$
0
0
hi.
im searching in photon as my game server solution but I see it has many stories. im my structure data just is sent by json and in every json username and password of client is included. server just need to decode data deserialize it and do the operation and send right answer to right client.

can you simply tell me how can I do that on the photon server? thank you for helping

Is PeerBase.SendEvent() guaranteed to be delivered to the client?

$
0
0
I'm using PhotonServer v2.0.50727 on UDP.
On the match end every peer is sent a final stats events for every player in the match (with SendEvent()).
And sometimes, rarely, this event for one of the players is missing on the client.

So I suspect it is because of the UDP connection or am I mistaken?

Using Custom Authentication in an onpremise server

Configure Photon Master Server on Local as well as Hosting

$
0
0
please put some guide or instructions related to Hosting Photon Master Server at Local machine as well at Hosting domain??
how i can do it
Viewing all 1557 articles
Browse latest View live