multi players game & database

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

multi players game & database

AppPop
2017-06-05 06:47:24

I am about to start a network game project with Unity & photon. Unfortunately I am new to network programming.
This game is about multi players fighting in the room and 10 clients at the most can join in. If you have more clients, then you need to make new room. And I'd like to manage clients info using database, such as id, status, items and so on.
PUN is for this kind of game, I guess. But how can I handle the clients info? I have some questions about this.

  • Can I make my own database (ex: php & MySQL) in Photon server?
  • Does Photon server support those tools? (ex: php & MySQL)
  • If so, what is the price for it (server hosting for database) ?
  • Does Photon already have database service which is easy for users to use ?
  • Does PUN support Login service thru FB / Google?

I think these are very basic and simple questions. But I am new and not familiar with English.
Please give me detailed answers. Thanks.

Comments

JohnTube
2017-06-05 11:01:35

Hi @AppPop,

Thank you for choosing Photon!

- Can I make my own database (ex: php & MySQL) in Photon server?
Yes you can but we usually recommend making a plugin that communicates with an external database via HTTP.
- Does Photon server support those tools? (ex: php & MySQL)
Yes. You can read this in Photon Server docs intro page at the very bottom.
- If so, what is the price for it (server hosting for database) ?
You need to look up this info on the service website.
- Does Photon already have database service which is easy for users to use ?
No.
- Does PUN support Login service thru FB / Google?
We support custom authentication using Facebook but not Google. You can make your own Google OAuth provider however.

AppPop
2017-06-07 01:25:07

@JohnTube mod: Thank you for quick reply. I will read the info you mentioned.
As for the price, I saw the Unity package plan (https://www.photonengine.com/en/PUN/Pricing#plan-20).
Is this price including server hosting for database or there is another page about price for server hosting?

JohnTube
2017-06-07 08:26:47

We do not offer any data persistence service so we do not charge you for any.
For Photon server hosting pricing please visit this page.

AppPop
2017-06-08 08:04:34

I'm a little confused. Let's say I want to run a multiplayer game which has 1,000 CCU a day and I will NOT have a database in Photon server. Do I need to pay $185 for PUN and $175 a month for License?

JohnTube
2017-06-08 09:10:42

Hi @AppPop,

If you host the servers yourself you need to pay the server license only.

Markus
2017-06-08 10:14:21

There seems to be some confusion about our services.

a) Photon Cloud (used by PUN e.g.)

  • $185 for 1000 ccu
  • We host the (game) servers
  • you can extend it somewhat with webhooks
  • for a database, you would need to use a 3rd party service (or host the DB yourself)
  • you can e.g. combine this with Playfab (https://playfab.com/)

b) Photon Server

  • $175 for per server with unlimited ccu
  • you host the game server
  • you can adjust the server code (and e.g. access any database that can be used from .NET/c#)
  • you could host the DB on the game server or use a 3rd party provider

c) Photon Enterprise Cloud

  • you need to get a quote for pricing
  • we host the servers
  • you can adjust server logic with plugins (and access a DB that way)
  • price point more for bigger projects
  • SLA, 24/7 NOC

AppPop
2017-06-09 00:59:24

Sorry to keep asking.
You said that I just pay for the License, no need to pay for PUN. But, according to your detailed info, I wonder if I should pay for PUN. Because my game is that many players get in the same room and fight together. And if I have more than 10 players. I need to make another room for them.
Am I wrong about Photon?
If so, can I use all the Photon networking features such as MatchMaking with Photon server license?
As you would know, the 1st reason why I want to go with Photon is that I'd like to program in easy way.

Markus
2017-06-09 07:40:23

I suggest to start with PUN + Playfab then.

AppPop
2017-06-10 02:22:41

@Markus: I've read Playfab's features. It looks like a Login server. It seems they offer database service about users' info. If I build user database myself, do I NOT need Playfab or it has something else that I need?
Sorry for too many questions. I just wanna make sure before I start.^^

OneManArmy
2017-06-10 16:29:12

No, Playfab is NOT required.

AppPop
2017-06-11 04:04:15

Thank you so much for your help.^^

Markus
2017-06-12 08:50:05

Well, if you host your own DB, you do not need a 3rd party provider for that, obviously.

If this is the first time building such a system, I would suggest to go with PUN and a 3rd party DB provider. If you cannot accomplish your goal with that, you can switch to hosting your own DB later on.

If Playfab has something else you need? Actually, you are the only one, who can answer that, depending on the features you want to support.

In the end, a lot depends on your goals, team size, experience etc. - for a starter "one-man-show" ... keep it simple.

Back to top