View Issue Details

IDProjectCategoryView StatusLast Update
0029896RunnerHTML5Public2018-08-13 14:15
ReporterStewart BishopAssigned ToMike Dailly 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionNo Change Required 
PlatformHTML5OSOS Version
Product Version2.1.5 
Target VersionFixed in Version 
Summary0029896: HTML5: buffer_save() and then sprite_add() silently fails because the browser's localstorage stops this
DescriptionI'm trying to load a base64-encoded image to the game via decoding the base64 string to a buffer, saving it as a .png file and then loading via sprite_add. It works on windows, but on HTML5 it seems like buffer_save silently fails since there is a 404/Not Found message in browser's console log after attempting to load recently saved image back.
Steps To Reproduce1) Run the sample on HTML5
2) Click anywhere
3) See it fails
TagsNo tags attached.
1.4 Found In
2.x Runtime Found In2.1.5.246
2.x Runtime Verified In

Activities

Stewart Bishop

2018-08-09 16:35

Adminstrator  

buffersavebug.yyz (44,696 bytes)

Mike Dailly

2018-08-10 08:44

Manager   ~0061139

Sorry, not a bug.

In HTML5 you can't "save" to a server, as the server needs special upload code, and this is server (and game) specific. Buffer save will go to HTML5 "localstorage" (which each browser has it's own instance of), but even then you can not load a PNG file from localstorage, as these can only come a webserver.

You "could" save a RAW buffer (an X by Y, ARGB byte buffer that's then base 64 encoded, then copy that buffer onto a surface, and then make a sprite from that.

but as it stands, this isn't a bug due to HTML5 limitations.