feat/friends - #36
Conversation
note: buddy system is currently one relationship per two buddies, and buddy code is generated by fetching the first 6 digits of vikingid
…te and best buddy boolean note: this was most likely previous intended design since removing best buddy status from one player should not affect the others, thus a one-to-one relationship most likely
…display messages from two new tables: messages and usermessagequeues note: sod used to have an similar table format for messages, specifically a messages table and then a user queue for those to prevent n writes per message to system, it went into depth with VIP-level roles for messages and file types to send, but for now, i assume everyone is VIP
note: added a new schema for the BuddyLocation from what the server sends for easy implementation later
… add a online attribute to viking note: without this, the client has to restart the game for the new database update to take into place, but with a bridge, we can immediately send packets and update it
|
Thanks for putting this together. This functionality is something I've been designing on and off for a while now and never really gotten to it fully. Given the design-level issues below, I haven't done a full review yet and only looked at the surface. I'd rather get these settled first, since they'll mean some of the internals change anyway. Things I think need to be addressed before we can get deeper:
|
…t doesnt already exist note: this code is only generated if the player goes into the friends menu and it does not already exist
… initiator, etc. and the pair table is now used to find buddy location rather than sending a http request note: enums are now defined as contants as well as random strings or integers
…ds on tcp stream now instead of http request
…ather than http request
|
Here's a change log with some comments from the previous comments:
Lastly, I implemented the invite endpoint for friends, it just sends a invite to someone to teleport them to you. All relevant notifications show up in system messages. For now, the implementation is done, I just need to fix that weird invisible diff issue, the other commits are on SoDOff-MMO. |
|
Holy AI slop... |
|
I've reviewed the code, it's not complete AI slop. All of the ideas were from me and I didn't one shot this code either with a singular prompt pasting your comments, I was constantly iterating it. Not to mention, it works and applies the ideas that you presented. If you don't find it to be something that you can merge to production, can you list some reasons why? Otherwise, the comment itself doesn't help me make changes since it works and follows similar pieces of code already in the codebase. |
Friends Functionality - SoDOff PR & SoDOff-MMO PR
Summary
Implemented friends functionality, you can send friend requests, receive them, ignore them, etc. The messaging system is also implemented but purely for system messages and so that I don't have to stub the system messages for friend requests, there's no peer to peer messaging due to the moderation caveat. We also now ping the bridge for packets that need to be sent immediately instead of when the game is launched again and fetched from database, these packets include buddy events and buddy location, as seen in the game files.
Changes
Endpoints which now work as intended:
Database had 3 tables added:
Notes
Messages acts as storage for messages, and UserMessageQueues points to which message a viking has read/deleted. The game files dictate that this is most likely how the messaging was stored, and it also saves storing the same message multiple times per user.