feat(matchmake-extension): Implement blocklist functionality#58
feat(matchmake-extension): Implement blocklist functionality#58Fujimon8142 wants to merge 5 commits intoPretendoNetwork:mainfrom
Conversation
Update dependencies to resolve compilation errors related to older versions of nex-go and nex-protocols-go (e.g., types.UInt64, sourceAccount.RequiresTokenAuth). nex-protocols-go is updated to pseudo-version v2.2.2-0.20250908132726-4a71a019af39 as the latest tagged release did not include the necessary fixes.
Adds the `matchmaking.block_lists` table schema to store user block relationships. Implements database functions required for blocklist operations: - AddToBlockList - RemoveFromBlockList - GetBlockList - GetBlockedByList
Implements RMC handlers for MatchmakeExtension blocklist methods: - AddToBlockList - RemoveFromBlockList - GetMyBlockList Registers these handlers in the common protocol and adds corresponding `OnAfter...` callback definitions.
Modifies `FindMatchmakeSessionBySearchCriteria` to exclude sessions where the owner has blocked the searching user, or where the searching user has blocked the owner. Utilizes the newly added `GetBlockList` and `GetBlockedByList` functions.
|
Thank you for the work! I'll give this a proper review soon (doing some other stuff at the moment), but I wanted to touch very quickly on this part:
The way this worked officially is that the block lists of users are not typically checked during match searching, and are instead checked at join time. This is typically safe, since there's no real way to know who is in a session until you join it so this can't be abused to still follow certain users. However it does mean that the client MAY attempt, and fail, to join many sessions if the user has many blocked users. It seems like Nintendo realized this limitation at some point, since they added These are my (current) Notion notes from when I was testing things prior to the shutdown:
|
|
Thank you for the detailed feedback! I'll try to revise the code based on your comments when I have some time. |
|
Thank you for the clear explanation. I understand now. |
|
Yes, ideally commit 2612175 should be reverted and the following changes should be made:
I know your use case is Steel Diver: Sub Wars, but when adding features to this library we do ask that they be feature-complete (within reason), so you may have to touch methods Steel Diver: Sub Wars does not use for this PR |
|
Also, if you were interested in fully closing #48 then
|
|
Thank you for the clear instructions! I'll get to work on it when I get home. |
|
I have a quick question to clarify my understanding of the intended behavior for
Could you please clarify the correct behavior for |
The Notion notes I sent before are somewhat old, they aren't contradictory just worded a bit poorly maybe. The gist is:
|
|
Thank you again for the detailed explanation and guidance! Based on our discussion, I've summarized my understanding of the required blocklist implementation logic. Could you please confirm if this table accurately reflects the expected behavior for the different methods? I plan to use these scenarios for testing. Blocklist Implementation Plan & Test Cases
Specifically regarding Steel Diver, it seems likely it uses Does this summary align with your expectations for the implementation? I'll proceed based on this understanding once confirmed. |
|
Almost. That's all correct except for the auto matchmaking parts at the end. An error should never be thrown, the caller should just never be matched into a session where they are blocked by a participant or have a participant blocked. For auto matchmaking just find the first session that matches the search and has no blocklist issues, and if a session like that doesn't exist then a new one should be made like normal |
… search" This reverts commit 2612175.
|
Never mind, I'm sorry. It seems the problem was just with my search criteria. I haven't played this game in years, I don't really remember it well... |
|
I was hesitant to commit untested code to this pull request, so I've been working on a separate branch (add-block-feature-work-in-progress). In Steel Diver: Sub Wars, I believe I then tried testing with Yo-kai Watch Blasters, but I'm running into an issue. For some reason, it seems This is preventing me from testing the unblock functionality. Do you have any ideas what might be causing this? Alternatively, if there are any other games that would be better for testing this feature, could you please recommend some? |
Addresses #48 ?
Changes:
My primary motivation for implementing this was to add a block feature to "Steel Diver: Sub Wars." This PR introduces the necessary components for blocklist functionality within the MatchmakeExtension protocol.
The changes include:
Database Schema: Added the
matchmaking.block_liststable to store user block relationships.Database Functions: Implemented functions (
AddToBlockList,RemoveFromBlockList,GetBlockList,GetBlockedByList) in the database package to interact with the new table.RMC Handlers: Added handlers for the
AddToBlockList,GetMyBlockList, andRemoveFromBlockListmethods. These are now registered in the common protocol.Session Search Integration: Modified
FindMatchmakeSessionBySearchCriteriato exclude sessions hosted by blocked users or users who have blocked the searcher.Personal Note:
I am not deeply familiar with the official NEX specifications or the project's internal standards for consistency and maintainability, so I'm unsure if this code fully meets requirements. To be honest, I have very little confidence.
I did test the functionality using two 3DS consoles with "Steel Diver: Sub Wars."