Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Dropbox 2048 (site44.com)
26 points by leahculver on March 21, 2014 | hide | past | favorite | 25 comments


This is a great demonstration of a feature I didn't know existed—using Dropbox to save application-level data. I'm sure I'm just behind the curve, but there are probably a lot of us back here. Nice move, DB.


There's a few projects around the idea of not requiring a dynamic backend for webapps. The general term is "unhosted" (unhosted.org), and it mostly started as a reaction to the we-have-your-data-and-can-use-it-however-we-want websites. RemoteStorage.io is probably the most mature unhosted library, and there's a few other services listed on unhosted.org that are being actively working on.

I got attracted to this idea because it offers several security advantages. I've been working on a minimalistic javascript library (byoFS.com) that allows you to connect a Dropbox/Google Drive/etc. account and write automatically encrypted data to it. I tied for 2nd place at a recent privacy hackathon for making an encrypted chat application using only Dropbox accounts:

http://www.youtube.com/watch?v=WTPimUSIWbI


I was wondering why this wasn't working, I have DB blocked at my office. Actually I don't have blocked their datacenter's IPs, I've only have blocked dropbox.com domain, if the JS library was in another domain it would work for me..


I'm not particularly informed on this, but what makes this different then just hosting a text file and reading the text file? I wouldn't imagine anything needs to be specialized for this.


Because when you do it this way, you don't have to host the text file. This doesn't seem like a big deal when we're talking about 2048 saves, but a imagine a book reader or image editor.

I actually tried to do something like this for a Comic Book reader, but the Dropbox API didn't allow for file requests to be made through JS: http://rkuykendall.com/articles/web-slinger-comic-reader/


You should actually be able to use the full Dropbox API from JavaScript. See https://github.com/dropbox/dropbox-js and https://www.dropbox.com/developers/datastore/docs/js.


Ah, so it works for the full API but not the chooser? or have they fixed the content servers? This is what Dropbox Support originally told me when I contacted them about the problem:

> Thanks for writing in. It looks like the issue here is that our content servers (dl.dropbox.com) don't currently allow arbitrary cross domain access in JavaScript. (This doesn't apply to accessing the file directly in your browser, or downloading to your server locally, which is generally what one would do with the link returned by Chooser.) […] This is something that would need to be enabled on our side, so I'll be sure to pass this on as feedback.


I think I'm missing some context, but this probably isn't the right place to figure it out. Ping me on email (smarx@dropbox.com) if you want, though!


One of the big advantages (not really used in this sample) is conflict resolution. With a text file, if you make changes on two different devices while one (or both) is offline, you'd end up with a conflict and two versions of the text file.

With datastores, the changes are automatically merged according to developer-specified conflict resolution rules.


You can do it via Android apps too, not sure about iOS.


iOS, Android, JS, OS X, Python, or just plain ol' HTTP :)

http://dropbox.com/developers/datastore


keeping them coming, as I just started collecting all of these 2048 things here. http://2048.nerdspace.co/ it would be completed in a day or two, few are already listed.


Don't forget 2048 Numberwang: http://louhuang.com/2048-numberwang/


What software did you use to record your screen? It looks like you're using a Mac, and all the ones I find are only for Windows.




If you don't know already, /r/2048 exists.


Nice job, I actually prefer this colour scheme to the original.


Nice demonstration of a simple feature. 2048 could become the new TodoMVC (http://todomvc.com/).


Logging in to Dropbox kicked me out of my game, losing my progress. Is it possible to open the confirmation in a separate window or tab?


That's interesting, does anyone know from where in the Dropbox user interface such datastores and their contents can be accessed?


The blog post (https://www.dropbox.com/developers/blog/82/dropbox-2048-save...) links to it. Here's the direct link to see your datastores: https://www.dropbox.com/developers/apps/datastores.


Thanks for the information.

Interesting to note that the datastore isn't really deleted when one revokes Dropbox access to the app, even though it's no longer listed on the datastores page - relinking the app to Dropbox resurrects the previous data.


Somehow the blue is more soothing than the yellow/red that the original had.


And so we have 2048 with a corporate touch to it. What next? Microsoft(R) 2048(TM)? Apple i2048?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: