Hello. I wrote the code for a puzzle game. It's written in a notebook that I would like to share on the internet:
game[] :=
Dynamic[DynamicModule[{pt = {0, 0}},
Magnify[EventHandler[
ClickPane[Dynamic@Graphics[display[]], (pt = #) &],
{"MouseClicked" :> clicks$manager[pt[[1]], pt[[2]]]}], 7]]];
display[] calls a Graphics[...] user interface. There is a
{background$color,Rectangle[{0,0},{1024,1024}]}
background and images appear in top of it. clicks$manager[x,y]
triggers actions depending on what is currently displayed by the UI. game[]
is the single-line input I shift-enter to begin playing the game.
When I shift-enter the code, the game imports the images that will be used by the UI from "path/images/image01.jpg", "path/images/image02.jpg", ... . All images a stored on my computer.
The game is single player: one vs the AI. The AI has a few difficulty levels. One level calls a log of all the previous games to be able to pick the best decisions. This database is actually only a table written in a log.txt file stored on my computer. At the end of each game, the log is exported to "path/log/log.txt". At the beginning of each game, log.txt is imported from "path/log/log.txt"
My question is from that point, what do I need to do to share this game on the internet? I'd like to have a webpage that starts to display the UI at once. I consider webmathematica to let anyone, not only Mathematica users, have access to my UI. Is that the only option? If yes, where will I put the notebook, the images and the log.txt that the game requires? What modification will I have to make to the code? Am I sure that I will be the only one to have access to the log.txt file? Are there examples of websites for puzzle games made by amateurs that are powered by webmathematica? (I googled it but I can only find www.wolfram.com pages)
Thank you.