Announcement

Collapse
No announcement yet.

Storing things in a database.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Wow that's amazing stuff, simple too. That definitely does help out quite a bit. Thanks, and you're English is fine. ;]

    Leave a comment:


  • replied
    Maybe this is going useful for what you are trying to do.
    Using This JSON Plugin from Stefander and this example you can maybe do what you want to do.
    This is my level blueprint where i have an example of comunication between unreal and php with JSON
    Click image for larger version

Name:	Blueprint.PNG
Views:	1
Size:	199.5 KB
ID:	1066571
    And this is the code i have in my json.php
    Code:
    <?php
    //with this i get the POST from UE4
    $data_back = json_decode(file_get_contents('php://input')); 
    //And with this you can get specific fields from the JSON, in this case i get "DataFromUE4"
    file_put_contents("C:xampp\htdocs\PHPIntellyAPK\json.txt", $data_back->DataFromUE4);
    //With this final code y print the JSON is going to recive UE4
    //in this case its a simple static answer but you can now add a lot of stuff for specific answers
    //like if the post data from UE4 in his "DataFromUE4" have the value "WhatHatIHave" php is going to check in the DB and
    //see what hat the user have and the final answer is going in the echo "UE4 is awsome" place
    echo '{
    "json_answer" : "UE4 its awsome"
    }';
    ?>
    Sorry for my bad english, if you don't understand something tell me and i going to try to write it beter.

    Leave a comment:


  • replied
    I was exploring the latter. Storing things on a remote database for a persistent multi-player game. I found the JSON plug in and that looks very useful for what I'm trying to accomplish. I have very limited experience with php though, would this be a complex topic to cover in php? I'm no stranger to programming though. I might just setup an httpserver in Python.
    Last edited by Winfree; 02-16-2015, 03:02 PM.

    Leave a comment:


  • replied
    Are you loking for local DB or server DB? If you are loking for local DB, structs + savegame, and if you are looking for server DB using blueprints you can pick a look to json to get and send information to php, and php to DB.

    Leave a comment:


  • replied
    Structs + savegame instance are awesome.

    Leave a comment:


  • started a topic Storing things in a database.

    Storing things in a database.

    Is there any blueprint support for storing information in a database, such as player name, inventory, position, ect.?
Working...
X