I’m trying to build an RPG for a mobile game (for Android and iOS) that will connect to a server that stores user info like items in inventory, character names, etc. The set up I’ve got now similar to the Server Side High Score Tutorial (unifycommunity.com) - basically, Unity connects to PHP scripts running on a Apache/MySQL/PHP server that access MySQL databases there. It’s pretty simple so I don’t need constant updates or state synchronization.
Before I really commit to this style though, is there a better or more secure way I should do this? Would using something like Photon, SmartFox, or maybe even a custom server have any significant advantages over this sort of client-server communication? Thanks for any input.
Photon and SmartFox are for synchronous communication; real-time multiplayer games. Web services are used for asynchronous communication; high score saving, login systems, etc. If your need is asynchronous, then it sounds like you’re doing exactly what you need with the php solution.
hi, i use x10hosting.com as my server and was able to connect my game to the server, when i run the game on unity i get to send the scores and the name of the player in to the database also i can also grab data from the server and the database and show it to the game. but when i install my game to an android device lets say a tablet, i get to send data from the game to the server but somehow the game won’t show the data from the server to the game… i don’t know if its just the device or the code is not applicable to mobile devices, but i am definitely sure its not the connection cause i get to access bot sending and retrieving of data from server to pc/ pc to server.
in short:
when using PC i get to send and retrieve data from the server database
but when using android devices i get to send data but it won’t retrieve data from the server databas.
i used the server side highscore from the unify community: link text
hi, i use zz.com.ve as my server and was able to connect my game to the server, when i run the game on unity i get to send the scores and the name of the player in to the database also i can also grab data from the server and the database and show it to the game. but when i install my game to an android device lets say a tablet, i get to send data from the game to the server but somehow the game won’t show the data from the server to the game… i don’t know if its just the device or the code is not applicable to mobile devices, but i am definitely sure its not the connection cause i get to access bot sending and retrieving of data from server to pc/ pc to server.