Commit graph

1632 commits

Author SHA1 Message Date
Eric House
da23bfe23b add debug pref to not add mqtt to all games
I want it for testing that stuff like NBS (data SMS) works for more
than connecting. MQTT works so well nothing ever gets used once it's
there.
2022-05-09 15:10:15 -07:00
Eric House
98cb3b4930 cleanup 2022-04-22 07:59:50 -07:00
Eric House
ab29dfa6ce cleanup 2022-04-21 13:26:26 -07:00
Eric House
05e2d2bdb9 cleanup 2022-04-20 21:00:51 -07:00
Eric House
1c9fe6745c fix crash with 23x23 (linux only); allow 6 blanks
Portuguese will want six blanks for a 21x21 board, so might as well
not crash in case that becomes a thing.
2022-04-20 13:17:07 -07:00
Eric House
5d6d8c7499 bring in changes to make larger boards work for linux
Includes making tile sets vary with board size, calculated from 15x15
unless present in the wordlist. Likely breaks android.
2022-04-04 10:39:29 +02:00
Eric House
9568e4ab03 move extra counts into header so new dicts backward compatible 2022-04-01 07:51:13 +02:00
Eric House
cdc77eaf68 add board sizes to wordlist format (English only)
Modify language metadata to have possibly different counts of tiles
for different board sizes. Make the necessary changes for loading such
files. Works on linux version at least. Only English will build for
now thanks to changes in info.txt format.
2022-04-01 07:51:13 +02:00
Eric House
4b1795cd5b fix crashes when quad-{word,letter} present 2022-04-01 07:51:13 +02:00
Eric House
d0bda214e6 use the right number of bits to store larger scroll vals 2022-04-01 07:51:13 +02:00
Eric House
70d301f210 use the same bonus pattern for all sizes
Just drop the outer "rings" where size < max
2022-04-01 07:51:13 +02:00
Eric House
372d722b58 make number of tiles proportional to board size
Until there's a way to specify specifically for each size, adjusting
from the built-in 15x15 tileset works reasonably well.
2022-04-01 07:51:13 +02:00
Eric House
b34190d62d make 21x21 work on Android
Still needs default colors and the bonus square values working for
smaller sizes.
2022-04-01 07:51:13 +02:00
Eric House
cb2d847e6d add bonus squares for 21x21 board (linux only) 2022-04-01 07:51:13 +02:00
Eric House
1c644d7af0 fix wasm build 2022-03-14 07:42:47 +01:00
Eric House
2175600190 use new webapi to fetch mqttid to replace relayid
And drop relay once we have it. Makes perfecting RelayService backoff
less an issue.
2022-02-12 13:27:24 -08:00
Eric House
4bfcf2afb4 deal better with old relay games
Attempting to stop calling the relay, but to let relay-only games finish
and issue invitations. Big changes are that relay is removed from games
if they have viable mqtt connections, and relay timers fire less often,
then eventually stop getting set if there are no active games. Result is
that a relay-only invitation won't likely be received, but there should
be few or none of those now.
2022-02-10 08:28:34 -08:00
Eric House
acc17c2ce2 Don't connect to relay for games with mqtt
I was determining I need to check the relay for messages if I have open
games using it. But they can also use mqtt, and the goal's go stop using
the relay. So only force the connection if the games can only connect
via relay. Once I've confirmed via a study of relevant databases that
all recent relay games are also connecting via mqtt this can ship, and
should stop nearly all relay traffic .
2022-01-27 08:10:40 -08:00
Eric House
d22ffbec3f handle byod download links
Download the thing and offer to open it on success.
2022-01-24 20:48:13 -08:00
Eric House
2d6ce6cfda fix problems with tile picking introduced by 9-tiles
Not sure if these would show up if you're not picking face-up,
but if so they justify a release.
2022-01-20 22:14:13 -08:00
Eric House
5e028281de fix mis-reporting number of tiles traded 2022-01-17 16:31:19 -08:00
Eric House
d9b1fb4df6 cleanup -- no behavior change 2022-01-10 08:42:41 -08:00
Eric House
8095a0da54 fix uninitialized memory getting treated as a mqtt address
augmentAddrIntrnl() sets the has-mqtt bit in comms->addr but not the
address data (has none). If that address had been loaded from stream
the address bits will be random, not 0, and so get treated as an
address.
2022-01-08 18:55:53 -08:00
Eric House
2e5f6128f2 post new msg message from relay2
This is to have a utility back, but mostly to start playing with being
able to send keepalives to a device that have nothing to do with moves.
2022-01-06 19:07:08 -08:00
Eric House
a8963c952e use variable length ints to store msgID and len 2022-01-04 11:12:58 -08:00
Eric House
759cf12ecf set bingoMin 2022-01-03 20:23:00 -08:00
Eric House
38c80209c4 fix crashes and failure to connect
Seems to be back to working now.
2022-01-03 17:40:23 -08:00
Eric House
a85f5df4e3 another tweak: make version imply format 2021-12-29 07:35:43 -08:00
Eric House
b67ab9e32a refactor, and make msgids variable-length 2021-12-28 20:59:15 -08:00
Eric House
863ef88c22 add varible-length int encoding to streams
And test code that should be removed from linux client at some point.
2021-12-28 18:25:05 -08:00
Eric House
140e1210cc cleanup 2021-12-22 13:01:22 -08:00
Eric House
2b7daf067d shrink the comms header
Sending in 32 bits what can probably fit in 8 -- twice -- is dumb. As is
sending the gameID (as connID) when it's already known. In 2016 I added
a fixed marker, so I can count on all current code sending that. If I
fail to find that, I know the sender is new (current release or better.)
In that case, use 12 bits instead of 32 for two fields, drop the marker
and the connID. Result is that an ACK's size, including MQTT headers,
drops from 28 bytes to 21.
2021-12-21 16:34:04 -08:00
Eric House
0fa43a7394 remove duplicate code 2021-12-16 08:47:12 -08:00
Eric House
14c879a752 fix so ack format is same for DEBUG and RELEASE builds
Was appending garbage to ACKs that, somehow, receiver didn't
mind. Fix. And use the new BEEF format for linux too.
2021-12-15 10:03:09 -08:00
Eric House
79d77410a5 fix failure to send NO_SUCH_GAME over NBS
Wasn't sending zero-length messages, which this one is. Needs testing,
because there must have been a reason for that test.
2021-08-31 10:44:39 -07:00
Eric House
ea1c8125f8 use 16 bits to represent selected tiles
fixes selection of 9th tray tile during trade
2021-08-25 07:24:38 -07:00
Eric House
80f0e35755 allow trade when 7 tiles left, not 9 2021-08-24 21:24:17 -07:00
Eric House
694953c820 add support for trays with up to 9 tiles 2021-07-16 12:15:46 -07:00
Eric House
8f83a390f1 a bit o' cleanup 2021-06-30 11:47:26 -07:00
Eric House
e667291da5 show invitee name where possible
When I've invited a Known Player, use that player's name in parens in
scoreboard and games list elem/summary until a remote device connects
(usually in response to an invitation) and provides an actual player
name. Makes it much easier to tell one pending game from another. And
doesn't really work (yet) where there's more than one remote player in
a game.
2021-05-30 13:31:33 -07:00
Eric House
be698069a4 cleanup of recent changes 2021-05-14 11:34:15 -07:00
Eric House
daf5894d79 call new web api to ack mqtt messages
This is toward debugging. Not sure it'll be use to add functionality yet.
2021-04-19 07:04:58 -07:00
Eric House
92200779ac log connType in nli 2021-04-07 21:40:20 -07:00
Eric House
d74161958e cleanup: remove dead and use new code 2021-03-28 20:27:24 -07:00
Eric House
2a20caa6d7 fix breakage caused by merge 2021-03-27 11:00:06 -07:00
Eric House
64ff2e5f69 Merge branch 'android_branch' into wasm 2021-03-27 10:27:14 -07:00
Eric House
7a7a2db6ce enable chat (without history) 2021-03-24 15:58:25 -07:00
Eric House
561c5c9eb1 cleanup 2021-03-22 10:43:34 -07:00
Eric House
e3ba122ca0 fix to compile with XWFEATURE_RELAY undefined
Didn't change the stream format. That will wait!
2021-03-19 18:51:34 -07:00
Eric House
b1532f19a4 move getDict from dutil to util
It's in the context of a game, and we might want info about the game
when notifying the user. For wasm, though, I just download after failure
to open. User has to try again to open the game. Good enough for now
since missing a wordlist shouldn't happen if you're not me changing
where they're stored.
2021-03-19 17:27:17 -07:00