RPG MAKER MV - Cross Platform Cloud Based Save System (Support thread)

Discussion in 'Javascript/Plugin Support' started by harvard1932, Oct 27, 2015.

  1. harvard1932

    harvard1932 Veteran Veteran

    Messages:
    40
    Likes Received:
    10
    Game demo: www.game.darkkyshadow.com

    Feel free to use "harvard1932" as the username or you can create one for your own at www.darkkyshadow.com 

    If you need help setting up your own cloud based save system, feel free to ask any questions :p I am here to help

    Also, I am providing hosting services for your game (not free) since I need to cut down the dedicated server cost :D

    Answered:

    First: Make a script within your game that  calls the following

    var xhttp = new XMLHttpRequest(); xhttp.open("POST", "checkuser.php", false); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send("username="+bpusername);

    xhttp.responseText <------- contains the returned data from the request! It is very important if you want to process the returned data within the game script!

    Sample of php receiver:

    <?php

     

    $currentversion=1.1;

     

     

    $version = $_POST['version'];

    $version = floatval($version);

    $beta = $_POST['beta'];

     

    if ($version<$currentversion){

    echo "Not up to date " . $version . " current version " . $currentversion;

    }

    else{

    //echo "Up to date " . $version . " current version " . $currentversion;

    echo "Up to date";

    }

     

    ?>

     

     

     

     

     

     

     

     

    Sample about SQL depends on your SQL database structure. 
     
    Last edited by a moderator: Oct 27, 2015
    #1
  2. kewitt

    kewitt Villager Member

    Messages:
    26
    Likes Received:
    5
    First Language:
    kewitt
    Would you be willing to share your code, and mySQL backend?

    I think this would be a useful tools.   

    I would want to take it another step with.  Email address and password.for login.

    I like the idea of being able to play on all platforms and just log in to recover saved file.
     
    #2
  3. harvard1932

    harvard1932 Veteran Veteran

    Messages:
    40
    Likes Received:
    10
    In order to make a functional cloud storage, you need to do things step by step :)   <--- That's why this is a "support thread" than a release thread.

    First: Make a script within your game that  calls the following

    var xhttp = new XMLHttpRequest(); xhttp.open("POST", "checkuser.php", false); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send("username="+bpusername);

    And replace checkuser.php with a URL that links to your post php handler. Test if you can send information from your game to the web server. This is the first step
     
    #3
  4. Kane Hart

    Kane Hart Elmlor.com Veteran

    Messages:
    656
    Likes Received:
    166
    Location:
    Barrie, Ontario, Canada
    First Language:
    English
    Would people not need php scripts and the sql table to use this though? It might be better you consider just making a release thread and posting the php code and sql table structure. From there most people who know how to use the 2 will be fine.

    It's very cool concept though I myself not interested in it at this time but I'm sure it be great for some the web based games. 
     
    #4
  5. harvard1932

    harvard1932 Veteran Veteran

    Messages:
    40
    Likes Received:
    10
    I have added the basic script for data transfer and a basic php request handler.

    As for sql, it is much more tricky to put a sample of. Because it differs from purpose to purpose
     
    #5
  6. Iavra

    Iavra Veteran Veteran

    Messages:
    1,797
    Likes Received:
    856
    First Language:
    German
    Well, it could be nice to provide an additional "cloud" save slot in your game, so the user can decide where they want to store their progress.
     
    #6
  7. harvard1932

    harvard1932 Veteran Veteran

    Messages:
    40
    Likes Received:
    10
    The reason for 1 save slot is to avoid players who decides to go "back in time" after they failed to get the "godly rare" weapon from "RNG" based chest xD     <----------- as dev for P1 of the game, I just had enough of that LOL.....Players literally spend hours to save and load save files after they didn't get what he wanted in chests.
     
    #7
  8. Iavra

    Iavra Veteran Veteran

    Messages:
    1,797
    Likes Received:
    856
    First Language:
    German
    Yeah, for online games that's fine, but since the game is running in a browser you won't be able to protected against cheating, anyway, unless you have the entire game logic running on a server and use JavaScript only to update game state.


    For simple single player games i don't see an issue with players reloading their save until they get what they want.
     
    #8
  9. harvard1932

    harvard1932 Veteran Veteran

    Messages:
    40
    Likes Received:
    10
    The game is just singleplayer + a little multiplayer. Even if a hacker can hack, the best they get out of doing is better highscore perhaps. And modern games doesn't have to run everything server sided to prevent hacking, there are always variable triggers that developers can set if hacker crosses the line. <--- thats because even MMORPG doesn't run everything on their server. They only keep inventory, character stats online mostly.

    And reloading save is game breaking for games with RNG elements <---- making a semi-impossible game to defeat xD
     
    Last edited by a moderator: Oct 28, 2015
    #9

Share This Page