Starting Photon in 5 Minutes
Photon is extremely easy to install and start. The SDK includes ready-to-use binaries which can be up and running within 5 minutes.
In the following video you can see how to get and start Photon.
LoadBalancing (MyCloud)setup and you should setup a Game Server IP Address to use it. See below!
Download And Extract
The Photon Server SDKs are available on the download page of our website.
The Server SDK comes as self-extracting executable. This keeps included .dll files from being flagged as "untrustworthy" by some unzip tools (download from the internet => bad).
You can extract the server package to any place - preferably an empty folder which you prepared beforehand. The extraction creates several folders.
The "deploy" folder contains the binaries. This is what you need at least to run Photon. The folders
src-server (applications) are for development.
In the "deploy" folder you will find a folder per application (see: Basic Concepts) and some folders starting with "bin". Open one of these two:
- bin_Win32: Windows Vista and up
- bin_Win64: 64 bit Windows Vista and up
In either folder, you will find the actual Photon executable. You can start this with command-line arguments or you can use
Start PhotonControl.exe and confirm the admin rights for this application. They are needed for the option to setup Photon as a Service.
Look out for the tray-bar icon (bottom right by default). Click the white/grey icon to open a menu which controls Photon. Pick
LoadBalancing (MyCloud) from the Photon Instances (explained below) and "Start as Application". Now you have started Photon!
Until you apply a license file, Photon will be limited to 20 concurrent connections. See Licenses page.
Photon is designed to run "Applications" as game logic. They define what a client can do or can't (e.g. for matchmaking). Applications run cooperatively for different tasks.
Out of the box, Photon comes with two distinct application configurations:
- LoadBalancing (MyCloud) is the preferred setup and compatible with the Photon Cloud and PUN.
- Default is a simple, one-server solution that can be useful to stat developing with.
LoadBalancing (MyCloud) and Game Server IP Config
LoadBalancing (MyCloud) is the way to go for clients done with PUN or the "LoadBalancing Api".
Actually, this setup will start two separate Photon Applications:
Master Server and
Game Server. When a new room gets created, the Master Server will select a Game Server and forward the client there.
In the PhotonControl menu select "Game Server IP Config". The IP addresses of the host machine will be listed, marked as "public" or "local". Select one.
The entry "Autodetect public" makes the server detect a public internet IP when Photon starts.
Using a local IP means that only clients in the same local network can connect. You need to use a public IP, if players from the internet should be able to connect and join games.
If your server is in a LAN but your clients use WiFi, they might be in distinct networks. If your client can't reach the server, check if your router allows connections between WiFi and LAN. Check if all devices are in the same IP range.
No matter if you choose a local network IP or a public one, you also have to setup your firewalls, routers and switches. Sadly, we can't help here, due to the amount of different hardware and software. In the easiest setup, multiple test machines are connected by the same switch/router.
The Game Server IP Address is saved in a file called "Photon.LoadBalancing.dll.config". It can be edited manually, too.
Starting the Test Client
The server SDK includes a test client to simulate multiple clients and to generate some load. You can start it from the PhotonControl menu. It's the last menu item for the application setup you started: "Run test client".
The test client is a simple console application which will simulate client sessions and games with a few players each.
PhotonControl will read some values from your .license file on start. Select the "License Info" item in the menu to check the CCU, expiry date and more from the menu. If you replace the .license file, you should restart PhotonControl to get the new values.
The server log will also contain essential values of your license.
See Licenses page.