Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
### Online Services by kitchen-games.de are currently not running!###This tool allows you to easily save and load highscores locally and on a global leaderboard, using a simple highscore api hostet by kitchen-games.de.it contains:- saving and loading from a server- synching global and local score (in case the player played offline the last time)- saving the score encrypted to prevent cheating- generating of random usernames for the leaderboard- saving and loading completely local possible
Highscoremanager
This is a simple script for saving and loading highscore data.
Getting Started
First things first. Every player will get their own unique username. This name is randomly generated using a set of nouns an adjectives. Here are some example names:
- golden and cuddly woman
- pretty and sassy salad
- fancy and solid cousin
- flashy and yellow wife
These examples where generated by the default set of words, which can be overwritten in your config.cfg (more of the config.cfg later)
Examples Here is an example for saving the highscore
func lose():
# normal things to do when the game is lost
if state == STATES.LOST:
return
state = STATES.LOST
# loading the current highscore and Saving the new score if its better highscore
if HighscoreManager.load_local_highscore() < score:
HighscoreManager.save_local_highscore(score)
# Submitting the highscore to the server
# Notice that the local and server highscore can get out of sync when the player broke their record while playing offline.
# Thats why you want submit the highscore to the server anyway. It'll only be saved when its a new record anyway
HighscoreManager.submit_highscore(score)
Next an example for loading the highscore from the server
func _ready():
# first we have to connect to the tome_out and data_recieved signal
HighscoreManager.connect("data_recieved", self, "on_data_recieved")
HighscoreManager.connect("timeout", self, "on_data_not_recieved")
# then we load the scores
HighscoreManager.get_highscore_for_places(0, 100)
func on_data_not_recieved(_data_type):
$RichTextLabel.text = "connection failed!"
# data are the actual leaderboard data in array format
# data_type is the type of data we're expecting. In this case its WAIT_FOR.HIGHSCORE_FOR_PLACES since we calles the method get_highscore_for_places before
func on_data_recieved(data, data_type):
match data_type:
HighscoreManager.WAIT_FOR.HIGHSCORE_FOR_PLACE: pass
HighscoreManager.WAIT_FOR.HIGHSCORE_FOR_PLACES:
pass # display data here
HighscoreManager.WAIT_FOR.HIGHSCORE_FOR_PLAYER: pass
Set up and configuration
In order to use the HighscorManager server you havv to configure some settings in a config file. It's path is supposed to be "res://config.cfg" Here an example for a config.cfg
[Highscore]
private_key=111222333
public_key=333222111
highscore_file="user://score.json"
nouns=["sweet","cute","sassy","giant","neat","hot","small","lumpy","clean","lucky","drunk","nice","huge","shiny","icy","juicy","crazy","new","bored","messy","silly","fancy","hard","solid","slimy","flashy","pretty","boring","odd","ill","easy","grumpy","cuddly","mixed","red","green","blue","purple","golden","yellow","orange","tiny","tense","brave","narrow","first","young","old","jazzy","wise"]
adjectives=["stranger","tomato","buyer","cousin","orange","bread","error","mum","dad","virus","salad","dragon","actor","mom","girl","pie","lady","guy","cheese","pizza","user","engine","wife","singer","coffee","potato","tea","basket","steak","man","woman","death","breath","sir","king","queen","tomato","insect","hair","honey","person","writer"]
The private and public key can be recieved by visiting this webpage: https://kitchen-games.de/new_leaderboard.php
### Online Services by kitchen-games.de are currently not running!###
This tool allows you to easily save and load highscores locally and on a global leaderboard, using a simple highscore api hostet by kitchen-games.de.
it contains:
- saving and loading from a server
- synching global and local score (in case the player played offline the last time)
- saving the score encrypted to prevent cheating
- generating of random usernames for the leaderboard
- saving and loading completely local possible
Reviews
Quick Information
### Online Services by kitchen-games.de are currently not running!###This tool allows you to easily save and load highscores locally and on a global leaderboard, using a simple highscore api hostet by kitchen-games.de.it contains:- saving and loading from a server- synching global and local score (in case the player played offline the last time)- saving the score encrypted to prevent cheating- generating of random usernames for the leaderboard- saving and loading completely local possible