New app/game: 2048

13 views
Skip to first unread message

Jake W

unread,
Feb 21, 2022, 4:10:25 AM2/21/22
to Sandstorm Development
So Wordle has had me annoyed about web apps relying on localStorage, and it got me fiddling with getting a web game fixed up for Sandstorm. Being open source, 2048 is always a good go-to, and in this case, another developer had already done some of the work to make this possible. So I created a rudimentary backend with the LESP stack for 2048 to store game state and high scores in Sandstorm.


Note that unlike the traditional 2048, you can resume your game on any device, and your high score persists to all of the devices you play from! Furthermore, it was trivial on Sandstorm to do this in a user-specific fashion, so I was also able to implement a rudimentary high score list, so you can also compete with friends.

I have a sample grain for the Sandstorm community to play here: https://ocdhost.sandcats.io:6080/shared/LyZRyvslE6Y_LQrSwqxxzYQXoPDMJY3YoyE5ybC8jsT

Note that one caveat is that while playing anonymously works, users will experience issues if multiple people try to play anonymously at once: The app considers "Anonymous" a single user, and will sync game state across anyone trying to play, in a manner that will likely cause players to clobber each other. For what it's worth, I think this is not a large problem: People who want to play 2048 anonymously can play the client-only version or their own private Sandstorm grain of the app.
Reply all
Reply to author
Forward
0 new messages