アンドロイド

ReadMe

Photon Android NDK SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform - Fast, reliable, scalable.
Use the Photon Android NDK SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/doc - Release history, API documentation
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK.
/demo_chat:
The demo shows a basic way of using the Photon Chat API with a graphical user interface. This uses the Cocos2D-x graphics engine.
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_memory:
This demo displays Photon's asynchronous turnbased features in a game of Memory. This uses the Cocos2D-x graphics engine.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients. The UI shows areas of interest when activated. This uses the Cocos2D-x graphics engine.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

.NET

ReadMe

This is the readme for the Photon Client SDKs.
(C) Exit Games GmbH 2016
LoadBalancing Documentation
----------------------------------------------------------------------------------------------------
The API reference is included in this package as CHM file.
Find the current manuals, tutorials, API reference and more online:
http://doc.photonengine.com
Running the Demos
----------------------------------------------------------------------------------------------------
Our demos are built for the Photon Cloud for convenience (no initial server setup needed).
The service is free for development and signing up is instant and without obligation.
Every game title on the Cloud gets it's own AppId string which must be copied into the clients.
The demos use a property "AppId" in the source files. Set it's value before you build them.
Sign In: https://www.photonengine.com/en/Account/SignIn
AppId in Dashboard: https://www.photonengine.com/dashboard
Each application type has it's own AppId (e.g Realtime and Chat).
You will find specific sections of the Dashboard per application type.
Alternatively you can host a "Photon Cloud" yourself. The AppId is not used in that case.
Download the server SDK here:
https://www.photonengine.com/OnPremise/Download
How to start the server:
http://doc.photonengine.com/en/onpremise/current/getting-started/photon-server-in-5min
Chat Documentation
----------------------------------------------------------------------------------------------------
http://doc.photonengine.com/en/chat
http://forum.photonengine.com
Implementing Photon Chat
----------------------------------------------------------------------------------------------------
Photon Chat is separated from other Photon Applications, so it needs it's own AppId.
Our demos usually don't have an AppId set.
In code, find "<your appid>" to copy yours in. In Unity, we usually use a component
to set the AppId via the Inspector. Look for the "Scripts" GameObject in the scenes.
Register your Chat Application in the Dashboard:
https://www.photonengine.com/en/Chat/Dashboard
The class ChatClient and the interface IChatClientListener wrap up most important parts
of the Chat API. Please refer to their documentation on how to use this API.
More documentation will follow.
If you use Unity, copy the source from the ChatApi folder into your project.
It should run in most cases (unless your Photon assembly is very old).
Unity Notes
----------------------------------------------------------------------------------------------------
If you don't use Unity, skip this chapter.
We assume you're using Unity 5.x.
The demos are prepared to export for Standalone, not WSA or other.
The SDK contains a "PhotonAssets" folder. To import Photon into your project, copy it's content
into your project's Asset folder. You may need to setup the DLLs in Unity 5 Inspector to export
for your platform(s).
Currently supported export platforms are:
Standalone (Windows, OSx and Linux)
Web (Windows and MacOS)
WebGL
iOS (Unity 4 needs iOS Pro Unity license)
Android (Unity 4 needs Android Pro Unity license)
Windows Store 8.1 and 10 (including Phone and UWP with one library)
PS3, PS4 and XBox (certified developers should get in contact with us on demand)
All Unity projects must use ExitGames.Client.Photon.Hashtable!
This provides compatibility across all exports.
Add this to your code (at the beginning), to resolve the "ambiguous Hashtable" declaration:
using Hashtable = ExitGames.Client.Photon.Hashtable;
Web players do a policy-file request to port TCP 843 before they connect to a remote server.
The Photon Cloud and Server SDK will handle these requests.
If you host the server, open the additional "policy request" port: TCP 843. If you configure
your server applications, run "Policy Application" for webplayers.
How to add Photon to your Unity project:
1) The Unity SDK contains a "PhotonAssets" folder.
Copy the content of PhotonAssets\ into your project's Assets folder.
2) Make sure to have the following line of code in your scripts to make it run in background:
Application.runInBackground = true; //without this Photon will loose connection if not focussed
3) Add "using Hashtable = ExitGames.Client.Photon.Hashtable;" to your scripts. Without quotation.
4) iOS build settings (Edit->Project Settings->Player)
"iPhone Stripping Level" to "Strip Bytecode" and use
"DotNet 2.0 Subset".
5) If you host Photon, change the server address in the client. A default of "localhost:5055" won't work on device.
6) Implement OnApplicationQuit() and disconnect the client when the app stops.
Windows Store Notes
----------------------------------------------------------------------------------------------------
To run demos on a smartphone or simulator, you need to setup your server's network address or
use the Photon Cloud.
We assume you run a Photon Server on the same development machine, so by default, our demos have a
address set to "127.0.0.1:5055" and use UDP.
Demos for LoadBalancing or the Cloud will be set to: "ns.exitgames.com:5055" and use UDP.
Search the code and replace those values to run the demos on your own servers or in a simulator.
The Peer.Connect() method is usually used to set the server's address.
A smartphone has it's own IP address, so 127.0.0.1 will contact the phone instead of the machine
that also runs Photon.

Emscripten

ReadMe

Photon Emscripten SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Emscripten SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/shared:
This folder holds all applications used by various demos.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

iOS

ReadMe

Photon iOS SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon iOS SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Chat-objc - Photon Chat sources Objective-C
/Common-cpp - common sources
/Common-objc - common sources Objective-C
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/LoadBalancing-objc - Loadbalancing specific sources Objective-C
/Photon-cpp - common Photon sources
/Photon-objc - common Photon sources Objective-C
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK. It is implemented in C++.
/demo_chat:
The demo shows a basic way of using the Photon Chat API with a graphical user interface. This uses the Cocos2D-x graphics engine and is implemented in C++.
/demo_chat_objc:
The demo shows a basic way of using the Photon Chat API within a console. It is implemented in Objective-C.
/demo_iPhone_realtime_objc:
The demo client connects to a Photon Server running the Lite application and and shows how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients. It uses the Cocos2D-iPhone graphics engine and is implemented in Objective-C.
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in C++.
/demo_loadBalancing_objc:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Objective-C.
/demo_loadBalancing_swift:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Swift.
/demo_memory:
This demo displays Photon's asynchronous turnbased features in a game of Memory. This uses the Cocos2D-x graphics engine. It is implemented in C++.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients. The UI shows areas of interest when activated. This uses the Cocos2D-x graphics engine.
It is implemented in C++.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types. It is implemented in C++.
/demo_typeSupport_objc:
This demo displays the proper use of Photon's serializable data types. It is implemented in Objective-C.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Linux

ReadMe

Photon Linux SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Linux SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK.
/demo_chat:
The demo shows a basic way of using the Photon Chat API in a console.
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Blocks are being moved automatically and the positions are updated in realtime between clients. This is a console application.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Mac OS X

ReadMe

Photon Mac OS X SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Mac OS X SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Chat-objc - Photon Chat sources Objective-C
/Common-cpp - common sources
/Common-objc - common sources Objective-C
/doc - Release history, IPA documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/LoadBalancing-objc - Loadbalancing specific sources Objective-C
/Photon-cpp - common Photon sources
/Photon-objc - common Photon sources Objective-C
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK. It is implemented in C++.
/demo_chat:
The demo shows a basic way of using the Photon Chat API within a console. It is implemented in C++.
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in C++.
/demo_loadBalancing_objc:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Objective-C.
/demo_loadBalancing_swift:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Swift.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Blocks are being moved automatically and the positions are updated in realtime between clients. This is a console application which is implemented in C++.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types. It is implemented in C++.
/demo_typeSupport_objc:
This demo displays the proper use of Photon's serializable data types. It is implemented in Objective-C.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

PlayStation 4

ReadMe

Photon PS4 SDK
------------------------------------------
Please contact the console producer on additional setup information or required authorization.
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_chat:
The demo shows a basic way of using the Photon Chat API.
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

PS Vita

ReadMe

Photon PSVita SDK
------------------------------------------
Please contact the console producer on additional setup information or required authorization.
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Unity

ReadMe

This is the readme for the Photon Client SDKs.
(C) Exit Games GmbH 2016
LoadBalancing Documentation
----------------------------------------------------------------------------------------------------
The API reference is included in this package as CHM file.
Find the current manuals, tutorials, API reference and more online:
http://doc.photonengine.com
Running the Demos
----------------------------------------------------------------------------------------------------
Our demos are built for the Photon Cloud for convenience (no initial server setup needed).
The service is free for development and signing up is instant and without obligation.
Every game title on the Cloud gets it's own AppId string which must be copied into the clients.
The demos use a property "AppId" in the source files. Set it's value before you build them.
Sign In: https://www.photonengine.com/en/Account/SignIn
AppId in Dashboard: https://www.photonengine.com/dashboard
Each application type has it's own AppId (e.g Realtime and Chat).
You will find specific sections of the Dashboard per application type.
Alternatively you can host a "Photon Cloud" yourself. The AppId is not used in that case.
Download the server SDK here:
https://www.photonengine.com/OnPremise/Download
How to start the server:
http://doc.photonengine.com/en/onpremise/current/getting-started/photon-server-in-5min
Chat Documentation
----------------------------------------------------------------------------------------------------
http://doc.photonengine.com/en/chat
http://forum.photonengine.com
Implementing Photon Chat
----------------------------------------------------------------------------------------------------
Photon Chat is separated from other Photon Applications, so it needs it's own AppId.
Our demos usually don't have an AppId set.
In code, find "<your appid>" to copy yours in. In Unity, we usually use a component
to set the AppId via the Inspector. Look for the "Scripts" GameObject in the scenes.
Register your Chat Application in the Dashboard:
https://www.photonengine.com/en/Chat/Dashboard
The class ChatClient and the interface IChatClientListener wrap up most important parts
of the Chat API. Please refer to their documentation on how to use this API.
More documentation will follow.
If you use Unity, copy the source from the ChatApi folder into your project.
It should run in most cases (unless your Photon assembly is very old).
Unity Notes
----------------------------------------------------------------------------------------------------
If you don't use Unity, skip this chapter.
We assume you're using Unity 5.x.
The demos are prepared to export for Standalone, not WSA or other.
The SDK contains a "PhotonAssets" folder. To import Photon into your project, copy it's content
into your project's Asset folder. You may need to setup the DLLs in Unity 5 Inspector to export
for your platform(s).
Currently supported export platforms are:
Standalone (Windows, OSx and Linux)
Web (Windows and MacOS)
WebGL
iOS (Unity 4 needs iOS Pro Unity license)
Android (Unity 4 needs Android Pro Unity license)
Windows Store 8.1 and 10 (including Phone and UWP with one library)
PS3, PS4 and XBox (certified developers should get in contact with us on demand)
All Unity projects must use ExitGames.Client.Photon.Hashtable!
This provides compatibility across all exports.
Add this to your code (at the beginning), to resolve the "ambiguous Hashtable" declaration:
using Hashtable = ExitGames.Client.Photon.Hashtable;
Web players do a policy-file request to port TCP 843 before they connect to a remote server.
The Photon Cloud and Server SDK will handle these requests.
If you host the server, open the additional "policy request" port: TCP 843. If you configure
your server applications, run "Policy Application" for webplayers.
How to add Photon to your Unity project:
1) The Unity SDK contains a "PhotonAssets" folder.
Copy the content of PhotonAssets\ into your project's Assets folder.
2) Make sure to have the following line of code in your scripts to make it run in background:
Application.runInBackground = true; //without this Photon will loose connection if not focussed
3) Add "using Hashtable = ExitGames.Client.Photon.Hashtable;" to your scripts. Without quotation.
4) iOS build settings (Edit->Project Settings->Player)
"iPhone Stripping Level" to "Strip Bytecode" and use
"DotNet 2.0 Subset".
5) If you host Photon, change the server address in the client. A default of "localhost:5055" won't work on device.
6) Implement OnApplicationQuit() and disconnect the client when the app stops.
Windows Store Notes
----------------------------------------------------------------------------------------------------
To run demos on a smartphone or simulator, you need to setup your server's network address or
use the Photon Cloud.
We assume you run a Photon Server on the same development machine, so by default, our demos have a
address set to "127.0.0.1:5055" and use UDP.
Demos for LoadBalancing or the Cloud will be set to: "ns.exitgames.com:5055" and use UDP.
Search the code and replace those values to run the demos on your own servers or in a simulator.
The Peer.Connect() method is usually used to set the server's address.
A smartphone has it's own IP address, so 127.0.0.1 will contact the phone instead of the machine
that also runs Photon.

V-Play / Qt

Windows

ReadMe

Photon Windows SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Windows SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK.
/demo_chat:
The demo shows a basic way of using the Photon Chat API.
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_memory:
This demo displays Photon's asynchronous turnbased features in a game of Memory. This uses the Cocos2D-x graphics engine.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Windows Store

ReadMe

Photon Windows Store SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Windows Store SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Xamarin

ReadMe

This is the readme for the Photon Client SDKs.
(C) Exit Games GmbH 2014
Reference Documentation
----------------------------------------------------------------------------------------------------
The API reference is included in this package as CHM file.
Find the current API reference, manuals, tutorials and more online:
http://doc.exitgames.com
Running the Demos
----------------------------------------------------------------------------------------------------
Our demos are built for the Photon Cloud to reduce the effort to run them. No server setup needed.
The service is free for development and signing up takes less than 5 minutes.
Every game title on the Cloud gets it's own AppId string, which must be copied into the clients.
The demos use a property "AppId" in the source files. Set it's value before you build them.
Sign Up: https://cloud.exitgames.com
App ID in Dashboard: https://cloud.exitgames.com/dashboard
The Application ID is per application type (Realtime, Turnbased, Chat)!
You will find specific sections of the Dashboard per application type.
Alternatively you can host a "Photon Cloud" yourself and use any AppId. This is what you need to do:
- Download the Photon Server SDK (it comes as 7zip file or self-extracting exe).
- Unpack-
- Execute PhotonControl.exe.
- Click "Game Server IP Config" and pick a suitable IP address (local network or public).
- This IP must be used in your game as (master) server address. Don't forget the port after ":".
- Click "Loadbalancing (MyCloud)" and "Start as Application".
How to start the server:
http://doc.exitgames.com/en/onpremise/current/getting-started/photon-server-in-5min
Download the server SDK here:
https://www.exitgames.com/OnPremise/Download
Unity3d Notes
----------------------------------------------------------------------------------------------------
If you don't use Unity3D, skip this chapter.
Currently supported export platforms are:
Standalone (Windows, OSx and Linux)
Web (Windows and MacOS)
iOS (needs iOS Pro Unity license)
Android (needs Android Pro Unity license)
Windows 8 Store and Phone
PS3, PS4 and XBox (certified developers should get in contact with us on demand)
As of v3.2.1.6 all Unity projects must use ExitGames.Client.Photon.Hashtable!
This provides compatibility with Win 8 RT and Win 8 Phone exports.
Add this to your code (at the beginning), to resolve the "ambiguous Hashtable" declaration:
using Hashtable = ExitGames.Client.Photon.Hashtable;
Web players do a policy-file request to port TCP 843 before they connect to a remote server.
The Photon Cloud and Server SDK will handle these requests.
If you host the server, open the additional "policy request" port: TCP 843. If you configure
your server applications, run "Policy Application" for webplayers.
How to add Photon to your Unity project:
1) Copy the Photon .dll into the "Assets\Plugins" folder of your project. Avoid dll duplicates!
2) Make sure to have the following line of code somewhere in your scripts, to run it in background:
Application.runInBackground = true; //without this Photon will loose connection if not focussed
3) Add "using Hashtable = ExitGames.Client.Photon.Hashtable;" to your scripts. Without quotation.
4) iOS build settings (Edit->Project Settings->Player)
"iPhone Stripping Level" to "Strip Bytecode" and use
"DotNet 2.0 subset".
If your project runs fine in IDE but fails on device, check the "DotNet 2.0 Subset" option!
5) Change the server address in the client. A default of "localhost:5055" won't work on device.
6) Implement OnApplicationQuit() and disconnect the client when the app stops.
Windows Phone Notes
----------------------------------------------------------------------------------------------------
To run demos on a smartphone or simulator, you need to setup your server's network address or
use the Photon Cloud.
We assume you run a Photon Server on the same development machine, so by default, our demos have a
address set to "127.0.0.1:5055" and use UDP.
Demos for LoadBalancing or the Cloud will be set to: "app.exitgamescloud.com:5055" and use UDP.
Search the code and replace those values to run the demos on your own servers or in a simulator.
The Peer.Connect() method is usually used to set the server's address.
A smartphone has it's own IP address, so 127.0.0.1 will contact the phone instead of the machine
that also runs Photon.
Xamarin Notes
----------------------------------------------------------------------------------------------------
Edit MainActivity.cs with your own AppId (approx. line 33). Read "Running Loadbalancing Demos".
Alternatively change the ServerAddress to a Photon Server you are hosting. Don't forget the ":port".
Our library dlls are fully Xamarin.iOS, Xamarin.Android and Xamarin.mac compatible,
but the projects to build them are not. So you can't reference the LoadBalancingApi project
directly.
Instead, we reference the dlls to minimize the number of projects to maintain and potential for
desaster.
The demo particle links directly to some of the source files of demo-particle-logic for similar
reasons.
Let us know if our workflow doesn't work for you.
Playstation Mobile Notes
----------------------------------------------------------------------------------------------------
The demo by default connects to the EU Photon Cloud servers. You only need to register to run your
own application (game) on it. This gives you the AppId which must be inserted into:
demo-particle-psm\AppMain.cs

Xbox One

ReadMe

Photon XB1 SDK
------------------------------------------
Please contact the console producer on additional setup information or required authorization.
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Xbox One PUN

ReadMe

Photon Xbox One PUN Plugin
------------------------------------------
You must be logged in and verified Xbox One developer to download this PUN addon.
If the download is blocked, get in touch with us.
Mail to: developer@photonengine.com to get your Photon account setup.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

アンドロイド

ReadMe

Photon Android NDK SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform - Fast, reliable, scalable.
Use the Photon Android NDK SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/doc - Release history, API documentation
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK.
/demo_chat:
The demo shows a basic way of using the Photon Chat API with a graphical user interface. This uses the Cocos2D-x graphics engine.
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_memory:
This demo displays Photon's asynchronous turnbased features in a game of Memory. This uses the Cocos2D-x graphics engine.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients. The UI shows areas of interest when activated. This uses the Cocos2D-x graphics engine.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

.NET

ReadMe

This is the readme for the Photon Client SDKs.
(C) Exit Games GmbH 2016
LoadBalancing Documentation
----------------------------------------------------------------------------------------------------
The API reference is included in this package as CHM file.
Find the current manuals, tutorials, API reference and more online:
http://doc.photonengine.com
Running the Demos
----------------------------------------------------------------------------------------------------
Our demos are built for the Photon Cloud for convenience (no initial server setup needed).
The service is free for development and signing up is instant and without obligation.
Every game title on the Cloud gets it's own AppId string which must be copied into the clients.
The demos use a property "AppId" in the source files. Set it's value before you build them.
Sign In: https://www.photonengine.com/en/Account/SignIn
AppId in Dashboard: https://www.photonengine.com/dashboard
Each application type has it's own AppId (e.g Realtime and Chat).
You will find specific sections of the Dashboard per application type.
Alternatively you can host a "Photon Cloud" yourself. The AppId is not used in that case.
Download the server SDK here:
https://www.photonengine.com/OnPremise/Download
How to start the server:
http://doc.photonengine.com/en/onpremise/current/getting-started/photon-server-in-5min
Chat Documentation
----------------------------------------------------------------------------------------------------
http://doc.photonengine.com/en/chat
http://forum.photonengine.com
Implementing Photon Chat
----------------------------------------------------------------------------------------------------
Photon Chat is separated from other Photon Applications, so it needs it's own AppId.
Our demos usually don't have an AppId set.
In code, find "<your appid>" to copy yours in. In Unity, we usually use a component
to set the AppId via the Inspector. Look for the "Scripts" GameObject in the scenes.
Register your Chat Application in the Dashboard:
https://www.photonengine.com/en/Chat/Dashboard
The class ChatClient and the interface IChatClientListener wrap up most important parts
of the Chat API. Please refer to their documentation on how to use this API.
More documentation will follow.
If you use Unity, copy the source from the ChatApi folder into your project.
It should run in most cases (unless your Photon assembly is very old).
Unity Notes
----------------------------------------------------------------------------------------------------
If you don't use Unity, skip this chapter.
We assume you're using Unity 5.x.
The demos are prepared to export for Standalone, not WSA or other.
The SDK contains a "PhotonAssets" folder. To import Photon into your project, copy it's content
into your project's Asset folder. You may need to setup the DLLs in Unity 5 Inspector to export
for your platform(s).
Currently supported export platforms are:
Standalone (Windows, OSx and Linux)
Web (Windows and MacOS)
WebGL
iOS (Unity 4 needs iOS Pro Unity license)
Android (Unity 4 needs Android Pro Unity license)
Windows Store 8.1 and 10 (including Phone and UWP with one library)
PS3, PS4 and XBox (certified developers should get in contact with us on demand)
All Unity projects must use ExitGames.Client.Photon.Hashtable!
This provides compatibility across all exports.
Add this to your code (at the beginning), to resolve the "ambiguous Hashtable" declaration:
using Hashtable = ExitGames.Client.Photon.Hashtable;
Web players do a policy-file request to port TCP 843 before they connect to a remote server.
The Photon Cloud and Server SDK will handle these requests.
If you host the server, open the additional "policy request" port: TCP 843. If you configure
your server applications, run "Policy Application" for webplayers.
How to add Photon to your Unity project:
1) The Unity SDK contains a "PhotonAssets" folder.
Copy the content of PhotonAssets\ into your project's Assets folder.
2) Make sure to have the following line of code in your scripts to make it run in background:
Application.runInBackground = true; //without this Photon will loose connection if not focussed
3) Add "using Hashtable = ExitGames.Client.Photon.Hashtable;" to your scripts. Without quotation.
4) iOS build settings (Edit->Project Settings->Player)
"iPhone Stripping Level" to "Strip Bytecode" and use
"DotNet 2.0 Subset".
5) If you host Photon, change the server address in the client. A default of "localhost:5055" won't work on device.
6) Implement OnApplicationQuit() and disconnect the client when the app stops.
Windows Store Notes
----------------------------------------------------------------------------------------------------
To run demos on a smartphone or simulator, you need to setup your server's network address or
use the Photon Cloud.
We assume you run a Photon Server on the same development machine, so by default, our demos have a
address set to "127.0.0.1:5055" and use UDP.
Demos for LoadBalancing or the Cloud will be set to: "ns.exitgames.com:5055" and use UDP.
Search the code and replace those values to run the demos on your own servers or in a simulator.
The Peer.Connect() method is usually used to set the server's address.
A smartphone has it's own IP address, so 127.0.0.1 will contact the phone instead of the machine
that also runs Photon.

Emscripten

ReadMe

Photon Emscripten SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Emscripten SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/shared:
This folder holds all applications used by various demos.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

iOS

ReadMe

Photon iOS SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon iOS SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Chat-objc - Photon Chat sources Objective-C
/Common-cpp - common sources
/Common-objc - common sources Objective-C
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/LoadBalancing-objc - Loadbalancing specific sources Objective-C
/Photon-cpp - common Photon sources
/Photon-objc - common Photon sources Objective-C
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK. It is implemented in C++.
/demo_chat:
The demo shows a basic way of using the Photon Chat API with a graphical user interface. This uses the Cocos2D-x graphics engine and is implemented in C++.
/demo_chat_objc:
The demo shows a basic way of using the Photon Chat API within a console. It is implemented in Objective-C.
/demo_iPhone_realtime_objc:
The demo client connects to a Photon Server running the Lite application and and shows how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients. It uses the Cocos2D-iPhone graphics engine and is implemented in Objective-C.
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in C++.
/demo_loadBalancing_objc:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Objective-C.
/demo_loadBalancing_swift:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Swift.
/demo_memory:
This demo displays Photon's asynchronous turnbased features in a game of Memory. This uses the Cocos2D-x graphics engine. It is implemented in C++.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients. The UI shows areas of interest when activated. This uses the Cocos2D-x graphics engine.
It is implemented in C++.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types. It is implemented in C++.
/demo_typeSupport_objc:
This demo displays the proper use of Photon's serializable data types. It is implemented in Objective-C.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Linux

ReadMe

Photon Linux SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Linux SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK.
/demo_chat:
The demo shows a basic way of using the Photon Chat API in a console.
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Blocks are being moved automatically and the positions are updated in realtime between clients. This is a console application.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Mac OS X

ReadMe

Photon Mac OS X SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Mac OS X SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Chat-objc - Photon Chat sources Objective-C
/Common-cpp - common sources
/Common-objc - common sources Objective-C
/doc - Release history, IPA documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/LoadBalancing-objc - Loadbalancing specific sources Objective-C
/Photon-cpp - common Photon sources
/Photon-objc - common Photon sources Objective-C
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK. It is implemented in C++.
/demo_chat:
The demo shows a basic way of using the Photon Chat API within a console. It is implemented in C++.
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in C++.
/demo_loadBalancing_objc:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Objective-C.
/demo_loadBalancing_swift:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game. It is implemented in Swift.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Blocks are being moved automatically and the positions are updated in realtime between clients. This is a console application which is implemented in C++.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types. It is implemented in C++.
/demo_typeSupport_objc:
This demo displays the proper use of Photon's serializable data types. It is implemented in Objective-C.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

PlayStation 4

ReadMe

Photon PS4 SDK
------------------------------------------
Please contact the console producer on additional setup information or required authorization.
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_chat:
The demo shows a basic way of using the Photon Chat API.
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

PS Vita

ReadMe

Photon PSVita SDK
------------------------------------------
Please contact the console producer on additional setup information or required authorization.
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Unity

ReadMe

This is the readme for the Photon Client SDKs.
(C) Exit Games GmbH 2016
LoadBalancing Documentation
----------------------------------------------------------------------------------------------------
The API reference is included in this package as CHM file.
Find the current manuals, tutorials, API reference and more online:
http://doc.photonengine.com
Running the Demos
----------------------------------------------------------------------------------------------------
Our demos are built for the Photon Cloud for convenience (no initial server setup needed).
The service is free for development and signing up is instant and without obligation.
Every game title on the Cloud gets it's own AppId string which must be copied into the clients.
The demos use a property "AppId" in the source files. Set it's value before you build them.
Sign In: https://www.photonengine.com/en/Account/SignIn
AppId in Dashboard: https://www.photonengine.com/dashboard
Each application type has it's own AppId (e.g Realtime and Chat).
You will find specific sections of the Dashboard per application type.
Alternatively you can host a "Photon Cloud" yourself. The AppId is not used in that case.
Download the server SDK here:
https://www.photonengine.com/OnPremise/Download
How to start the server:
http://doc.photonengine.com/en/onpremise/current/getting-started/photon-server-in-5min
Chat Documentation
----------------------------------------------------------------------------------------------------
http://doc.photonengine.com/en/chat
http://forum.photonengine.com
Implementing Photon Chat
----------------------------------------------------------------------------------------------------
Photon Chat is separated from other Photon Applications, so it needs it's own AppId.
Our demos usually don't have an AppId set.
In code, find "<your appid>" to copy yours in. In Unity, we usually use a component
to set the AppId via the Inspector. Look for the "Scripts" GameObject in the scenes.
Register your Chat Application in the Dashboard:
https://www.photonengine.com/en/Chat/Dashboard
The class ChatClient and the interface IChatClientListener wrap up most important parts
of the Chat API. Please refer to their documentation on how to use this API.
More documentation will follow.
If you use Unity, copy the source from the ChatApi folder into your project.
It should run in most cases (unless your Photon assembly is very old).
Unity Notes
----------------------------------------------------------------------------------------------------
If you don't use Unity, skip this chapter.
We assume you're using Unity 5.x.
The demos are prepared to export for Standalone, not WSA or other.
The SDK contains a "PhotonAssets" folder. To import Photon into your project, copy it's content
into your project's Asset folder. You may need to setup the DLLs in Unity 5 Inspector to export
for your platform(s).
Currently supported export platforms are:
Standalone (Windows, OSx and Linux)
Web (Windows and MacOS)
WebGL
iOS (Unity 4 needs iOS Pro Unity license)
Android (Unity 4 needs Android Pro Unity license)
Windows Store 8.1 and 10 (including Phone and UWP with one library)
PS3, PS4 and XBox (certified developers should get in contact with us on demand)
All Unity projects must use ExitGames.Client.Photon.Hashtable!
This provides compatibility across all exports.
Add this to your code (at the beginning), to resolve the "ambiguous Hashtable" declaration:
using Hashtable = ExitGames.Client.Photon.Hashtable;
Web players do a policy-file request to port TCP 843 before they connect to a remote server.
The Photon Cloud and Server SDK will handle these requests.
If you host the server, open the additional "policy request" port: TCP 843. If you configure
your server applications, run "Policy Application" for webplayers.
How to add Photon to your Unity project:
1) The Unity SDK contains a "PhotonAssets" folder.
Copy the content of PhotonAssets\ into your project's Assets folder.
2) Make sure to have the following line of code in your scripts to make it run in background:
Application.runInBackground = true; //without this Photon will loose connection if not focussed
3) Add "using Hashtable = ExitGames.Client.Photon.Hashtable;" to your scripts. Without quotation.
4) iOS build settings (Edit->Project Settings->Player)
"iPhone Stripping Level" to "Strip Bytecode" and use
"DotNet 2.0 Subset".
5) If you host Photon, change the server address in the client. A default of "localhost:5055" won't work on device.
6) Implement OnApplicationQuit() and disconnect the client when the app stops.
Windows Store Notes
----------------------------------------------------------------------------------------------------
To run demos on a smartphone or simulator, you need to setup your server's network address or
use the Photon Cloud.
We assume you run a Photon Server on the same development machine, so by default, our demos have a
address set to "127.0.0.1:5055" and use UDP.
Demos for LoadBalancing or the Cloud will be set to: "ns.exitgames.com:5055" and use UDP.
Search the code and replace those values to run the demos on your own servers or in a simulator.
The Peer.Connect() method is usually used to set the server's address.
A smartphone has it's own IP address, so 127.0.0.1 will contact the phone instead of the machine
that also runs Photon.

V-Play / Qt

Windows

ReadMe

Photon Windows SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Windows SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_basics:
The demo client is basically a 'Hello World'. So it's the best place to start if you are new to the SDK.
/demo_chat:
The demo shows a basic way of using the Photon Chat API.
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
/demo_memory:
This demo displays Photon's asynchronous turnbased features in a game of Memory. This uses the Cocos2D-x graphics engine.
/demo_particle:
The demo client connects to a master server and shows the random matchmaking mechanism, how to create a room and how to send and receive events within a running game.
Players move 'their' blocks around and the positions are updated in realtime between clients.
/demo_typeSupport:
This demo displays the proper use of Photon's serializable data types.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Windows Store

ReadMe

Photon Windows Store SDK
------------------------------------------
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon Windows Store SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadBalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Xamarin

ReadMe

This is the readme for the Photon Client SDKs.
(C) Exit Games GmbH 2014
Reference Documentation
----------------------------------------------------------------------------------------------------
The API reference is included in this package as CHM file.
Find the current API reference, manuals, tutorials and more online:
http://doc.exitgames.com
Running the Demos
----------------------------------------------------------------------------------------------------
Our demos are built for the Photon Cloud to reduce the effort to run them. No server setup needed.
The service is free for development and signing up takes less than 5 minutes.
Every game title on the Cloud gets it's own AppId string, which must be copied into the clients.
The demos use a property "AppId" in the source files. Set it's value before you build them.
Sign Up: https://cloud.exitgames.com
App ID in Dashboard: https://cloud.exitgames.com/dashboard
The Application ID is per application type (Realtime, Turnbased, Chat)!
You will find specific sections of the Dashboard per application type.
Alternatively you can host a "Photon Cloud" yourself and use any AppId. This is what you need to do:
- Download the Photon Server SDK (it comes as 7zip file or self-extracting exe).
- Unpack-
- Execute PhotonControl.exe.
- Click "Game Server IP Config" and pick a suitable IP address (local network or public).
- This IP must be used in your game as (master) server address. Don't forget the port after ":".
- Click "Loadbalancing (MyCloud)" and "Start as Application".
How to start the server:
http://doc.exitgames.com/en/onpremise/current/getting-started/photon-server-in-5min
Download the server SDK here:
https://www.exitgames.com/OnPremise/Download
Unity3d Notes
----------------------------------------------------------------------------------------------------
If you don't use Unity3D, skip this chapter.
Currently supported export platforms are:
Standalone (Windows, OSx and Linux)
Web (Windows and MacOS)
iOS (needs iOS Pro Unity license)
Android (needs Android Pro Unity license)
Windows 8 Store and Phone
PS3, PS4 and XBox (certified developers should get in contact with us on demand)
As of v3.2.1.6 all Unity projects must use ExitGames.Client.Photon.Hashtable!
This provides compatibility with Win 8 RT and Win 8 Phone exports.
Add this to your code (at the beginning), to resolve the "ambiguous Hashtable" declaration:
using Hashtable = ExitGames.Client.Photon.Hashtable;
Web players do a policy-file request to port TCP 843 before they connect to a remote server.
The Photon Cloud and Server SDK will handle these requests.
If you host the server, open the additional "policy request" port: TCP 843. If you configure
your server applications, run "Policy Application" for webplayers.
How to add Photon to your Unity project:
1) Copy the Photon .dll into the "Assets\Plugins" folder of your project. Avoid dll duplicates!
2) Make sure to have the following line of code somewhere in your scripts, to run it in background:
Application.runInBackground = true; //without this Photon will loose connection if not focussed
3) Add "using Hashtable = ExitGames.Client.Photon.Hashtable;" to your scripts. Without quotation.
4) iOS build settings (Edit->Project Settings->Player)
"iPhone Stripping Level" to "Strip Bytecode" and use
"DotNet 2.0 subset".
If your project runs fine in IDE but fails on device, check the "DotNet 2.0 Subset" option!
5) Change the server address in the client. A default of "localhost:5055" won't work on device.
6) Implement OnApplicationQuit() and disconnect the client when the app stops.
Windows Phone Notes
----------------------------------------------------------------------------------------------------
To run demos on a smartphone or simulator, you need to setup your server's network address or
use the Photon Cloud.
We assume you run a Photon Server on the same development machine, so by default, our demos have a
address set to "127.0.0.1:5055" and use UDP.
Demos for LoadBalancing or the Cloud will be set to: "app.exitgamescloud.com:5055" and use UDP.
Search the code and replace those values to run the demos on your own servers or in a simulator.
The Peer.Connect() method is usually used to set the server's address.
A smartphone has it's own IP address, so 127.0.0.1 will contact the phone instead of the machine
that also runs Photon.
Xamarin Notes
----------------------------------------------------------------------------------------------------
Edit MainActivity.cs with your own AppId (approx. line 33). Read "Running Loadbalancing Demos".
Alternatively change the ServerAddress to a Photon Server you are hosting. Don't forget the ":port".
Our library dlls are fully Xamarin.iOS, Xamarin.Android and Xamarin.mac compatible,
but the projects to build them are not. So you can't reference the LoadBalancingApi project
directly.
Instead, we reference the dlls to minimize the number of projects to maintain and potential for
desaster.
The demo particle links directly to some of the source files of demo-particle-logic for similar
reasons.
Let us know if our workflow doesn't work for you.
Playstation Mobile Notes
----------------------------------------------------------------------------------------------------
The demo by default connects to the EU Photon Cloud servers. You only need to register to run your
own application (game) on it. This gives you the AppId which must be inserted into:
demo-particle-psm\AppMain.cs

Xbox One

ReadMe

Photon XB1 SDK
------------------------------------------
Please contact the console producer on additional setup information or required authorization.
Photon is the world's #1 independent networking engine and multiplayer platform — Fast, reliable, scalable.
Use the Photon SDK to easily add multiplayer to your games.
Run them in the global Photon Cloud or host your own Photon Servers.
Match your players to a shared game session (called "room") and transfer messages synchronously, in real-time, between connected players across platforms.
All client SDKs can interact with each other, no matter if iOS, Android, web, console or standalone.
Package Contents
------------------------------------------
/Chat-cpp - Photon Chat sources
/Common-cpp - common sources
/doc - Release history, API documentation
/LoadBalancing-cpp - Loadbalancing specific sources
/Photon-cpp - common Photon sources
/Demos
/demo_loadbalancing:
The demo client connects to a master server and shows how to create a room, join a random game and how to send and receive events within a running game.
Contact
------------------------------------------
To get in touch with other Photon developers and our engineers, visit our Developer Forum:
https://forum.photonengine.com
Keep yourself up to date following Exit Games on Twitter http://twitter.com/exitgames
and our blog at http://blog.photonengine.com/.

Server

ReadMe

Photon Server is a on-premises real-time socket server and cross platform multiplayer game development framework.
The framework is extremely fast and very simple to use.
Use the multiplayer API from Photon Server to join many players together in a shared game session.
Transfer data and messages synchronously, in real-time, between connected players across platforms.