Menu

need better instructions for web install

mike welsh
2017-03-09
2017-03-09
  • mike welsh

    mike welsh - 2017-03-09

    having problems installing script. Can play ai on my pc , but tried to install on server .the ai works and 2 person on the same pc works but how do you get it to play a friend across the internet.the Read Me says * Configure "log stats" at the top of the "bin.js" file to output the static exchange stats to the console.

    (Keep "log stats" set to false on the "binCpu.js" file.) ok so how ? & what goes in here if anything.Im new at scripts so some help would be welcome ... thanks ... Mike

     

    Last edit: mike welsh 2017-03-23
    • alhambra1

      alhambra1 - 2017-03-09

      Hi Mike,

      Thank you for checking it out! I've been too busy to maintain the project. To set up a two player game, using the current version of the code, you would need to have a php server and mysql database to save the game state, then adapt the file, 'server.php' (and possibly its connection in the JS files) to suit your backend. (Alternatively, you could makeup your own.) While I like the UI on this one, there are much better working JavaScript AI's out there, however.

       

      Last edit: alhambra1 2017-03-09
      • mike welsh

        mike welsh - 2017-03-10

        Hi alhambra1 .I have created a data base for it & have the server php set up .like I said I'm new at this ... So how do I play a friend? / any mode it has to be in or do the extra htmls have anything to do with it ? I'm just happy its up doing what its doing .I hav'nt beat the Ai yet.Ill keep playing with it see what I can figure out. Thanks Mike.

         

        Last edit: mike welsh 2017-03-10
        • alhambra1

          alhambra1 - 2017-03-10

          Hi Mike,

          It looks like the way I had it set up was very simple - if you click 'save', then there's a JS post to the server to save the game. But you would have to advise your partner that you made a move and then if they refresh, their page will automatically load any saved game state. If you'd like multiple games and/or realtime gameplay, you will need to code those features yourself.

           

          Last edit: alhambra1 2017-03-10

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.