Commit graph

22 commits

Author SHA1 Message Date
Eric House
a0f5e2d5d4 remove dead code 2023-02-23 10:55:05 -08:00
Eric House
9ca291cf0d enable rematch for 3- and 4-device games
Because only the host/inviter knows the addresses of all the devices
in a game it's hard for guests to rematch (unless it's a 2-device
game, as they know the host's address.) So now, as part of telling
guests the game is ready to play, include the addresses of other
guests. It's usually only 9 bytes per device, and only happens when
more than two devices are in a game.
2023-02-16 21:36:46 -08:00
Eric House
4a57b76817 cleanup: pass xwe with closeProc rather than to destroy
It's only needed when there's a close proc, and that's rare.
2023-02-03 22:00:47 -08:00
Eric House
aea7c3fd92 always save known player game start time
Was only saving it in case of conflict, which is rare
2022-12-06 07:45:10 -08:00
Eric House
4996d3fe89 improve comms address tracking (breaks android for now)
Remove legacy relay-inspired logic around comms addressing. Now when a
device creates a game it's required to provide its "self address," and
if it's a client, the address of the host (which it presumably got
through the invitation in response to which the game is being
created.) Then as registration messages come in from clients, the host
gathers their addresses as always.
2022-09-06 11:40:09 -07: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
4937d13273 use indexeddb for storage 2021-03-19 14:27:04 -07:00
Eric House
d5546b484d cleanup (mostly non-DBG compile errors) 2021-03-19 13:03:39 -07:00
Eric House
64a470185c display known player timestamp when known (debug only)
For some reason it's getting cleared sometimes. Will fix.
2021-01-04 08:12:05 -08:00
Eric House
5d4fd0e58b don't dispose gi before game
gathering players was failing because disposed gi was pointing at
garbage. I'm lucky it didn't segfault.
2020-10-23 19:03:26 -07:00
Eric House
f90d76329b use semaphore to protect known players data
Requires adding a common method called by platform code on creating a
new dutil ctxt.
2020-09-30 17:21:18 -07:00
Eric House
dbde9c87ae list known player in invite info where known
(for mqtt only)
2020-09-30 10:10:43 -07:00
Eric House
7b097ea67d Don't allow duplicates when renaming 2020-09-28 11:17:51 -07:00
Eric House
8406d9e551 implement Known Player renaming
Used existing GameNamer which now needs to be made more general.
2020-09-28 08:59:39 -07:00
Eric House
aff75053ac implement deleting known players 2020-09-27 20:52:56 -07:00
Eric House
b0c1c5ac1b don't deref ptr after free(); cleanup 2020-09-26 11:00:11 -07:00
Eric House
fad252d8c0 use created stamp to decide between conflicting addresses
Not at all tested, but now the game's timestamp is kept and passed in to
where it can be used to determine, e.g., which of two Bluetooth device
names to keep for a given opponent.
2020-09-26 09:48:35 -07:00
Eric House
f0f2a598e0 make up new name rather than drop new player 2020-09-26 09:48:35 -07:00
Eric House
49909c84d6 make known-player stuff conditional
and ifdefs to C and BuildConfig flag to java so the feature can be
hidden in release builds until it's ready.
2020-09-26 09:48:35 -07:00
Eric House
fc05612b74 rough implementation of creating and inviting a known player
Followed the way rematch works. Which is gross. Eventually the two
paths (invitee and rematch) should be unified with rematch getting a lot
simpler.)
2020-09-26 09:48:35 -07:00
Eric House
11266ece5b gtk known-player invitation works 2020-09-26 09:48:35 -07:00
Eric House
736c9f3503 harvest players on open; save and make available
Got as far as having gtk client display list of previously harvested
known players to be invited. Their addresses, or at least mqtt ids are
saved. Next is to actually invite one.
2020-09-26 09:48:35 -07:00