Ask coding questions

← Back to all posts
Pumpkin Game’s Local Storage Leaderboard
h
RayhanADev (344)

Local Storage Global Leaderboard

Heya, so I made it to the point where you can click into a new Leaderboard tab, and you will be prompted for your name which will be stored and your score (which is previously/already stored from the game or is null) will be displayed on the screen.
I want to make this into a global leaderboard by tracking people’s names and score in a table (don’t worry about displaying the data, I got that). How would I go about this?
~Ray

Answered by Coder100 (8709) [earned 5 cycles]
View Answer
Commentshotnewtop
Coder100 (8709)

no! localstorage is not a database!

RayhanADev (344)

@Coder100 Yes, I want to take Local Storage Data and put it into a database smh.

Coder100 (8709)

@RayhanADev that's still a bad idea, why not just put it in a database, why buffer it through localstroage?

RayhanADev (344)

@Coder100 Hmm, then what do you suggest? How should I go about this? (I’ve never worked with storing and displaying user input)

Coder100 (8709)

@RayhanADev use something like firebase ig
click me

RayhanADev (344)

@Coder100 and see, I was thinking something more server-side.

Coder100 (8709)

you don't even have a server right now lmao this works server-side and client-side @RayhanADev

RayhanADev (344)

and see, I was thinking something more server-side.
@Coder100

Coder100 (8709)

yeah, it does work server-side smh @RayhanADev

Coder100 (8709)

didn't you read the article smh @RayhanADev

RayhanADev (344)

@Coder100 Okay...
I’ll try it and see how it works.

Coder100 (8709)

you need google account and this is probably the easiest way @RayhanADev

SixBeeps (3064)

@Coder100 what why not repl db smh

RayhanADev (344)

@SixBeeps You know that’s what I thought he’d say ngl.

Coder100 (8709)

Oh lmao forgot about that @RayhanADev

Coder100 (8709)

The thing is, repl.itdb is unstable, and has let me down :( @RayhanADev

RayhanADev (344)

@Coder100 Well trying to use Firebase has my braincase hurting. I’m probably overthinking it, but anyways I’m going to move on and try Repl DB. Any tips on that?

RayhanADev (344)

@Coder100 huhuh? Let me find that xD!

RayhanADev (344)

@Coder100 idk you had a tutorial xD.

RayhanADev (344)

@Coder100 but it’s for NodeJS??? I need it for HTML
ooohhh wait there isn’t ReplDB for HTML is there...

Coder100 (8709)

Bruh then why are you saying you want it server-side... @RayhanADev

RayhanADev (344)

@Coder100 fair enough...
What are my possibilities then?
Edit: Besides Firebase

Coder100 (8709)

It's only fire base or use a backend like any other person :/ @RayhanADev

Coder100 (8709)

And plus, fire base shouldn't be that hard, actually read the tutorial smh @RayhanADev

RayhanADev (344)

@Coder100 o o f
Alrighty, then lemme try implementing another feature...

Coder100 (8709)

Ok mark as correct answer kthxbye @RayhanADev

RayhanADev (344)

@Coder100 you’ll see (^_−)−☆.