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 / Cant agk html5 apps write save files?

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 21st Aug 2019 10:06
Cant agk html5 apps write save files to the computer its being played on?

Using standard write and read commands on my html5 app and it dont seam to read or write ?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Aug 2019 11:34
I would have to say no. I think browsers and such are very wary of this, that's why they use cookies and such
I would have thought that the read and write commands would use that "cookie" area used by browsers though
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 21st Aug 2019 12:07
ide have to agree with blink No
but I would think it would try and write to the server and gain a heap of issues when doing so
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Aug 2019 12:58
Pretty sure that it was in the comments of the release of the version that included HTML5 exports that the FILE and HTTP commands would not work with HTML5 Exports.

Security is the issue there no doubt, with the permissions being some of the issues fubarpk mentioned.


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 21st Aug 2019 13:26
But why not add a cookie function for html5 games?

This would make agk ideal for html 5 games?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 21st Aug 2019 17:20
The HTTP commands DO work in HTML5. You can hit end-points for API control, send values for high scores etc. I even have games that grab client logo image files from the server, save those files locally, then load the images to use on my sprites in the HTML5 game. One thing that can be a headache is you need to have the correct headers set somewhere to allow Cross Origin Resource Sharing... I remember it being a pain to get right, and there are a few quirks you need to work around, but it is definitely possible in AppGameKit (I know, because I've done it).
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd Aug 2019 08:54 Edited at: 22nd Aug 2019 09:01
@CJB

COOL!

Either I was mistaken and thinking of something else that HTML5 exports can't do, or maybe he added that functionality after the initial inclusion of HTML5 exports.
Maybe it was just the OpenBrowser() command at that time; I can't remember exactly but I was sure it was something to do with the HTTP commands.

Great to know, because I have been wanting to play around with this, and if it can use the HTTP stuff to send high scores and grab images, then you could have a PHP script handling your files on the server.

Quote: "One thing that can be a headache is you need to have the correct headers set somewhere to allow Cross Origin Resource Sharing... I remember it being a pain to get right, and there are a few quirks you need to work around, but it is definitely possible in AppGameKit (I know, because I've done it)."

This would make a nice tutorial.

The grabbing images interests me for sure.
Being able to do this with the HTML5 builds would be very useful indeed.
I'll have to play around with this as soon as that Community Jam is finished, because I was thinking the HTML5 builds were more restricted than they are.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 24th Aug 2019 00:50
Been complaining about HTML5 data saving for years.
It never was fixed
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com

Login to post a reply

Server time is: 2024-11-22 16:50:20
Your offset time is: 2024-11-22 16:50:20