Hello..I'll try to help as best I can.
I have a game out called Hairy Legs that tracks the top 50 scores. I'll explain how it works in game and what goes on behind the scenes.
The game tracks the top 5 scores locally. Every time you play it checks if your score is higher than one of the top 5 scores and if so, it arranges the scores accordingly. There is a High Scores button on the title screen. When you click on that it looks for the web server that hosts the scores. If it can not find it, it continues on to show you the top 5 local scores along with the option to reset them. It tracks their name and score. For a keyboard I made my own. Took a screenshot of the actual iOS keyboard and then used it along with checking the mx,my position on a mousestate check to get which key was pressed. May be an easier way, but at the time I didn't know of one. If the device does find the server it then uses netwebget to download a data.ini file that contains the data in the format of name and then the score underneath it. I use readline to read each line and assign it to a variable..example "HighScoreOneName$" for the player name and "HighScoreOne" for the actual score.
If it finds the server it adds a button to the options to Submit Scores. This will submit your top 5 local scores to the web server. Here is where you almost need to know some PHP. Really I was very much a novice at PHP, but doing some searching I found some great sites that cover everything you need. I used netwebget to submit the scores. The server looks at the top score on your local scores and checks if it should make the top 50. If not it does not even bother looking at the rest. If it does it looks at the others and then rearranges scores accordingly. Once it rearranges the scores it then rewrites the data file with the names and scores. After you submit your scores you can click on the global scores button and see the changes right away, because whenever you click on global scores it retrieves the data file each time so that it can get any updates. The server does not change your local scores. You can reset them, but they are stored on the device. Global scores are not stored on the device. You are simply looking at them when you are on the Internet.
Here were some of my hangups. Again I was very new to all of this and there maybe or probably is better ways of doing it.
How to get the keyboard to work- Ended up using mousestate to determine what key was pressed and then assign the appropriate letter to an array. I allowed for 13 characters within the array, so if a person entered say 6 characters I had to account for when they pressed enter to have it fill out the remaining 7 slots with spaces.
Speaking of spaces- Netwebget would not work with PHP sending spaces. So before I sent data to the server I had to use a replace command and replace all spaces with underscores. Then when the file is retrieved because the user presses Global Scores I would reverse the process and turn all underscores into spaces before showing them.
To do what I did you need a server with PHP. I had a domain name through one of these cheap places that offer a domain name and web space, so I just made a folder to contain the PHP program and the data file. If you can get access to a PHP server it is not that hard to figure out.
Hope this helps some.
I have a game out called Hairy Legs that tracks the top 50 scores. I'll explain how it works in game and what goes on behind the scenes.
The game tracks the top 5 scores locally. Every time you play it checks if your score is higher than one of the top 5 scores and if so, it arranges the scores accordingly. There is a High Scores button on the title screen. When you click on that it looks for the web server that hosts the scores. If it can not find it, it continues on to show you the top 5 local scores along with the option to reset them. It tracks their name and score. For a keyboard I made my own. Took a screenshot of the actual iOS keyboard and then used it along with checking the mx,my position on a mousestate check to get which key was pressed. May be an easier way, but at the time I didn't know of one. If the device does find the server it then uses netwebget to download a data.ini file that contains the data in the format of name and then the score underneath it. I use readline to read each line and assign it to a variable..example "HighScoreOneName$" for the player name and "HighScoreOne" for the actual score.
If it finds the server it adds a button to the options to Submit Scores. This will submit your top 5 local scores to the web server. Here is where you almost need to know some PHP. Really I was very much a novice at PHP, but doing some searching I found some great sites that cover everything you need. I used netwebget to submit the scores. The server looks at the top score on your local scores and checks if it should make the top 50. If not it does not even bother looking at the rest. If it does it looks at the others and then rearranges scores accordingly. Once it rearranges the scores it then rewrites the data file with the names and scores. After you submit your scores you can click on the global scores button and see the changes right away, because whenever you click on global scores it retrieves the data file each time so that it can get any updates. The server does not change your local scores. You can reset them, but they are stored on the device. Global scores are not stored on the device. You are simply looking at them when you are on the Internet.
Here were some of my hangups. Again I was very new to all of this and there maybe or probably is better ways of doing it.
How to get the keyboard to work- Ended up using mousestate to determine what key was pressed and then assign the appropriate letter to an array. I allowed for 13 characters within the array, so if a person entered say 6 characters I had to account for when they pressed enter to have it fill out the remaining 7 slots with spaces.
Speaking of spaces- Netwebget would not work with PHP sending spaces. So before I sent data to the server I had to use a replace command and replace all spaces with underscores. Then when the file is retrieved because the user presses Global Scores I would reverse the process and turn all underscores into spaces before showing them.
To do what I did you need a server with PHP. I had a domain name through one of these cheap places that offer a domain name and web space, so I just made a folder to contain the PHP program and the data file. If you can get access to a PHP server it is not that hard to figure out.
Hope this helps some.