Open nrkn opened 8 years ago
I'm going to allow saving (a la JSFiddle) to a web service (via JAWS; Amazon's API Gateway + Lambda + S3), but my start will be with localstorage and it'll eventually persist to the web service. If we agree upon a "save" format for the source and it ends up as cheap as I think it'll be, I don't see a problem opening up that API for your app too.
I envision the save would look like:
{
"source": "...",
"level": { "type": "stock", "id": "1" },
// "level": { "type": "custom", "def": { /*hrm-level*/ } }
// reserved: top-level attributes starting with $
}
Sounds good! Another option might be using an oauth popup to give permission to post/retrieve from a user's cloud account, like Dropbox et al?
http://stackoverflow.com/questions/32961230/upload-blob-to-dropbox-from-client-side-javascript
Or to a gist?
A gist is an interesting idea, wonder if that is kosher with TOS?
Otherwise your feature list looks pretty good for the web emulator.
I think it is? Untrusted saves to gists:
Another option, use download attribute on an anchor to let them save a client generated json file, use HTML5 file api to load
Not widely supported yet :/
Implemented:
Looks good!
Implemented:
Pull & run solution that's passed in through the URL. e.g.:
http://nrkn.github.io/hrm-tools/emulator/#/hs/1/fc41e23f26bc4b2c9008818a2af1578a
Can pull solution for level 1 from URL:
http://atesgoral.github.io/hrm-solutions/data/1/fc41e23f26bc4b2c9008818a2af1578a.json
Or to be able to pull directly from client via JSONP:
http://atesgoral.github.io/hrm-solutions/data/1/fc41e23f26bc4b2c9008818a2af1578a.js
An index of all solutions is also published at:
http://atesgoral.github.io/hrm-solutions/data/index.json (or JSONP: http://atesgoral.github.io/hrm-solutions/data/index.js)
:+1:
hell yes
@atesgoral you've probably thought of this but it occurs to me that you can probably make inbox-generator match the game data just by looking at the exploit solutions?
I've been looking at the inboxes generated by the game to come up with the inbox schema that is used by hrm-level-inbox-generator for each level. I may have made certain things unnecessarily dynamic (like allowing the inbox to be 4-6 characters instead of a fixed 5, etc.). I haven't had a chance to do a second round of comparisons of my schemas against the game. I think just looking at the game and exiting/reentering levels to get different inboxes is easier than deciphering exploit solution, if I understood your recommendation correctly.
Implemented:
@atesgoral yep you're probably right about it being easier to just test against the game - that's what I did when I was trying to meet the pars!
Will be implementing load from hrm-solutions soon, and possibly also load from/save to gist?
Thoughts, ideas? @atesgoral @sixlettervariables