- Home /
can i use unity and php to develop a multi player game
hi all at first im sorry for my awful English i want to develop a multi-player game can i use php to sync players? for example if any player moves then c# send a json to php script and php send info to another device to move the object thanks for your answers
Answer by ctalystnetwork · Jun 29, 2017 at 05:15 PM
Hi,
Absolutely.
This can can be accomplished by using the built in JSON serializer you can then send and receive the data through the WWWForm class. You're just going to have to make sure your headers are properly configured for the WWWForm and that you are serializing and deserializing appropriately.
Answer by kkakaei · Jun 29, 2017 at 05:35 PM
i should send hit to server every quarter second to get and write updates?
Hi,
If you want a periodic request every 'quarter second', then I guess you should take approach of StartCoroutine. In the Coroutine you can make the request using some sort of timer delayed loop. This loop will fire the request every quarter second. Just make sure you $$anonymous$$imize the latency on your server side.