Organising a map for a highscores table.

Hey there

So Ive been working my way back from maps.

Essentially, I have an old school arcade style save system.
You scroll some wheels, you get a 3 letter name and then your score is attached to it and it’s added to a map. Done.

I’m trying to organise the map into the highest value, but I’ve found myself pretty lost.

It seems It’s pretty brutal to do, let alone in blueprints.

I thought of a few ways, but I’m struggling to think how to implement them.

  1. Inserting the value at a specific index, for example if the score coming in finds its place in-between all the current scores. And then bumps the rest down or out or whatever.

  2. Maybe pulling the entire map contents out, sliding it in, and then rebuilding the map.

If anyone has any ideas on how to place the nodes, I’d be really helpful. Or any links I can piece it together with.

Thanks for reading.

additional infomation, its a list of 100 highscores. locally kept. not multiplayer.

update:
You know what I guess you could also make it an array instead of a map, that you could split and then take the score section and vs it against the rest of the sections and reorganise it that way.

that way Your not disconnecting the map between keys and values. Mmm the more I think about it, this seems the way to go.

here is one example.

Each score is composed by {name, score, date}:

Like in the old times, your highscore table is already filled. In this case, size 3 and with the following data:

Now is just a question of inserting the new highscore in the right place + poping out the last element of the array to keep the array length constant.


Usage:

1 Like

Wow, yeah, this system works fantastically. Feels pretty elegant, too.

I’ve slowly worked my way through it to really understand how it all functions.

Thank you for taking the time to assist.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.