Jump to content
  • Advertisement
Sign in to follow this  

[java] High Score server

This topic is 4411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to make highscore table that will use my website for a server? or posibly MyJavaServer.com? Do they run little java apps on them allowing me to connect my game to it so i can send and receive high score data?

Share this post


Link to post
Share on other sites
Advertisement
You can create a Servlet that queries a database table (or any other means of persistence) and returns the result to the caller. In your game, you connect to your Servlet via the HttpConnection object, keep tracking of its InputStream to read data from it.

Son Of Cain

Share this post


Link to post
Share on other sites
I have been wondering about this too. Since I have an applet game that I'd like to add a highscores list to.

Though I don't believe that HttpConnection works within an applet loaded from the internet. I tried it once and got a Security Exception. I was going to attempt to use cgi or php to do it but haven't figured out a way to make the highscores list secure.

Even a script called from the Applet itself is easily hackable.

Share this post


Link to post
Share on other sites
I'm gonna look into that serverlet some more, I also thought of this during my pondering times.

1. the game will encypt the data with a custom algorthm, which can be and probuly will be defeated by a quick decompile. Then it would send it to a php page, which would do the database handling.

2. Then the game willl take a screenshot of the scoreing area, and upload it along with the scores, this way they can be compared for cheats, which could also be hacked, but that will make it harder.

Share this post


Link to post
Share on other sites
- 5MinuteGaming:

To do what you want, you may need to read this.

- OP:

I don't understand your need for encryption; If you're sending data through the streams, that'd be hard to capture, and also, you could encrypt it with your own protocol and decrypt it on servlet side. Also, there's no need for the PHP layer, if you're already using a servlet, why not let it also query the database? Just my opinion though, YMMV.

Share this post


Link to post
Share on other sites
you probably want to use some sort of Web Service paradigm. You're application would make a HTTP Request to the Web Service, just as a normal web browser would make of any website. That way, your implementation of the High Score Server is completely independant of the game itself. You could write the game in Java and the score tracker in PHP, Perl, or any other server-side language.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!