Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Users save data to server
Started by Odisej Jun 29 2019 11:02 AM

- - - - -
10 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Odisej

[GLOBAL: userInfoPane.html]
Odisej
  • Enthusiast

  • 91 posts
  • Corona SDK

Hi,

I'll try to be as specific with my question as I can even though I know I'll fail:)

There is all the info I need about network download, about json or maybe sql, there is even AWS plugin I am thinking about using and yet I failed to find how one would save securely and require user generated content, so that the user could really download and access just the info relevant to him/her - and maybe have the option to share it to specific user.

I am cooking up an idea for an app and I wonder how one would go about this:
The app would ask users to sign in (if they would want to access their data in case they loose or change their phones), the data the app would collect is text and numbers. Do I save specific json file for every user or do I make some kind of sql matrics with Ids and passwords - If so, how do I download just specific entry? How can users than access the data if it's stored on AWS?

I know DEVELEPHANT is a Corona/Lua master for this sort of things, but I strugle to understand his plugins or if they are applicable in this case.

I know they are basic questions, but I couldn't find any beginner tutorials about this.
Thank you for your help.

[TOPIC: post.html]
#2

bamazy

[GLOBAL: userInfoPane.html]
bamazy
  • Contributor

  • 146 posts
  • Corona SDK

Hi,

 

I don't know if I understand you well but as far as I understand from your question, you need to implement API on your server in order to let a user get his/her data whenever he/she signs in.

 

You have texts and numbers on your server indicating which username and password they belong to. When a user signs in, you send a request to the API, and let the API know which user's data it should send you back. You can store your data on AWS, and implement the API on AWS. Every time you send request to the API to send you the texts and numbers back, you will have to have the user sign in and send the user's indicator (user id) so that the API knows which user's texts and numbers to send you back. 

 

I do apologize if I misunderstood your question and wrote irrelative answer. 



[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

Develephants plugins do apply to this question, but this isn't really a beginners topic, so you won't find beginner tuts. That said, the last time I looked, his tuts were pretty good.

 

The approach I'd take is:

  • Make your game using local only data.
  • Do some tiny test projects to learn how to create connections to some server service and start to understand this concept.
  • Take your learnings from the above and convert your 'local data game code' to remote data code.

 

PS - To anyone reading this who can suggest specific services/options, please provide links for the OP.

 

Develephant's plugins on marketplace:

https://marketplace.coronalabs.com/vendor/develephant

 

Coronium Core Page: https://www.develephant.com/

 

PPS - If I read your post correctly, SkyTable sound like the right fit for you.



[TOPIC: post.html]
#4

Odisej

[GLOBAL: userInfoPane.html]
Odisej
  • Enthusiast

  • 91 posts
  • Corona SDK

Yes, bamazy, that is pretty much what I would want for this.
Thank you @roaminggamer, I agree with everything you said. I also see skytable as a possible solution. The thing with Develephant tuts on plugins is - or maybe it's just me... you can get pretty detailed instructions how to set up and all, but very few info of what and how it's practical usage would be - I would like to see some more - if you want to do that, do it like this kind of tuts from him.
Thank you.

[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

It isn't just you.  Develephant does give some examples of usage, but he does for the most part leave it up to you to choose how to use his content.   

 

From my own experience re: trying to make examples, it is very hard to get into the mind of end-users, and far easier to give a general example instead.  



[TOPIC: post.html]
#6

Odisej

[GLOBAL: userInfoPane.html]
Odisej
  • Enthusiast

  • 91 posts
  • Corona SDK

Having said that...this is pretty good: https://develephant.github.io/coronium-skytable-docs/guide/#getting-started

I guess I need to learn how to set up skytable now:)

[TOPIC: post.html]
#7

Odisej

[GLOBAL: userInfoPane.html]
Odisej
  • Enthusiast

  • 91 posts
  • Corona SDK

Yes,@roaminggamer while we are on a subject of tuts...your answers here, your input on corona geek hangouts and your github are all a goldmine for learning. You should use your templates and create one of a kind corona/lua tutorial series for beginners - just a thought... I'd buy something like that:)

[TOPIC: post.html]
#8

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,197 posts
  • Corona SDK

Personally I would use playfab for this.  They have a free indie tier as well.

 

https://api.playfab.com/docs/getting-started/corona-getting-started-guide



[TOPIC: post.html]
#9

Odisej

[GLOBAL: userInfoPane.html]
Odisej
  • Enthusiast

  • 91 posts
  • Corona SDK

Thanks, SGS, it looks to me playfab is a bit overkill for me. Do you recommend it because of being perhaps more future proof or smth else?

I am on vacation now and I have only looked at the docs on a phone, but it looks somewhat more complicated to me then skytable. I could be wrong.

[TOPIC: post.html]
#10

Odisej

[GLOBAL: userInfoPane.html]
Odisej
  • Enthusiast

  • 91 posts
  • Corona SDK

I am grateful to roaminggamer and sgs and I am sorry to keep pushing with this question - I have searched this forum for related questions and I got all kinds of answers from doing it on my own with json network download and some kind of php login gatekeeper, to gamesparks and playfab to skytable.

I would love to get some best practises from the experienced pros, I am sure many of you have implemented smth if you needed to store player stats or other data on a server and keep each player's data private to other players. In my case each user would upload a relatively simple lua table, that he/she would update every so often.

[TOPIC: post.html]
#11

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,197 posts
  • Corona SDK

Personally, I use a bespoke backend running on my servers.  I store both JSON and relational data in a MySQL database.  I have written a secure API that my games access via https.

 

But it all depends on what level you are and how much you need to scale.

 

You could probably store simple JSON on any "free host" and move to a paid solution if your app/games scales.




[topic_controls]
[/topic_controls]