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

Moved: A question about flow calculations


Sharing game data between rooms

$
0
0
I want to load the game data (Skill and character balance data and other static data) that is shared between rooms from a redis server. Since Plugins are per-room instances, where should I put that code? (my current temporary solution is making it static and loading when the first plugin instance is created).

Is there an action/message/hook I can subscribe to that it's called when the server is initialized or something like that?

Thanks.

How to set up Photon on Azure VM (Server 2016)?

$
0
0
Hi
I'm having trouble just running the demo from Photon Control, it won't start (logs at the end of this post).

When I first installed photon I forgot to unblock the installation file but then I uninstalled photon control, restarted computer, unblocked the file and then installed again. But now improvements.
I've also tried with all three IP options.

Any ideas on what I can do about it?


See log file here:https://drive.google.com/open?id=1ZXlvaqZqcjnsGqF_NvIcLaZ1q3IobtHZ

Steam authorization with photon self-hosted server?

$
0
0
How do you setup a self-hosted server with Steam authorization. I modified my config file “Photon.LoadBalancing.dll.config” and added the following:
  <AuthSettings Enabled="false" ClientAuthenticationAllowAnonymous="false">
    <AuthProviders>
      <AuthProvider Name="Steam"
                    AuthenticationType="1"
                    apiKeySecret = "My API key"
                    appid = "<My AppID>"
                    verifyOwnership = "true"
                    verifyVacBan = "true"
                    verifyPubBan = "true"
                    RejectIfUnavailable = "false" />-->
    </AuthProviders>
  </AuthSettings>
However, with this change, the server can no longer start. Any help would be appreciated!

Server fails to load plugin, but works with development environment?

$
0
0
Hi!

I am trying to add my plugin to my self-hosted server. Locally (Windows 10), the server and plugin run without any problems. However, on the server (Windows Server 2016), I get the following error message in the log:


2018-03-22 13:53:23,805 [1] INFO  Photon.LoadBalancing.GameServer.GameApplication - Setup: serverId=7bf93619-d692-4065-b3fd-7e01f6b7d59d
2018-03-22 13:53:23,844 [1] INFO  Photon.Hive.Plugin.PluginManager - Plugin configured: name=MyPlugin
2018-03-22 13:53:26,026 [1] ERROR Photon.Hive.Plugin.PluginManager - Got Exception during either loading of assembly C:\Photon-OnPremise-Server-SDK_v4-0-29-11263\deploy\Plugins\MyPlugin\\bin\MyPlugin.dll or type MyPlugin.PluginFactory.
Exception System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
   at System.Reflection.Assembly.LoadFile(String path)
   at 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:line 296


I have the exact same version on the server as in the develop environment. Everything is just copy pasted to the server. Any ideas what might be causing the problems? Any help is appreciated!

How do I authenticate users?

$
0
0
Hi,
I am trying to prototype a game (my client is Unity), and I'm trying to authenticate users. The page on the subject at the main site is confusing at best, so I have no idea how to do it.

What I would kind of expected to happen was that I will be able to send the login information through the InitRequest object, however, I was unable to find any way to control it from the client and enter any information into it.

So, how do I solve this?
Thanks.

Does Photon compress a message data before sending?

$
0
0
Should we compress a large text message?

Message on disconnect?

$
0
0
Hello!

I'm using Photon Self-Hosted and had a question. When I disconnect a peer, is there a way to send a message to that client about why they are being disconnected? Failing that, is there a good way to make sure we've flushed a specific Event or Object and that the client has received it?

I'm seeing that if I send an Event or Object over, they may not get there until the disconnect happens, and sometimes won't get there at all. I have tried calling Flush() but that doesn't seem to make a difference. If I send the payload, then wait a half second, then disconnect, that seems to work, but even that can be unreliable depending on latency.

Thanks!

About Plugin SDK and Server SDK

$
0
0
What's the difference between Plugin SDK and Server SDK?

How to control a turret in MOBA game

$
0
0
I am using photonserver for my moba game develope,and I know some server side coding,but I don’t know how to control the turret and mini soldier’s AI. Like when a hero or mini soldier enters the turret’s attack area,how do a turret know and attack. I am using unity to develope the client,but I don’t want to control the turrets in the client side. Please help me,thanks a lot.

Limit count of users for Photon Server

$
0
0
Hello. With Photon Cloud, we have CCU limit, that is controlled with subscription.
Is there a way to limit concurrent users that can connect to dedicated Photon Server? We want to control stability of servers, by reducing count of players on one server.
If it is possible, how it is behaved when servers use MasterServer?
Is there maybe a way to setup max CCU or max users/rooms count for Photon Server?

Thanks!

Server authoritative FPS

$
0
0
Hello guys.
My another question here on forum is - are there best practices, or best ways to have server authoritative FPS game, that is being controlled with server? The reason for this topic - is hackers, they break game's .apk and .ipa files, and apply modes to it. Ideal way to control every shot from Server, but this will mean a lot of traffic to be transfered via RPC's.

Are there any best practices for that?

Photon Server Microsoft Azure

$
0
0
I want to setup the Photon Server on Virtual Machine from Microsoft Azure.
I do not find documentation.
Can you help me ?

MmoDemo collision checks?

$
0
0
I've been attempting to use the MmoDemo code to start a game project, I know it's meant only to be a demo and not a starting base for a game but I've attempted to use it as such anyway.

The difficulty in doing this comes from the lack of a big picture design of how the system works. The main question I have is that if you were doing collision checks on the server within MmoDemo, where would they be done?

One of the things that would be needed to do collision checks is a collection of Items (or maybe a new type GameObjects to account for projectiles and other collidables), so that the items can have collision checks done between them. Does such a collection of items exist in the project? I see that MmoActor class has an InterestItems collection, maybe that one? or ItemCache - although it isn't organized by regions, maybe it would work just to get a start?

If anyone has some notion on where to start with this problem please let me know.

How to debug server code

$
0
0
Couple of methods I came up with for debugging server code. Hope it will help someone to save up some time. :-) Btw I'm using Visual Studio 2008.

First, be sure to setup your Visual Studio project to update server's files automatically. There are two ways to achieve this: 1) go to your server project properties, and in Build tab select Output path to point to the path were Photon is loading your dlls (for example: "e:\Projects\Photon\Server\deploy\Mmo\Photon.MmoDemo.Server\bin\"). 2) Another way to do this is to go to Build Events and add a post build event to copy the files there. Something like: "copy "$(TargetDir)" "$(SolutionDir)\..\..\deploy\Mmo\Photon.MmoDemo.Server\bin\"", also don't forget to choose Run the post-build event: When the build updates the project output. Setup Photon to automatically load changed dlls, and after you hit F5 or Ctrl+Shift+B in Visual Studio, the files will end up were they should be, and Photon will restart the server with your new code.

Now for the debugging part, there are 3 methods. But before debugging make sure Photon is using 2.0 version of .Net runtime! To do this edit your PhotonSocketServer.config file and for instance config add this:
&lt;Runtime
	Assembly="PhotonHostRuntime, Version=2.0.0.0, Culture=neutral"
	Type="PhotonHostRuntime.PhotonDomainManager"
	CLRVersion="v2.0"&gt;
&lt;/Runtime&gt;

1. Attaching debugger.

Go to Debug -> Attach to Process, select PhotonSocketServer.exe. Also for Attach to: select only Managed code. If you select Native code, then detaching debugger will kill server process. After that hit Attach, and there you go.

2. Launching debugger from your code.

In your Application class (the one that inherits Photon.SocketServer.Application) override Setup() method and add this line: System.Diagnostics.Debugger.Launch(); . When your server code will be launched you get a nice message box that will ask you if you want to attach the debugger. You can debug startup code this way!

3. Attaching debugger automatically.

This one is my favorite, as it attaches the debugger by simply clicking F5 in Visual Studio. For this create a dummy empty C++ project in your solution. Add main.cpp and a stub for main(). Select it as startup project. Setup project dependencies that building this one will build your server too. Go to project properties and in Debugging tab change Command to where PhotonSocketServer.exe is located, for example: "e:\Projects\Photon\Server\deploy\bin_Win32\PhotonSocketServer.exe". For Attach choose Yes. Set Debugger Type to Managed Only (mixing with native kills the server after detaching debugger). And voila! Hit F5 and it will compile, update your server, and attach a debugger in just a couple seconds. :-) And you can debug startup code this way too!

How can I get the static resource like pictures and prefabs from the photon server?

$
0
0
server: photon server (self hosted) Loabalancing application
client: unity(2017.2.0) + PUN
Database: mysql
And I have completed the task about the server-client connection including database operations, and now I want to get the static resources like .jpg, .png or .prefab from the server and then the client can load the resouces. But I don't know how does the photon server support these actions? And if it support, how does I learn some api about the actions?

Can Photons plugins for Operations and what not be used for other things as well?

$
0
0
Hello, I was wondering if Photons plugins for Operation RPCs the messaging and what not be used for other things as well, or do they only exclusively work with Photons server software? I saw a section in the docs about open source stuff and I know there is a SDK, but I am wondering if they would actually even work? Say I wanted to connect and run an application on my pcs and have them send messages to each other or other devises, would it work just so long as there is a connection, or does it have to be connected to a photon server?

Request change of billing currency

$
0
0
Can you change our billing currency from NTD to USD?

Voice Demo - Instantiation

$
0
0
What part of the Voice Demo code instantiates other clients' character object in a room? I can't seem to track it in the debugger.

Moved: Voice Demo - Instantiation

Viewing all 1557 articles
Browse latest View live