Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Potatobob · Mar 16, 2016 at 12:38 PM · multiplayerphpmatchmaking

Can I use php as matchmaking server ?

Hi, I would like to know if you think this is possible and get your suggestions.

I have a game in development and I am thinking of a multiplayer for 1v1 sessions with people joining as soon as someone else looks for a game.

My idea to CUT OFF the cost of a matchmaking server by using php myadmin instead.

I think this have been done in the past but I can't find where.

I do not need to save the player information yet and I will have less then 30 players for the development phase so I think php would be a good free alternative for a while, what do you thing?


My Idea is that in Unity the player would actually hit the button matchmaking and get a response from php myadmin real quickly.

The php page would return a string that either contains a player server information OR nothing.

  • If there are some player information it means a server is running, this way the player is sent in the already hosted game and begin playing.

  • If there are no player information the player host a game and calls back the php page to SET the string using his hosted server information.


Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by phil_me_up · Mar 16, 2016 at 02:01 PM

To be clear, PHP is the language, PHP MyAdmin is a system written in PHP and used to manage a MySQL database - two VERY different things.

Could you do it? Yep! Should you do it? Sure, give it a try! Would I do it? Only after a lot of testing to prove it's appropriate.

If you want to go down this route then you will really want to look at efficiecy. Consider using NodeJS rather than PHP where possible, and you might want to look at using a NoSQL database like MongoDB rather than MySQL.

This does of course depend on what you're doing / how much load you expect to see etc but I will say this one, very important thing: Maintaining web services is time consuming! You might find that you set it up and never have to touch the system again! Brilliant but there will still be costs involved to host the servers and maintenance to those severs to keep them secure and efficient. If you get loads of traffic, without a suitable scaling plan your sever might fall over and appear 'broken' to the players, so you need to be ready for that.

Cost wise, take a look at the AWS free tier, or the Azure BizSpark program. Both might cover your needs and give you a more stable, feature rich system.

Bottom line, feel free to try. It's certainly possible but it's not necessarily the technology I'd use.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by _Mathias · Jul 10, 2017 at 12:34 AM

Hello ! Phil_me_up explained important things very clearly. I'm currently developing a multiplayer game using this kind lf multiplayer system: I get player position, rotation, username through php and MySQL. My game isn't done yet but I tried out my system on local network then over the internet and both work pretty well ! You don't really have to care about traffic since responses from the server will be only about a KB. The most important thing is server latency to ensure a smooth game. Even when we were 10 players connected in the same room the request was only about 500B. I don't know how many times per second you have to check the server, but that's also a thing you need to think about. Just an important point: I used a "click to move" system so checking the server 5 times per second is enough. Depending on how many requests a player sends to the server in one second the server load can rise as the bandwitdth usage. Experiment, but keep in mind that TCP is slower than UDP so you have to limit the amount of informations to pass through your system to avoid a too big latency in your multiplayer system. Good luck !

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I use Gamecenter to match-make on iOS? 0 Answers

Is unity multiplayer matchmaking paid? 1 Answer

How do i disable multiplayer to free up ccu? 1 Answer

can i use unity and php to develop a multi player game 2 Answers

Player duplication when testing on android mobile Matchmaker system 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges