0 Favourites

Can i do a friend request system for a online game ?

  • Like the title says, is it posible to do a friend request system for a online game ?

    Like, sending him a request, the other player accepting it, and then they can see when one of the two are online, etc...

    Is it posible ? Thanks !

    -Luke

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I can't see why not.

    If I had to take a crack at this, I would do the whole thing in SQL on the backend and have a table with a bunch of columns of who is friends with who (if the DB isn't on a dedicated host, I would limit the friend feature to 200 or less to start), and last time checked in (something not really 'live' but with constant check-ins while the app is in focus to show 'online').

    You could have an 'every X time' send a token-code to the server, add the data to keep the 'online' status valid, and also check for pending friend requests and their statuses as friends (online/offline). The token could be something random, or based off a name during a registration (simple encryption) and when they 'login' it'll check to make sure the user is who they say they are, and fetch the data as necessary.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)