Author Topic: BIG THANKS and high scores over Internet  (Read 1845 times)

Offline ggindlesperger

  • Mr. Drawsprite
  • **
  • Posts: 63
    • View Profile
First off I need to give a big thanks to all the people who have helped out on these boards. A big thanks to Gernot for a quality product. I really appreciate the help and quick responses I have received on these boards. OK..the thank yous may not be appropriate for this forum so I will get to the part that is :)

Myself and some friends put together a game called Hairy Legs. I know it sounds gross but is fun and addicting if you get caught up in the whole high score thing. We initially released it 3 weeks ago without global scores. In the time it took to approves it, I managed to get global high scores working. On Tuesday of this week the update was approved. I know in a post I started awhile back about this topic some folks wondered if they would approve the app sending and receiving using PHP. That is exactly what this does. In a nutshell here is what happens.

You go into scores and it checks for an Internet connection. If you have an internet connection it enables global scores. It downloads a file with the names and scores. The PHP server handles the arrannging of the scores. If you want to submit your local scores you go to Options and press Submit. It then uses Netwebget to submit all 5 local scores. The server reads them and compares to see if and where you should be in the ratings. The server does any rearranging of names and scores and then rewrites the file with the updated data. On the iDevice it reloads the file to reflect the changes the server made so you can immediately see the results. That is how it works and it is approved and up for sale. Another little trick I added was that every high score submitted is texted to my cell phone so if anything in inappropriate is sent I can change it or delete it. This is handled through the server and not the iDevice. I do not know if that helped in approval or not. One other thing it does is I have a text file it loads and scrolls across the top of the global  scores screen. This way I can get messages to the player about events or changes. I have the PHP server doing all the work. All the iDevice is does is read the files and submits the scores and names. This way I can make changes without needing to update the version of the game.

Thanks again,
Gary

Offline Leginus

  • Dr. Type
  • ****
  • Posts: 288
    • View Profile
Re: BIG THANKS and high scores over Internet
« Reply #1 on: 2010-Oct-14 »
Excellent news and thanks for detailed explanantion, as i was one of the ones who wasnt sure on apples stance. congratulations on your approval. 

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: BIG THANKS and high scores over Internet
« Reply #2 on: 2010-Oct-14 »
We have been doing something similar at work the last six months now, downloading from php-scripts and displaying data on an iPhone app (and Android too for that matter, much less fuss there it seems :-) Sadly the programmer decided it was good to download all the data at once even though only a small set was needed so each user has to download about 500 kB before the app starts... On the other hand it's fast after that :-)

Offline Gary

  • Dr. Type
  • ****
  • Posts: 313
    • View Profile
Re: BIG THANKS and high scores over Internet
« Reply #3 on: 2010-Oct-14 »
The bit that really interested me is how you are getting your server to send you text messages? Any chance of sharing how you do that?

Thanks
Gary

Offline ggindlesperger

  • Mr. Drawsprite
  • **
  • Posts: 63
    • View Profile
Re: BIG THANKS and high scores over Internet
« Reply #4 on: 2010-Oct-15 »
To get it to email I just use the following command whenever a high scores is submitted :

mail ("YOUR EMAIL ADDRESS OR TEXT ADDRESS", "Score Update",$_GET[name]);
If you are unfamilar with this command, "Score Update" is the subject of the mail/text I receive and $_GET[name] is telling it to get the value of the variable name, which holds the players name that was submitted from the iDevice.


I am using IF statements to compares the scores. When someone gets a score that is a high score it has to adjust all the scores below. For example if the submitted score ranks 5th plac, then the old 5th place moves to 6th and so on and so forth. Within the routine that moves the scores around I include this to email/text me the name that was submited. Then if someone does something really inappropriate I can change it. The server does try to catch bad words and common ways of spelling them, but it can not get all of them.

Hope that helps you

Offline Moebius

  • Dr. Type
  • ****
  • Posts: 315
    • View Profile
Re: BIG THANKS and high scores over Internet
« Reply #5 on: 2010-Oct-15 »
Great to hear everything's approved and working.  Hopefully you'll get spammed with emails  :)
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary