Open tannerkrewson opened 4 years ago
I just spent like half an hour looking for your messages to tell you that there's now a way to create a game in ABC from an external URL You can do so by hitting https://allbad.cards/api/abc/external-create and providing the following via queryString:
isHost (boolean) userName (string) roomId (string)
if isHost is false, the user will join the game otherwise, they will create a new game
the request to create the game must come from the host's browser, because it sets a cookie that ensures that the game knows they are the game's owner
Currently, iirc rocketcrab can't support making the api call from the hosts browser. but there may be a to do it anyways, and this is likely a situation it should support. Looking into it now ...
Ok, I deleted this branch and pushed up a second attempt. I think the host is creating the game correctly with url call that looks like
https://allbad.cards/api/abc/external-create?rocketcrab=true&userName=Jake&isHost=true&roomId=rocketcrab-62557bb8c0a4b752
but when the other players attempt to navigate to
https://allbad.cards/api/abc/external-create?rocketcrab=true&userName=Tanner&isHost=false&roomId=external-room-rocketcrab-62557bb8c0a4b752
they get Game not found: undefined
. It says that whether the external-room-
is prepended or not. 🤔
Good catch - there was a bug upon joining a created game, which should be fixed now!
Hey Jake, sorry for the delay again, I was focused on Drawphone.
So I've added all three of your games in that last commit. The url from before didn't seem to be working, so I removed the abc/
and it creates the game, but both the host and the guest see a "Join Game" button. The host's gives an error, and the guest's works, but they have to enter a username, which should be provided by the url.
Let me know if you need any more info. The recent changes to the your site look really nice, Good work!!!! 😄
is this fixed? i havent checked, yet so apologies if it is. looking to get these new games merged soon. ive been putting it off for long enough!!
@jakelauer
With this code, users will end up in the same all bad cards room, but will have some weird errors and the game won't work. 🤔 ❤️