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.
- Download And Extract
- Starting PhotonControl
- LoadBalancing Instance
- Game Server IP Config
- Starting LoadBalancing
- Starting The Test Client
- License Info
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.
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.
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.
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.
- MMO Demo is an application that exposes a simple MMO solution based on Photon. Read more about "MMO Demo".
LoadBalancing (MyCloud) is the way to go for clients done with PUN, Photon Voice or Photon Realtime (also known as the "LoadBalancing Client API").
Actually, this setup will start two separate Photon Applications:
Master Server and
When a new room gets created, the Master Server will forward the client to the Game Server.
Game Server IP Config
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.
LoadBalancing (MyCloud) from the Photon Instances and "Start as Application".
Now you have started Photon.
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.
Until you apply a license file, Photon will be limited to 20 concurrent connections.
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.