x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Storing Items in SQL Database usefull?

I am looking for the best way (Network & Security wise) to store Items from an inventory for example. The following idea came to my mind: Storing all the Items a Player has in a SQL Database running on a Server. So every time a player opens up the Inventory it would request all the items a Player has and fill the Inventory accordingly. Regarding Security issues this attempt would be rather safe. I am wondering if it makes sense to always contact the SQL Server when requesting Items. From a Network perspective it would be a lot traffic back and forth. Furthermore the Items could not be requested in time when there is a bad Internet Connection, this would result in an empty Inventory for a few MS / sec.

So is my attempt rather right or wrong? If wrong, how could I archive a balanced solution (Network & Security wise)?

Thanks in advance!

Product Version: UE 4.15
Tags:
more ▼

asked May 14 '17 at 10:39 AM in Using UE4

avatar image

dasschlumpf
28 3 4 6

avatar image dasschlumpf May 21 '17 at 08:45 PM

Does anyone have a tip on how to to this?

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Would it make more sense to get items from the Database when loading your player / starting a game but then hold onto a local copy? That way you can avoid having repeated calls to get the same set of items. If the player inventory changes you could update the database but probably wouldn't have to copy over the entire thing. The SQL copy would still exist as the 'master' copy if you needed to check if the inventory items are still valid.

more ▼

answered May 21 '17 at 09:05 PM

avatar image

Mistress Lillith
221 4 7 17

(comments are locked)
10|2000 characters needed characters left

SQL server should not be accessed direcly as it's very insecure, user would have access to data that it should not access for example. Most common practice is to use HTTP or other request protocol as a gateway access database data, appications make HTTP authntication and request and HTTP server chacks if user can access this data, access database to grab that data and then send that data back to user, same as typical scripted websites do, just insted of sending generated HTML, you only send back data in some data friendly format like JSON or XML

more ▼

answered May 21 '17 at 10:15 PM

avatar image

Shadowriver
35.2k 921 166 1098

avatar image Nachtmahr May 21 '17 at 11:28 PM

Or only Request from Dedicated Server and strip out any Code from the Client Version. Shadows Solution is fine if the Client is also the Server but than again cheating is pretty easy since the HTTP Server has no clue how to verify Actions made by the Game Server (Client can send what he wants) he does not know about ^^

(See Borderlands as Example, no dedicated Servers enables easy cheating)

avatar image Shadowriver May 21 '17 at 11:35 PM

He didn't explain how his game work, so i answered his question directly. If game host run on server then the game server should access SQL, SQL readings will naturally sync up with client via replication.

(comments are locked)
10|2000 characters needed characters left

Thanks a lot! That was helpfull :)

more ▼

answered May 29 '17 at 06:34 PM

avatar image

dasschlumpf
28 3 4 6

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question