The hardest question you've been asked in a while...

EDIT: I did some reading and found that the Python file writing and server access have been disabled in the Plugin to avoid it being used to propogate viruses and trojans. I guess a high score list using the plugin is not a possibility at the current time.

-Original question-
Well here it is. I’m trying to build an online high scores list for my Battle Balls web plugin game. There’s only one problem, though. I need a way to read from and overwrite the high score file on the server if this is going to work.

Is there a way that I can get a web plugin game to access external files server-side?

still a little n00bish in blender so I don’t know exactly how to answer your problem, but as a workaround you could save the score in some sort of encoded fashion in a cookie, then have the user click a submit score button which would take them to a URL which would read the cookie and decode it.

It’s not extremely secure - won’t work if somebody has cookies turned off or if somebody figures out your system but it might work for you if you can get around these problems.

Interesting idea, and it could work. It would be interesting to see how long until people figured out that the score was in the cookie and started manipulating it before submission…

To keep everyone updated, a MySql database was also suggested to me on the Python board. Apparently harkyman has used MySql with his Blender People script. I’m not sure I know enough to implement it, but we’ll see.

Any other suggestions are welcome.

MySql database would be the most reliable method IMO. Cookies are just too volatile.

To be perfectly honest, neither method will ensure a secure transfer, unless you write some sort of an encryption algorithm to go along with the whole process.

Although, even then that can be broken down.

Whatever you do, DO NOT use any kind of simple base level php, for a quickie score table solution. I mean all you need to crack that would be a packet capturing app (Etheral is my favorite), and some free time.

make your game save a file on c:\ (with rite file command) with the data you want then make the game work on it

No magic here. Use a usual CGI call to store the score in a server-side database, like any website does.

For additional fun, add some kind of hash to verify the authenticity of the score so that no fake highscores can be submitted easily.

I did some reading on the web plugin and found that Python file writing and calls to the server are disabled to avoid the Plugin being used as a virus or trojan. I guess a high score list using the plugin is not a possibility at the current time.

Perhaps you can have the encrypted score save to a file locally and then call it from the system somehow?