Sending highscore to Postgres DB

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jebenipapa

Hello! I’ve made my first game in Postgres and am so far in love with the engine. I’ve made a simple catching game which follows the mouse and have gone and exported it to my Reactjs web app it works like a charm - whilst scuffed I’m very proud of it!

A site feature I wanted to make is the following: after finishing the game (it is playable once per day) the game should first send the score information the user got and send it to my express backend (which deals with other parts of my site that use a DB) where the information would be stored in the database and later posted on another site. Is there a way to do this? Or to perhaps directly send the score result to Postgres?

I’ve found GitHub - Marzin-bot/PostgreSQLClient: PostgreSQL connector for Godot Engine in GDScript. however as I’m a complete begginer in both React, Postgres and Godot - who follows and combines examples to create what he wants I am uncertain as to how to use this library within my Postgres. Is there a better solution perhaps?
Thank you in advance!

:bust_in_silhouette: Reply From: klaas

Hi.
I would assume you wrote your first game in godot and not in postgres!?

Anyway. A simple http GET call to the express backend with paramters in the url should do the trick.

There is no need to directly communicate with the database.

Oh yeah in Godot obviously! Didn’t notice the mistake till you pointed it out, perhaps the next solo project is making a game in a database? :smiley:
Anyways thank you! I’ll give it a go and see what I can do with them.

jebenipapa | 2021-07-13 06:31