Online Crumble

18 views
Skip to first unread message

Adam Sandstedt

unread,
Jan 12, 2021, 11:03:02 PM1/12/21
to Crumble
Hey everyone, I thought it would be cool to be able to play crumble online with other people, so I've been working on a website. I have the game logic working but I haven't gotten around to online games yet. However, you can play a local two player game (pretty similar to the java version) in the browser. You can find it at crumble-online.com. I've tested it a bit but I'd love for you all to try it out and let me know if you find any bugs or if you have any suggestions to make it easier to use

Zack Brown

unread,
Jan 13, 2021, 3:32:30 AM1/13/21
to cru...@googlegroups.com
On Wed, Jan 13, 2021 at 5:03 AM Adam Sandstedt <adam.sa...@gmail.com> wrote:
Hey everyone, I thought it would be cool to be able to play crumble online with other people, so I've been working on a website. I have the game logic working but I haven't gotten around to online games yet. However, you can play a local two player game (pretty similar to the java version) in the browser. You can find it at crumble-online.com. I've tested it a bit but I'd love for you all to try it out and let me know if you find any bugs or if you have any suggestions to make it easier to use

Whoa! This looks excellent so far! I had no trouble creating an account and playing a local game. The only issue I had was, during a player's turn, the UI changed behavior when the player swapped into a winning position before they finished their turn. The win should only be revealed after the player clicks "End Turn", to give them the option of making a mistake and swapping right through the winning condition without realizing it.

Suggestions:
* reloading the page should preserve the ongoing game, preferably even preserving the state of the current turn.
* there should be a way to stop in the middle of a turn and start the turn over

Very, very cool. Looking forward to the online feature when it's ready.

Be well,
Zack
 

--
You received this message because you are subscribed to the Google Groups "Crumble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crumble+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crumble/e41ca6a2-d4cb-4b49-b885-5b478cd7a4ffn%40googlegroups.com.


--
Zack Brown

Zack Brown

unread,
Jan 14, 2021, 4:45:43 AM1/14/21
to cru...@googlegroups.com
Hi Adam,

I've been trying the site out a bit more and enjoying it!

I've also got a couple more suggestions:

But first, I think my earlier issue was wrong or incomplete. I said players should be allowed to swap right through the winning condition, allowing them to make that mistake. I do think that should be the default, but there should also be a config option to force the win in that situation. The reason is that for beginners who are just learning crumble, it would be better for them to struggle a little more to be able to identify the winning condition, even during official tournaments. More advanced players would want to use the official rule, which is that if you swap through the winning condition (for either player), the win stands. And official tournaments for more advanced players would probably choose to use that config option too.

Suggestions:
* In supporting long splits, you currently allow the user to click first on the edge of one piece, and then on the far piece that defines the long split. But this also means that in the most common case (splitting just a single piece), the user must click first on that piece to split it, then again on the same piece to lock it in and move on to the swap phase, and then a third time to actually swap. That's essentially a wasted click. An improvement might be that when the user clicks on a piece to split it, if they then click on the same piece, it means they are selecting which half of the two split pieces they want to swap.
* This one relates to my earlier suggestion of enabling starting a turn again from the beginning: it might even be better to allow a step-by-step undo/redo of the steps of the current turn. So, if I start doing a long swap, it's possible I could get lost and want to start over rather than retrace my steps backwards. This is especially true if I am in the middle of a complicated swap and accidentally swap through a capture that I didn't intend to make. In that case I would want to undo only the most recent steps of the swap, rather than having to do the whole long swap again up to that point. Maybe the backspace key could be used to undo the steps of the current turn. Or maybe ctrl-z to undo, ctrl-shift-z to redo.
* It would be cool to give players the option of "golden crumble" in addition to classic. In golden crumble the rules are identical to classic crumble, except that the 'square' pieces have a ratio of 1:sqrt(2), and the 'half-square' pieces have a ratio of 0.5:sqrt(2). This one difference changes the entire game tree and complicates a lot of strategic and tactical motifs, because it allows players essentially to split a square into two squares, which can't be done in classic crumble. When playing 6x6 (or any XxX) golden crumble, the playing field has the same ratio as a starting piece, and players face off across the longer side, i.e. the two players sit so as to be closer to each other.

I haven't looked at your code, but when I tried to write my own crumble engine awhile back, I thought up what seemed like a relatively simple implementation for golden crumble. You treat it internally like classic crumble, i.e. all plain ratios of 1:1 and 0.5:1 for all calculations. The only change is that half-squares may or may not have the option to split into yet-thinner 0.25:1 quarter-squares, depending on a piece of state stored in the piece they came from. And that's it, you've got the fundamental change that creates golden crumble. Then at the final step when you actually display the board, you just squash the playing field and everything in it visually into the necessary ratio. That way internal calculations/comparisons can avoid messy square roots, and users don't need to keep piece state in their heads. I could be missing something with this idea -- I never actually implemented it. See what you think.

Be well,
Zack

--
Zack Brown

Adam Sandstedt

unread,
Jan 15, 2021, 1:44:39 PM1/15/21
to Crumble
Thanks for all the feedback Zach, it really helps a lot. A quick update to everyone, online games are now working (I hope). I literally just finished it so it's pretty bare bones at the moment but I've been testing it as I made it so it should work. You have to be logged in to do the online games, but setting up an account is really easy. Please, keep the feedback coming, especially if you find bugs in the code. I hope you all enjoy using the site,
-Adam

Zack Brown

unread,
Jan 15, 2021, 2:05:51 PM1/15/21
to cru...@googlegroups.com
Hi Adam,

On Fri, Jan 15, 2021 at 7:44 PM Adam Sandstedt <adam.sa...@gmail.com> wrote:
Thanks for all the feedback Zach, it really helps a lot. A quick update to everyone, online games are now working (I hope). I literally just finished it so it's pretty bare bones at the moment but I've been testing it as I made it so it should work. You have to be logged in to do the online games, but setting up an account is really easy. Please, keep the feedback coming, especially if you find bugs in the code. I hope you all enjoy using the site,

Very cool!

It's not working for me on Chrome/Linux. I tried accepting both of your challenges (as black and as white). Playing black, the UI still let me make the moves for both players, i.e. it was the same as a local game. And playing white, the board was completely empty -- no pieces at all, just white space. I also tried creating a new challenge, but when the game started, it showed up as "Local Game". I tried again and it just dumped me back into the game options page. However, my challenges did show up in the list of open challenges, though I didnt' see a way for me to join those games.

Be well,
Zack

Adam Sandstedt

unread,
Jan 15, 2021, 7:38:05 PM1/15/21
to Crumble
I just tried it out on Linux and it was doing some weird things for me too. But once I cleared my cache it started working. I think it was just an issue with the cached javascript not updating. Let me know if that solves it for you. If not, could you open up the browser console and send me the errors you're getting? Thanks,
-Adam

Zack Brown

unread,
Jan 16, 2021, 1:55:11 AM1/16/21
to cru...@googlegroups.com
Hi Adam,

Yup, that was the issue. I tried logging in from an incognito window and it worked fine.

Are the games actually live, i.e updating for each player as the opponent make a move? Currently I just reload the "my games" page once in awhile to see if it's my turn.

Be well,
Zack



--
Zack Brown

Adam Sandstedt

unread,
Jan 19, 2021, 1:15:53 AM1/19/21
to Crumble
So, it turns out making the games live was harder than I thought, but it should be working now. If you have a game open and the other person makes a move, it will update for you. But otherwise, yeah, you just have to check "my games" every once in a while. I've also been thinking about setting up email notifications for when it's your move but I'm worried that might get annoying if you're playing multiple games.

Zack Brown

unread,
Jan 19, 2021, 5:07:49 AM1/19/21
to cru...@googlegroups.com
This is looking really great. We've got several games going, and so far no problems. For now I haven't actually tested the live play, but checking "my games" every once in awhile is working.

For email alerts I guess it would depend on people's habits. On my system email doesn't let me know when it arrives. For people who do get alerts like that it could be useful.

Maybe this is a bug report: on the "Continue Game" page, I also see local games that have finished, instead of only ongoing games.



--
Zack Brown

Misha Leder

unread,
Jan 23, 2021, 3:21:35 PM1/23/21
to cru...@googlegroups.com
That's awesome!!!
One thing: I couldn't complete a move by just splitting pieces without a swap.

Reply all
Reply to author
Forward
0 new messages