
Publisher
simpleboards
SimpleBoards: Free Leaderboard Service
Effortlessly manage and integrate leaderboards in your Godot projects with SimpleBoards! Fetch entries, submit scores, and connect players to leaderboards using the SimpleBoards API. Easy setup, powerful features, and fully customizable for indie and professional developers. Perfect for enhancing your game's competitive edge! The plugin is based on https://simpleboards.dev
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
SimpleBoards Godot Plugin
Manage SimpleBoards leaderboards directly from the Godot Editor. This plugin allows you to interact with the SimpleBoards API to fetch leaderboard entries and submit scores.
Features
- Free leaderboard service (see Pricing for paid plans).
- Fetch leaderboard entries.
- Submit scores with or without a player ID.
- Easy integration with the Godot Editor.
- Fully customizable and extendable using GDScript.
Requirements
- Godot Engine 4.x
- A SimpleBoards API key. You can generate one by registering at SimpleBoards.
Installation
Download or clone this repository into your Godot project under the
addons/
folder:git clone https://github.com/isetr/simpleboards_godot.git addons/simpleboards_plugin
Enable the plugin in the Godot Editor:
- Go to
Project Settings
>Plugins
. - Find
SimpleBoards
in the list and enable it.
- Go to
The plugin will now be available in your project.
Usage
Setup
- Create an instance of the
SimpleBoardsApi
node in your scene. - Set your API key in the
SimpleBoardsApi
node's properties or via script.
Example Scene
extends Node2D
@onready var simpleboards = $SimpleBoardsApi
func _ready():
# Set the API key
simpleboards.set_api_key("your_api_key")
# Connect signals
simpleboards.entries_got.connect(_on_entries_got)
simpleboards.entry_sent.connect(_on_entry_sent)
# Send a score
await simpleboards.send_score_without_id("leaderboard_id", "PlayerName", "12345", "{}")
await simpleboards.send_score_with_id("leaderboard_id", "PlayerName", "12345", "{}", "1")
# Get leaderboard entries
await simpleboards.get_entries("leaderboard_id")
func _on_entries_got(entries):
for entry in entries:
print(entry)
func _on_entry_sent(entry):
print(entry)
Signals
entries_got
: Emitted when leaderboard entries are successfully fetched.- Arguments:
Array
of entries.
- Arguments:
entry_sent
: Emitted when a score is successfully submitted.- Arguments:
Dictionary
containing the server response.
- Arguments:
API Methods
set_api_key(key: String)
Sets the API key for authentication.
get_entries(leaderboard_id: String)
Fetches leaderboard entries for a given leaderboard ID.
- Arguments:
leaderboard_id
: The ID of the leaderboard.
send_score_with_id(leaderboard_id: String, player_display_name: String, score: String, metadata: String, player_id: String)
Submits a player's score to the leaderboard, including a player ID.
- Arguments:
leaderboard_id
: The ID of the leaderboard.player_display_name
: The display name of the player.score
: The player's score.metadata
: Additional metadata (JSON string).player_id
: The player's unique ID.
send_score_without_id(leaderboard_id: String, player_display_name: String, score: String, metadata: String)
Submits a player's score to the leaderboard without a player ID.
- Arguments:
leaderboard_id
: The ID of the leaderboard.player_display_name
: The display name of the player.score
: The player's score.metadata
: Additional metadata (JSON string).
Response Object
When a score is successfully submitted, the emitted entry_sent
signal will provide a response object with the following structure:
{
"id": "string",
"leaderboardId": "string",
"playerId": "string",
"playerDisplayName": "string",
"score": "string",
"metadata": "string"
}
License
This plugin is licensed under the MIT License. See the LICENSE file for details.
Contributing
Feel free to submit issues and pull requests to improve this plugin. Contributions are always welcome!
Support
For questions or support, please visit SimpleBoards or contact us directly.
Happy coding!