LittleBigRefresh / Refresh

A second-generation custom server for LittleBigPlanet that focuses on quality of life features and improving user experience.
https://lbp.littlebigrefresh.com
GNU Affero General Public License v3.0
76 stars 25 forks source link

Add presence server #652

Closed Beyley closed 2 months ago

Beyley commented 2 months ago

This server is responsible for one thing only, which is telling the client to load the slot listing for any user slot you send it. Retail LBP2 and LBP3 both implement this, but both require special care to make it use a separate domain (which is important if you want to protect your main gameserver behind cloudflare!)

This is a fairly basic implementation of the server, but should be sufficient for even large amounts of connected players.

Marking as draft until #649 is merged and hashed live play now is added, since this branch is based off of that one (didnt wanna deal with merge conflicts on this PR).

Thanks to aidan for figuring all this out

Example of server in action:

https://github.com/user-attachments/assets/d790a570-c291-4005-b3cf-daf6a95a9f51

Beyley commented 2 months ago

I added a field to ApiExtendedGameUserResponse for whether the user is on the presence server, this should allow frontends to switch the terminology of popups/buttons to reflect the differing behaviour.