Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet write in serverfiles security isues?

 
Jacob Hansen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
We have made a small game which runs in an applet. We would like to add an hiscore-function, which, when your game over, checks to see if your score is good enough for the top-ten, and then enters that score, for instance in an arraylist in the server folder. Is this posible? I cant find away to read/write this information from the applet. Please help us!!
Thanks in advance!
Jacob
 
meera sood
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
u can try creating a URL connection to the server file. I tried it to read some information from a file on the server. It should be able to write to a server file also in the same way.
hope this helps...
meera
 
Tim Holloway
Saloon Keeper
Posts: 18362
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep. You need an application on the webserver to enter display/update the list of high scores and return the list back to the applet. You'd use HttpURLConnection to do that.
Of course, this being a game, I'd recommend that the actual data be obfuscated or encrypted, since otherwise someone will undoubtedly figure out how to manually connect and give themselves a bogus high score!
 
Jacob Hansen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both, for helping me out!
Just one more thing, should I use the standard Input/output stream on the socket connection?
(no need for encrypction, since this is just a part of our exams)
I would like to read the hiscore array into the applet, and let the applet calculate if the score is good enough, and if it is, it should update the hiscore array, and send it back(write/save) on the server. Am I on the right track?
Again, thank you very much!
Jacob
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right on the track
regular input output stream should do.
good luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic