Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / persistence data on html5?

Author
Message
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 27th Dec 2018 06:42 Edited at: 27th Dec 2018 06:43
How do you create and store data on html5?
I tried opentowrite, it seems not to be permanent?
Does it use html storage?
Store information such as login salt.

I tried raw:C:/folder/file.txt
but it did not work either.

Any solution?
puzzler2018
User Banned
Posted: 27th Dec 2018 18:45
What OS are you using?

raw:c:/folder/file.txt looks like its Windows but the format file dirctory path for windows is

raw:c:\folder\file.txt


blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 27th Dec 2018 22:50 Edited at: 27th Dec 2018 22:51
I think you might need to save your data on the server and use PHP to embed the values in the url
If you google "html high score table" you should get some good information on saving data on the server
puzzler2018
User Banned
Posted: 27th Dec 2018 22:53
Wow - "high score table" - thats what exact words i created in a sample PIC on another thread - Are you phsycic lmao
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 27th Dec 2018 22:56
HaHa. Lemme just get my crystal ball
puzzler2018
User Banned
Posted: 27th Dec 2018 22:57
Lemme - Is that short for Lemmings.... Im on it.... LMAO
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 28th Dec 2018 04:28 Edited at: 28th Dec 2018 04:39
I tried \ and / and none work.
Also, I need the client to store data for login.
I do not want guest highscore.

Like PHP, there is no way to get user to login every page refresh, so session salt must be store by the client.

Getting player to login every time the game load might be an option, but it is just annoying.

The other way is that agk has a way for javascript to pass information to the game app itself.
Or access a javascript function from within app and store that information that was return.
Unity3d has this function.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 28th Dec 2018 08:05
Have you setup a server?
Have you installed PHP?
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 31st Dec 2018 04:05 Edited at: 31st Dec 2018 13:01
The desktop version works...(F5)
Basically we can use google for minor issue...\

getting current directory and write directory just show "/"

If there is a way to pass session information from browser, have the app confirm and auto refresh session salt, and that would be better!
This way, there is no need for persistence data requirement as the rest could be gotten with http.
Also, gethttpstatuscode for html5 does not work... a bug?

As a developer, could you check it out?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 1st Jan 2019 14:01
Quote: "is a way to pass session information from browser, have the app confirm and auto refresh session salt"


Yes, use sessions : https://www.w3schools.com/php/php_sessions.asp
Chmava
11
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 4th Jan 2019 08:24 Edited at: 4th Jan 2019 08:31
Let's just say that that has nothing to do with agk or its client...

Pass the current session data, the current php page load session.
Perhaps it would be better to say the current php page load data information for the client to pick up.

Basically, everything on this page: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html

OR

https://www.w3schools.com/html/html5_webstorage.asp

Login to post a reply

Server time is: 2024-11-23 08:37:08
Your offset time is: 2024-11-23 08:37:08