Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7037593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:33:51+00:00 2026-05-28T01:33:51+00:00

I’m wondering if there is a possibility when you upload your highscore you can

  • 0

I’m wondering if there is a possibility when you upload your highscore you can compare your score with the one of your friends (if simpler, only selected contacts)?
And if so, could someone point me in the right direction, how to do it? I did not find anything useful about this on google.
As far as I pressume it should be possible, because apps like WhatsApp also let you choose specific contacts you want to send a message.
Related to that: Can I just use a/the cloud for uploading highscore or should I use my webspace?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:33:51+00:00Added an answer on May 28, 2026 at 1:33 am

    I am not answering this specific to iOS/etc.

    What you would typically do is expose a REST (or POX/POJSON – plain old XML or plain old JSON) service on your website that your application communicates with – it would be responsible for negotiating friendships, uploading high scores and retrieving high scores. This would either hit a database under your control or it would connect to a cloud server; there is no problem with either approach (Azure is a good option if you want to apply my SQL concepts).

    Inside your database you would maintain a list of friends – this is a very simple structure to set up. Essentially you want two tables that look like the following:

    CREATE TABLE [UserAccount]
    (
      [ID] BIGINT IDENTITY(1,1) PRIMARY KEY,
      [Name] NVARCHAR(255),
    )
    
    CREATE TABLE [Friendship]
    (
      [User1] BIGINT, -- Primary key, FK to [UserAccount].[ID]
      [User2] BIGINT, -- Primary key, FK to [UserAccount].[ID]
    )
    

    This would allow you to indicate friendships along the lines of:

    User: ID = 1, Name = Joe
    User: ID = 2, Name = Fred
    Friendship: User1 = 1, User2 = 2
    Friendship: User1 = 2, User1 = 1
    

    You can then query friends using the following query:

    SELECT [F1].[User2] AS [ID] FROM [Friendship] AS [F1]
     WHERE [F1].[User1] = @CurrentUser
       -- Check for symmetric relationship.
       AND EXISTS
           ( SELECT 1 FROM [Friendship] AS [F2]
              WHERE [F2].[User2] = [F1].[User1] AND [F2].[User1] = [F1].[User2] );
    

    You could make that a TVF (Table Value Function) if your SQL variant supports them. Next you would create a high score table and a table to map it to users.

     CREATE TABLE [Highscore]
     {
       [ID] BIGINT IDENTITY(1,1) PRIMARY KEY,
       [Score] INT,
     }
    
     CREATE TABLE [UserHighscore]
     {
       [UserID] BIGINT, -- Primary key, FK to User.ID
       [HighscoreID] BIGINT, -- Primary key, FK to Highscore.ID
     }
    

    Some sample data for this would be:

     -- In this game you can only score over 9000!
     Highscore: ID = 1, Score = 9001
     Highscore: ID = 2, Score = 9005
     Highscore: ID = 3, Score = 9008
     UserHighscore: UserID = 1, HighscoreID = 1
     UserHighscore: UserID = 1, HighscoreID = 2
     UserHighscore: UserID = 2, HighscoreID = 3
    

    You can then query for your friends’ highscores:

    SELECT TOP(10) [U].[Name], [H].[Score] FROM [Friendship] AS [F1]
     LEFT INNER JOIN [User] AS [U] ON [U].[ID] = [F1].[User2]
     LEFT INNER JOIN [HighscoreUser] AS [HU] ON [HU].[UserID] = [F1].[User2]
     LEFT INNER JOIN [Highscore] AS [H] ON [H].[ID] = [HU].[UserID]
     WHERE [F1].[User1] = @CurrentUser
       -- Check for symmetric relationship.
       AND EXISTS
           ( SELECT 1 FROM [Friendship] AS [F2]
              WHERE [F2].[User2] = [F1].[User1] AND [F2].[User1] = [F1].[User2] )
     ORDER BY [H].[Score] DESC;
    

    That query would give the top 10 score your friends; giving you their name and score.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm making a simple page using Google Maps API 3. My first. One marker

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.