Giter Club home page Giter Club logo

nakama-godot's Introduction

Nakama Godot

Godot client for Nakama server written in GDScript.

Nakama is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much more.

This client implements the full API and socket options with the server. It's written in GDScript to support Godot Engine 4.0+.

Full documentation is online - https://heroiclabs.com/docs

Godot 3 & 4

You're currently looking at the Godot 4 version of the Nakama client for Godot.

If you are using Godot 3, you need to use the 'godot-3' branch on GitHub.

Getting Started

You'll need to setup the server and database before you can connect with the client. The simplest way is to use Docker but have a look at the server documentation for other options.

  1. Install and run the servers. Follow these instructions.

  2. Download the client from the releases page and import it into your project. You can also download it from the asset repository.

  3. Add the Nakama.gd singleton (in addons/com.heroiclabs.nakama/) as an autoload in Godot.

  4. Use the connection credentials to build a client object using the singleton.

    extends Node
    
    func _ready():
    	var scheme = "http"
    	var host = "127.0.0.1"
    	var port = 7350
    	var server_key = "defaultkey"
    	var client := Nakama.create_client(server_key, host, port, scheme)

Usage

The client object has many methods to execute various features in the server or open realtime socket connections with the server.

Authenticate

There's a variety of ways to authenticate with the server. Authentication can create a user if they don't already exist with those credentials. It's also easy to authenticate with a social profile from Google Play Games, Facebook, Game Center, etc.

	var email = "[email protected]"
	var password = "batsignal"
	# Use 'await' to wait for the request to complete.
	var session : NakamaSession = await client.authenticate_email_async(email, password)
	print(session)

Sessions

When authenticated the server responds with an auth token (JWT) which contains useful properties and gets deserialized into a NakamaSession object.

	print(session.token) # raw JWT token
	print(session.user_id)
	print(session.username)
	print("Session has expired: %s" % session.expired)
	print("Session expires at: %s" % session.expire_time)

It is recommended to store the auth token from the session and check at startup if it has expired. If the token has expired you must reauthenticate. The expiry time of the token can be changed as a setting in the server.

	var authtoken = "restored from somewhere"
	var session2 = NakamaClient.restore_session(authtoken)
	if session2.expired:
		print("Session has expired. Must reauthenticate!")

NOTE: The length of the lifetime of a session can be changed on the server with the --session.token_expiry_sec command flag argument.

Requests

The client includes lots of builtin APIs for various features of the game server. These can be accessed with the async methods. It can also call custom logic in RPC functions on the server. These can also be executed with a socket object.

All requests are sent with a session object which authorizes the client.

	var account = await client.get_account_async(session)
	print(account.user.id)
	print(account.user.username)
	print(account.wallet)

Exceptions

Since Godot Engine does not support exceptions, whenever you make an async request via the client or socket, you can check if an error occurred via the is_exception() method.

	var an_invalid_session = NakamaSession.new() # An empty session, which will cause and error when we use it.
	var account2 = await client.get_account_async(an_invalid_session)
	print(account2) # This will print the exception
	if account2.is_exception():
		print("We got an exception")

Socket

The client can create one or more sockets with the server. Each socket can have it's own event listeners registered for responses received from the server.

	var socket = Nakama.create_socket_from(client)
	socket.connected.connect(self._on_socket_connected)
	socket.closed.connect(self._on_socket_closed)
	socket.received_error.connect(self._on_socket_error)
	await socket.connect_async(session)
	print("Done")

func _on_socket_connected():
	print("Socket connected.")

func _on_socket_closed():
	print("Socket closed.")

func _on_socket_error(err):
	printerr("Socket error %s" % err)

Integration with Godot's High-level Multiplayer API

Godot provides a High-level Multiplayer API, allowing developers to make RPCs, calling functions that run on other peers in a multiplayer match.

For example:

func _process(delta):
	if not is_multiplayer_authority():
		return

	var input_vector = get_input_vector()

	# Move the player locally.
	velocity = input_vector * SPEED
	move_and_slide()

	# Then update the player's position on all other connected clients.
	update_remote_position.rpc(position)

@rpc(any_peer)
func update_remote_position(new_position):
	position = new_position

Godot provides a number of built-in backends for sending the RPCs, including: ENet, WebSockets, and WebRTC.

However, you can also use the Nakama client as a backend! This can allow you to continue using Godot's familiar High-level Multiplayer API, but with the RPCs transparently sent over a realtime Nakama match.

To do that, you need to use the NakamaMultiplayerBridge class:

var multiplayer_bridge

func _ready():
	# [...]
	# You must have a working 'socket', created as described above.

	multiplayer_bridge = NakamaMultiplayerBridge.new(socket)
	multiplayer_bridge.match_join_error.connect(self._on_match_join_error)
	multiplayer_bridge.match_joined.connect(self._on_match_joined)
	get_tree().get_multiplayer().set_multiplayer_peer(multiplayer_bridge.multiplayer_peer)

func _on_match_join_error(error):
	print ("Unable to join match: ", error.message)

func _on_match_join() -> void:
	print ("Joined match with id: ", multiplayer_bridge.match_id)

You can also connect to any of the usual signals on MultiplayerAPI, for example:

	get_tree().get_multiplayer().peer_connected.connect(self._on_peer_connected)
	get_tree().get_multiplayer().peer_disconnected.connect(self._on_peer_disconnected)

func _on_peer_connected(peer_id):
	print ("Peer joined match: ", peer_id)

func _on_peer_disconnected(peer_id):
	print ("Peer left match: ", peer_id)

Then you need to join a match, using one of the following methods:

  • Create a new private match, with your client as the host.

    multiplayer_bridge.create_match()
  • Join a private match.

    multiplayer_bridge.join_match(match_id)
  • Create or join a private match with the given name.

    multiplayer_bridge.join_named_match(match_name)
  • Use the matchmaker to find and join a public match.

    var ticket = await socket.add_matchmaker_async()
    if ticket.is_exception():
      print ("Error joining matchmaking pool: ", ticket.get_exception().message)
      return
    
    multiplayer_bridge.start_matchmaking(ticket)

After the the "match_joined" signal is emitted, you can start sending RPCs as usual with the rpc() function, and calling any other functions associated with the High-level Multiplayer API, such as get_tree().get_multiplayer().get_unique_id() and node.set_network_authority(peer_id) and node.is_network_authority().

.NET / C#

If you're using the .NET version of Godot with C# support, you can use the Nakama .NET client, which can be installed via NuGet:

dotnet add package NakamaClient

This addon includes some C# classes for use with the .NET client, to provide deeper integration with Godot:

  • GodotLogger: A logger which prints to the Godot console.
  • GodotHttpAdapter: An HTTP adapter which uses Godot's HTTPRequest node.
  • GodotWebSocketAdapter: A socket adapter which uses Godot's WebSocketClient.

Here's an example of how to use them:

	var http_adapter = new GodotHttpAdapter();
	// It's a Node, so it needs to be added to the scene tree.
	// Consider putting this in an autoload singleton so it won't go away unexpectedly.
	AddChild(http_adapter);

	const string scheme = "http";
	const string host = "127.0.0.1";
	const int port = 7350;
	const string serverKey = "defaultkey";

	// Pass in the 'http_adapter' as the last argument.
	var client = new Client(scheme, host, port, serverKey, http_adapter);

	// To log DEBUG messages to the Godot console.
	client.Logger = new GodotLogger("Nakama", GodotLogger.LogLevel.DEBUG);

	ISession session;
	try {
		session = await client.AuthenticateDeviceAsync(OS.GetUniqueId(), "TestUser", true);
	}
	catch (ApiResponseException e) {
		GD.PrintErr(e.ToString());
		return;
	}

	var websocket_adapter = new GodotWebSocketAdapter();
	// Like the HTTP adapter, it's a Node, so it needs to be added to the scene tree.
	// Consider putting this in an autoload singleton so it won't go away unexpectedly.
	AddChild(websocket_adapter);

	// Pass in the 'websocket_adapter' as the last argument.
	var socket = Socket.From(client, websocket_adapter);

Note: The out-of-the-box Nakama .NET client will work fine with desktop builds of your game! However, it won't work with HTML5 builds, unless you use the GodotHttpAdapter and GodotWebSocketAdapter classes.

Satori

Satori is a liveops server for games that powers actionable analytics, A/B testing and remote configuration. Use the Satori Godot Client to communicate with Satori from within your Godot game.

Satori is only compatible with Godot 4.

Full documentation is online - https://heroiclabs.com/docs/satori/client-libraries/godot/index.html

Getting Started

Add the Satori.gd singleton (in addons/com.heroiclabs.nakama/) as an autoload in Godot.

Create a client object that accepts the API key you were given as a Satori customer.

extends Node

func ready():
	var scheme = "http"
	var host = "127.0.0.1"
	var port: Int = 7450
	var apiKey = "apiKey"
	var client := Satori.create_client(apiKey, host, port, scheme)

Then authenticate with the server to obtain your session.

// Authenticate with the Satori server.
var session = await _client.authenticate_async("your-id")
if session.is_exception():
	print("Error authenticating: " + session.get_exception()._message)
else:
	print("Authenticated successfully.")

Using the client you can get any experiments or feature flags, the user belongs to.

var experiments = await _client.get_experiments_async(session, ["experiment1", "Experiment2"])
var flag = await _client.get_flag_async(session, "FlagName")

You can also send arbitrary events to the server:

var _event = Event.new("gameFinished", Time.get_unix_time_from_system())
await _client.event_async(session, _event)

Contribute

The development roadmap is managed as GitHub issues and pull requests are welcome. If you're interested to improve the code please open an issue to discuss the changes or drop in and discuss it in the community forum.

Run Tests

To run tests you will need to run the server and database. Most tests are written as integration tests which execute against the server. A quick approach we use with our test workflow is to use the Docker compose file described in the documentation.

Additionally, you will need to copy (or symlink) the addons folder inside the test_suite folder. You can now run the test_suite project from the Godot Editor.

To run the tests on a headless machine (without a GPU) you can download a copy of Godot Headless and run it from the command line.

To automate this procedure, move the headless binary to test_suite/bin/godot.elf, and run the tests via the test_suite/run_tests.sh shell script (exit code will report test failure/success).

cd nakama
docker-compose -f ./docker-compose-postgres.yml up
cd ..
cd nakama-godot
sh test_suite/run_tests.sh

Make a new release

To make a new release ready for distribution, simply zip the addons folder recursively (possibly adding CHANGELOG, LICENSE, and README.md too).

On unix systems, you can run the following command (replacing $VERSION with the desired version number). Remember to update the CHANGELOG file first.

zip -r nakama-$VERSION.zip addons/ LICENSE CHANGELOG.md README.md

License

This project is licensed under the Apache-2 License.

nakama-godot's People

Contributors

atlinx avatar beelol avatar coxcopi avatar dominiks avatar dsnopek avatar faless avatar fsufyan avatar geroveni avatar hhuseyincihangir avatar jasonwinterpixel avatar jaydensipe avatar jknightdoeswork avatar lugehorsam avatar meaf75 avatar mohamed-kr avatar nathanlovato avatar novabyte avatar peterkingsbury avatar ratio2 avatar reasv avatar wierdbytes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nakama-godot's Issues

Maybe update the asset Lib?

I am a new Godot developer and kind of new to game development. But working for years now as a DevOps engineer or whatever it's called. I want to say, that Nakama is really great documented and I now this is mostly not the case for this Company size. So great job so far. 👍

I am currently working on my chat implementation and found that this is currently not working in 2.1.0. Somebody fixed this already in 522f01f. But 2.1.0 is the last version that was published to the asset store and this is close to one year now. So I wondering, would you make a new version in the future, or should I switch to master branch?

Some APIs url encode the entire URL which causes issues.

Some APIs in NakamaAPI.gd perform URL encoding on the entire URL which ends up also URL encoding the "/" characters, making the URL unparsable by the Godot HTTP client library.

As an examle, take the following diff for an example of how to solve them:

@@ -4591,7 +4591,7 @@ class ApiClient extends Reference:
                , p_cursor = null # : string
        ) -> ApiStorageObjectList:
                var urlpath : String = "/v2/storage/{collection}"
-               urlpath = NakamaSerializer.escape_http(urlpath.replace("{collection}", p_collection))
+               urlpath = urlpath.replace("{collection}", NakamaSerializer.escape_http(p_collection))
                var query_params = ""
                if p_user_id != null:
                        query_params += "user_id=%s&" % NakamaSerializer.escape_http(p_user_id)
@@ -4623,8 +4623,8 @@ class ApiClient extends Reference:
                , p_cursor = null # : string
        ) -> ApiStorageObjectList:
                var urlpath : String = "/v2/storage/{collection}/{user_id}"
-               urlpath = NakamaSerializer.escape_http(urlpath.replace("{collection}", p_collection))
-               urlpath = NakamaSerializer.escape_http(urlpath.replace("{user_id}", p_user_id))
+               urlpath = urlpath.replace("{collection}", NakamaSerializer.escape_http(p_collection))
+               urlpath = urlpath.replace("{user_id}", NakamaSerializer.escape_http(p_user_id))
                var query_params = ""
                if p_limit != null:
                        query_params += "limit=%d&" % p_limit

There are likely others but I am only using a subset of the APIs in my testing so far so I havent encountered them yet.

Decrypting Socket data-message

Please how do i decrypt , match state data- messages received ?
I seem not to figure it out.

Added Info: i figured it out but should be included in the examples and documentation.

Using Marshalls.base64_to_utf8(WyIxMGNpIiwiMXRyIiwiMTNjciIsIjNjciIsIjdjciIsIjR0ciJd)
decrypts the message.

server encoded message : ["10ci","1tr","13cr","3cr","7cr","4tr"]
data received : WyIxMGNpIiwiMXRyIiwiMTNjciIsIjNjciIsIjdjciIsIjR0ciJd
Example Below :

Received Match State MatchData<match_id=051a4842-69ad-406b-8db3-133fcc79e56b.nakama-node-1, op_code=1, data=WyIxMGNpIiwiMXRyIiwiMTNjciIsIjNjciIsIjdjciIsIjR0ciJd>

Potential memory leak with NakamaException

NakamaException extends Node which does not extend Reference. As such, exceptions are not reference counted. Many functions return exceptions which are ultimately left up to the caller to manually free. This doesn't seem ideal to me.

Is there a reason these are Nodes in the first place? Are they actually added to the SceneTree somewhere? I feel like it would be better to make these simply extend Reference and then if needed, provide a separate Node type that accepts a NakamaException as member variable that can be used to add it to the scene tree.

class MatchData missing member var "presence" (bug fix)

Hi,

It seems like class MatchData in "NakamaRTAPI.gd" is missing its "presence" member variable. It is listed in the class _SCHEMA, so after simply adding such a var to the class I was able to decode the sender of the message:

var presence : UserPresence # Add this line to the class body

Sincerely,
chrutta

Matchmaker not finding match

Hi all,

Development is going really well, Nakama's making setting up multiplayer stuff so much easier than I thought I would be, so thank you for all your effort in enabling that :)

The problem:

I've got the matchmaker function set up in Godot like the one below. Problem is when I call it, it doesn't match with anything, even if another user is running an identical copy of it (it does successfully generate matchmaker tickets though). It does, however, work when I set the query to "*". Any idea why this could be?

func matchmaker()
	var query = "+properties.property1:placeholder +properties.property2:placeholder"
	var min_count = 2
	var max_count = 2
	var string_properties = {
		"property1":"placeholder",
		"property2":"placeholder"
		}
	var numeric_properties = {"property3" : 1}
	#matchmaker_ticket : NakamaRTAPI.MatchmakerTicket
	matchmaker_ticket = yield(socket.add_matchmaker_async(query, min_count, max_count, string_properties, numeric_properties), "completed")

Serializer discards Matchmaking Properties, breaking the query functionality

Hello,
it seems like the NakamaSerializer doesn't include the properties for matchmaking, leading to Matchmaking Tickets without any of the given properties. I think my code is correct, but just in case this is what I use to request a matchmaker ticket:

...
func matchmaking_start_map_async(map_id:int):
	var query = "+properties.map_id:%s"%map_id
	var min_count = 2
	var max_count = 2
	var string_properties = {}
	var numeric_properties = {
		"map_id": map_id
	} 
	matchmaker_ticket = yield(
	  socket.add_matchmaker_async(query, min_count, max_count, string_properties, numeric_properties),
	  "completed"
	)
	if matchmaker_ticket.is_exception():
	  printerr("An error occured: %s" % matchmaker_ticket)
	  return
	print("Got ticket for matchmaking: %s" % [matchmaker_ticket])
	emit_signal("matchmaking_started")`

The godot console prints it correctly:

=== Nakama : DEBUG === Sending async request: MatchmakerAdd<query=+properties.map_id:1639436125, max_count=2, min_count=2, numeric_properties={map_id:1639436125}, string_properties={}>

But in the actual request there are neither numeric nor string properties:

server-nakama-1 | {"level":"debug","ts":"2021-12-14T19:24:23.434Z","caller":"server/pipeline.go:66","msg":"Received *rtapi.Envelope_MatchmakerAdd message","uid":"a5e9f13a-3a2c-4dbf-a490-bc02412fb4f9","sid":"6f6841f3-5d13-11ec-a2e2-7106fdcb5b46","cid":"1","message":{"MatchmakerAdd":{"min_count":2,"max_count":2,"query":"+properties.map_id:1639436125"}}}

Following the debugger, the properties get discarded because of the check in Line 47 in res://addons/com.heroiclabs.nakama/utils/NakamaSerializer.gd

Improve error reporting and disconnect detection

I recently ran into issue where Godot client silently disconnects without error if server sends too big message. Message data is JSON encoded deck of my card game and I'll probably add some kind of compression if I end up using decks of this size in future.

Debug level logs from server:

{"level":"info","ts":"2021-09-11T17:21:41.767+0300","caller":"server/runtime_lua_nakama.go:1780","msg":"Sending JSON with size of 63146 characters","mid":"...","runtime":"lua"}
{"level":"debug","ts":"2021-09-11T17:21:41.772+0300","caller":"server/session_ws.go:204","msg":"Error reading message from client","uid":"...","sid":"...","error":"websocket: close 1009 (message too big)"}
{"level":"info","ts":"2021-09-11T17:21:41.773+0300","caller":"server/session_ws.go:438","msg":"Cleaning up closed client connection","uid":"...","sid":"..."}

Server correctly handles websocket disconnect but looks like this error is not caught/displayed anywhere on client side.

Message max size is set here and it is used to throw WSLAY_CODE_MESSAGE_TOO_BIG = 1009 error. https://github.com/godotengine/godot/blob/master/thirdparty/wslay/includes/wslay/wslay.h#L446

I expected to get "socket_received_error" and/or "socket_closed" events from Godot client for this. Automatic reconnect or option for ignoring this error might be nice.

NakamaClient.write_storage_objects_async failing during deserialization

I am calling the API like so:

func store_npc(npc_name : String, npc_info : Dictionary) -> int:
	var obj :=  NakamaWriteStorageObject.new("npcs", npc_name, 2, 1, to_json(npc_info), "")
	var resp = yield(rest.write_storage_objects_async(session, [obj]), "completed")
	if resp.is_exception():
		print("failed to write storage object: ", resp.get_exception()._to_string())
		return FAILED
	return OK

but when I make the call to store_npc I get the following error:
Invalid type in function 'deserialize' in base 'GDScript'. Cannot convert argument 3 from Object to Dictionary.

error

HTML5 authenticate_device_async(): HTTPRequest failed!

I'm having trouble to get the HTML5 export to connect to my nakama instance.

When running authenticate_device_async(), nakama-godot returns an "HTTPRequest failed!" exception, but when I look in the network tab, the request was successful (200 OK)

Godot version: 3.3.rc7.official (both desktop exported HTML5 app and https://editor.godotengine.org reports the same bug)

Nakama-godot log:

=== Nakama : DEBUG === Request 1 failed with result: 2, response code: 0

`HTTPRequest.useThreads = true` flag causes issues on HTML5 export

The req.use_threads = true line on client/NakamaHTTPAdapter.gd causes the HTTPClient blocking mode is not supported for the HTML5 platform. and At: platform/javascript/http_client_javascript.cpp:201:set_blocking_mode() - Condition "p_enable" is true. devconsole warnings and fails the request with exception `NakamaException(StatusCode={8}, Message='{HTTPRequest failed!}', GrpcStatusCode={-1})``.

I believe as threads aren't supported on HTML5 exports, would be best to check for OS.get_name() != "HTML5". Alternatively, exposing the setting to the developer could avoid both manually editing the API & future changes that might make multithreading feasible on the web.

docker-compose up ERROR: Couldn't connect to Docker daemon

After following gdquest's tutorial here I ran into this issue when running docker-compose up..

ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I checked my system manager and no godot instances are running
there is no part in the video where he starts the docker

Failure to do uniq control with registration with a special name in the username field.

I am currently developing a multiplayer game using nakama on Godot. In the nakama database opened by Nakama in CockroachDB, the email address in the users table appears as uniq. However, when registered with the registered email address, the server returns a positive response without any error. In the Godot client, the e-mail address received from the user while registering is registered in both the user name field and the e-mail field. When trying to record this separately, the email address should be uniq and give an error, but a positive message is returned as the registration is done.

  • Corrections I made to enter user's username instead of email in username field.
    ServerConnection.gd
    resim
    Authenticator.gd
    resim

Issue with the hook "register_matchmaker_matched" and "add_matchmaker_async()"

I'm facing an issue with the hook "register_matchmaker_matched", the hook executed currectly but the "string_properties" and "numeric_properties" are not passed to the server side.
Here is the client side function:

func request_match(size:int): var query = "*" var min_count = 2 var max_count = 2 var string_properties : Dictionary = { "name" : "game" } var numeric_properties : Dictionary = { "size" : size } var matchmaker_ticket : NakamaRTAPI.MatchmakerTicket = yield( socket.add_matchmaker_async(query, min_count, max_count,string_properties,numeric_properties), "completed" ) if matchmaker_ticket.is_exception(): print("An error occured: %s" % matchmaker_ticket) return print("Got ticket: %s" % [matchmaker_ticket])
And the server side function:
local function matchmaker_matched(context, matchmaker_users) local server_details = match.create_server(context) for _, m in ipairs(matchmaker_users) do print(">>users properties:") print(m.properties) print(#(m.properties)) end return nil end nk.register_matchmaker_matched(matchmaker_matched)

The "m.properties" print an empty array with 0 length, which is supposed to print the "string_properties" and the "numeric_properties".

I'm using the latest server version, 2.14.1, and the latest godot client "2.1.0" and tried the current master branch but still having the same issue.

Thanks in advance

Socket keep closing Automatically on Mac OSX

Nakama Version : 2.9.1+8f527a71

Model Name: MacBook Pro
Model Identifier: MacBookPro15,1
Processor Name: 6-Core Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 9 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB

Debug Log

{"level":"info","ts":"2020-02-04T18:25:16.485+0100","msg":"New WebSocket session connected","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48","format":0}
{"level":"info","ts":"2020-02-04T18:25:16.501+0100","msg":"Cleaning up closed client connection","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48"}
{"level":"info","ts":"2020-02-04T18:25:16.501+0100","msg":"Cleaned up closed connection matchmaker","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48"}
{"level":"info","ts":"2020-02-04T18:25:16.501+0100","msg":"Cleaned up closed connection tracker","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48"}
{"level":"info","ts":"2020-02-04T18:25:16.501+0100","msg":"Cleaned up closed connection session registry","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48"}
{"level":"debug","ts":"2020-02-04T18:25:16.501+0100","msg":"Could not send close message","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48","error":"websocket: close sent"}
{"level":"info","ts":"2020-02-04T18:25:16.501+0100","msg":"Closed client connection","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dfc44c0d-3267-4c44-a3f0-3ffc960f8b48"}

Godot 3.2.2

res://addons/com.heroiclabs.nakama/utils/NakamaSerializer.gd:41 - Parse Error: Variable "k" already defined in the scope (at line 9).

since upgrade to new godot nakama not work?
tried making new project with nothing but create and print client and same error
sorry, thanks

Regression in 3.0 for NakamaException.message

When using Nakama Server 2.x, when an invalid request is sent, NakamaException.message will be simply a string containing a user readable error message, eg: "Invalid email address format.".

However, when using Nakama Server 3.x, the same request will result in a NakamaException containing the string:

{code:3, message:Invalid email address format.}

This is not valid JSON and is invalid behaviour.

socket.add_matchmaker_async does not appear to set the min_count value

var query = "*"
var min_count = 1
var max_count = 3
var string_properties = { "region": "europe" }
var numeric_properties = { "rank": 8 }
var matchmaker_ticket : NakamaRTAPI.MatchmakerTicket = yield(socket.add_matchmaker_async(query, min_count, max_count, string_properties, numeric_properties),"completed")

Actual result:
An error occured: NakamaException(StatusCode={3}, Message='{Invalid maximum count, must be >= minimum count}', GrpcStatusCode={-1})

Expected result:
No error.

While
var query = "*"
var min_count = 3
var max_count = 1
var string_properties = { "region": "europe" }
var numeric_properties = { "rank": 8 }
var matchmaker_ticket : NakamaRTAPI.MatchmakerTicket = yield(socket.add_matchmaker_async(query, min_count, max_count, string_properties, numeric_properties),"completed")

Actual result:
No error.

Expected result:
An error occured: NakamaException(StatusCode={3}, Message='{Invalid maximum count, must be >= minimum count}', GrpcStatusCode={-1})

Context:
Godot client (script)
Windows 10

Signal received_error(p_error) of NakamaSocket never emitted

I maybe found an error in the code.
The received_error signal of the _adapter object of the NakamaSocket is connect to the _closed method, should it be connect to the _error method instead ?

The error was too big so I thought it was maybe a temporary solution because maybe the _error method was not finalize yet. But the _error method seems to be the only one emitting the received_error signal and since the README.md or other documentation use the received_error signal without mentioning any lake of implementation I decided to post this issue.

Can you please tell me if I am wrong what I missed ? I was trying to figure out how server errors were handled and how the _resume_conn function is uses in the NakamaSocket, I would be pleased if you have an once of explication.

Shadowed Variables crash GDScript Parser

Just bringing this: godotengine/godot#39861 to the attention of HeroicLabs.
The nakama-godot client in its current state is broken because of this.

I fixed it by changing the names on my end but didn't do a pull request since I'm not sure I'm familiar with naming conventions & best practices.

HTML5 export can't connect

Hello,
after playing around with the Godot integration (having used nakama and godot in previous projects) I noticed that html5 exports can’t connect to the server. I get Status Code = 8 and Message HTTPRequest Failed, so a pretty generic error I think.

The documentation explicitly says html5 works (here) so why doesnt it?

The same exact build for Linux works flawlessly as usual only html exports (tested with godots local debug html5 server, with nginx on my website and itch.io html hosting) can’t ever connect.

Do I need special settings for html exports? Or what else could cause this?

NakamaException : Missing or invalid required prop {name:token, required:True, type:4} (NakamaRTAPI.gd) Bug

I get this returned by the admatcher Please see below:

var ticket = yield(socket.add_matchmaker_async("*",2,2,{},{}),"completed")

func _on_received_matchmaker_matched(p_matchmaker_matched):
print("Matcher Mathced : ",p_matchmaker_matched)

The Above callback returns below 👍

NakamaException(StatusCode={-1}, Message='{ERROR [MatchmakerMatched]: Missing or invalid required prop {name:token, required:True, type:4} = Null:
{match_id:c415e717-05d8-4a80-a65d-c4b89e9f0fac.nakama-node-1, self:{presence:{session_id:32925588-dd57-4c65-90a3-48d6366f33a6, user_id:1831b11b-2da0-4e46-a2be-f8e8a5d3f530, username:ashtonkase}}, ticket:aa3f28df-4047-44ee-a2c7-b748acdb7fd6, users:[{presence:{session_id:32925588-dd57-4c65-90a3-48d6366f33a6, user_id:1831b11b-2da0-4e46-a2be-f8e8a5d3f530, username:ashtonkase}}, {presence:{session_id:fafdaff4-efaf-4579-aa2e-f491e8fcc74f, user_id:889c3b43-eeb1-4c73-983f-bc76ca04ac9d, username:G:10115341080}}]}}', GrpcStatusCode={-1})

Message sent by Nakama Server :

Screenshot 2020-02-09 at 08 17 51

{"level":"debug","ts":"2020-02-09T08:12:52.527+0100","msg":"Sending *rtapi.Envelope_Match message","uid":"889c3b43-eeb1-4c73-983f-bc76ca04ac9d","sid":"f5e8dbd9-8cce-40f3-87d0-b2aa20d36760","envelope":"cid:\"3\" match: size:1 presences: self: > "}

Screenshot 2020-02-09 at 07 28 31

NakamaRTAPI.gd: (I think the issue is from the below class ,but still trying to figure it out)
class MatchmakerMatched extends NakamaAsyncResult:

Sending state from web client does not work immediately after joining match

I am using Godot 3.2 and latest Nakama from Docker.
My clients all match and connect correctly, and use socket.send_match_state_async() to exchange messages, This works between Desktop clients.

However HTML clients do not seem to be sending messages. They will receive them from desktop clients but not send them successfully.
This issue only presents itself when sending a message immediately after yield(socket.join_matched_async(p_matched), "completed")

It does work correctly in my "real" netcode which only starts sending state after a while, and from a different function.

I suspect this might be due to me misunderstanding how to use async in GDScript, however I'm opening an issue just in case.

Here's a sample of code that reproduces the bug, mostly copied from the tutorials:

func _ready():
    socket.connect("received_matchmaker_matched", self, "_on_channel_matchmaker_matched")
    socket.connect("received_match_state", self, "_on_match_state")

func _on_channel_matchmaker_matched(p_matched : NakamaRTAPI.MatchmakerMatched):
    #print("Received MatchmakerMatched message: %s" % [p_matched])
    print("Matched opponents: %s" % [p_matched.users])
    var joined_match = yield(socket.join_matched_async(p_matched), "completed")
    if joined_match.is_exception():
        print("An error occured: %s" % joined_match)
        return
    print("Joined match: %s" % [joined_match.match_id])
    var op_code = 1
    var new_state = {"hello": "world"}
    var send_state = yield(socket.send_match_state_async(joined_match.match_id, op_code, JSON.print(new_state)), "completed")
    print("Sent: ", send_state)
    emit_signal("matchmaker_matched", joined_match)

func _on_match_state(p_state : NakamaRTAPI.MatchData):
    print("Received match state with opcode %s, data %s" % [p_state.op_code, parse_json(p_state.data)])

Of course you need to log in and matchmake before this, but that's all working fine.

socket.send_match_state_async Sending Malformed data to Nakama server

Nakama server : 2.10.0+e27ac0d2
Godot : 3.2 stable
OS : Mac OSX Catalina

How to reproduce:

create two clients , add clients to matcher-handler for a two player match(authoritative).
Send a Socket data message to server ::

var dict = {"ready":"ready"}
var jstr = JSON.print(dict)
print("Json :",jstr)
var ready = yield(socket.send_match_state_async(p_match_presence_event.match_id,110,jstr),"completed")
print("Ready !!! ", ready)

**Please Note an empty string doesnt throw an error.

Nakama Error ::

{"level":"warn","ts":"2020-02-14T18:42:10.700+0100","msg":"Received malformed payload","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dd51ceab-a3ae-4a53-b583-565019fb3752","data":"eyJjaWQiOiI0IiwibWF0Y2hfZGF0YV9zZW5kIjp7Im1hdGNoX2lkIjoiNGRlOTQ5MDQtOWQyNy00NjQ3LWFmYTYtNGNiNGFkY2Y1YzJhLm5ha2FtYS1ub2RlLTEiLCJvcF9jb2RlIjoiMTEwIiwiZGF0YSI6IntcInJlYWR5XCI6XCJyZWFkeVwifSJ9fQ=="}
{"level":"info","ts":"2020-02-14T18:42:10.700+0100","msg":"Cleaning up closed client connection","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dd51ceab-a3ae-4a53-b583-565019fb3752"}
{"level":"info","ts":"2020-02-14T18:42:10.700+0100","msg":"Cleaned up closed connection matchmaker","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dd51ceab-a3ae-4a53-b583-565019fb3752"}
{"level":"info","ts":"2020-02-14T18:42:10.700+0100","msg":"Cleaned up closed connection tracker","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dd51ceab-a3ae-4a53-b583-565019fb3752"}
{"level":"info","ts":"2020-02-14T18:42:10.700+0100","msg":"Cleaned up closed connection session registry","uid":"1831b11b-2da0-4e46-a2be-f8e8a5d3f530","sid":"dd51ceab-a3ae-4a53-b583-565019fb3752"}

Typo

The generated code is designed to be supported Godot Eengine 3.1+.

Godot Engine

Godot - Memory leakage in addon

When adding the Nakama autoload singleton and running/exiting the game (without accessing any of Nakama's functionalities), the console reports memory leakage.

image

Steps to reproduce:

  • Make a new project and add a main scene
  • Enable "verbose stdout" in the Project Settings
  • Download "Nakama" from the Assetlib
  • Add the Nakama.gd as an autoload singleton
  • Run & Exit the main scene
  • Check the console for leaks!

Type dictionary serialize doesn't work

Type dictionary are not processed correctly in the NakamaSerializer serialize function.

I tried to use the function

server_client.socket.add_matchmaker_async(maker_query, maker_min_count, maker_max_count, maker_string_properties, maker_numeric_properties)

but the server didn't received any properties.

In the master code of serialize:

TYPE_DICTIONARY: # Maps
	var dict = {}
	if content == TYPE_OBJECT: # Map of objects
	for l in val:
		if val_type != TYPE_OBJECT:
			continue
		dict[l] = serialize(val)
		        else: # Map of simple types
		for l in val:
			if val_type != content:
				continue
			dict[l] = val

We can see two problems, the serialize value dict is not put into the out dictionary, and val_type or val is used many times in the place of typeof(val[l]) and val[l].

My solution:

TYPE_DICTIONARY: # Maps
	var dict = {}
	if content == TYPE_OBJECT: # Map of objects
		for l in val:
			if typeof(val[l]) != TYPE_OBJECT:
				continue
			dict[l] = serialize(val[l])
	else: # Map of simple types
		for l in val:
			if typeof(val[l]) != content:
				continue
			dict[l] = val[l]
				
	out[k] = dict

I tested it and it works now

Godot NakamaClient.gd issue with "list_matches_async" function

If i want to list just non-authoritative matches and i set the p_authoritative parameter to false, even though i set label,query to empty string i get: {code:3, message:Label filtering is not supported for non-authoritative matches}, if i set it to true it still wont find be my non-authoritative match.
Thanks beforehand for fixing this issue.

RPC function not found

I decided to put the nakama on the VDS, but this error appeared when I tried to shove something into the storage

GODOT:
=== Nakama : DEBUG === Request 4 returned response code: 404, RPC code: 5, error: RPC function not found

there were more warnings when starting docker-compose.yml

Ubuntu:
nakama | {"level":"warn","ts":"2020-08-20T07:25:40.186Z","msg":"WARNING: insecure default parameter value, change this for production!","param":"console.username"}

nakama | {"level":"warn","ts":"2020-08-20T07:25:40.186Z","msg":"WARNING: insecure default parameter value, change this for production!","param":"console.password"}

nakama | {"level":"warn","ts":"2020-08-20T07:25:40.187Z","msg":"WARNING: insecure default parameter value, change this for production!","param":"console.signing_key"}

nakama | {"level":"warn","ts":"2020-08-20T07:25:40.187Z","msg":"WARNING: insecure default parameter value, change this for production!","param":"session.encryption_key"}

nakama | {"level":"warn","ts":"2020-08-20T07:25:40.187Z","msg":"WARNING: insecure default parameter value, change this for production!","param":"runtime.http_key"}

Ubuntu 18.04

v2.1.0 add_matchmaker_async function does not send string properties and numeric properties

with the latest release, this bug toke me very long time to figure out it does not send these two properties
I try to run code as
var query = "+properties.region:europe +properties.rank:>=5 +properties.rank:<=10"
var min_count = 2
var max_count = 4
var string_properties = { "region": "europe" }
var numeric_properties = { "rank": 8 }
var matchmaker_ticket : NakamaRTAPI.MatchmakerTicket = yield(socket.add_matchmaker_async(query, min_count, max_count, string_properties, numeric_properties),"completed")
with the result as
{"level":"debug","ts":"2021-08-10T06:54:50.328Z","caller":"server/pipeline.go:65","msg":"Received *rtapi.Envelope_MatchmakerAdd message","uid":"47349f45-2f4f-4cf0-9891-5ee3182714bd","sid":"db7c4232-f9a7-11eb-92a6-7106fdcb5b46","cid":"1","message":{"MatchmakerAdd":{"min_count":2,"max_count":4,"query":"+properties.region:europe +properties.rank:>=5 +properties.rank:<=10"}}}

However after some try, I switch to the fish game demo, it give me a right result, so I copy and paste the whole addon package from the fish game demo to my own code, after that, the result be corrected, which is
{"level":"debug","ts":"2021-08-10T07:00:04.640Z","caller":"server/pipeline.go:65","msg":"Received *rtapi.Envelope_MatchmakerAdd message","uid":"47349f45-2f4f-4cf0-9891-5ee3182714bd","sid":"96d3f99d-f9a8-11eb-92a6-7106fdcb5b46","cid":"1","message":{"MatchmakerAdd":{"min_count":2,"max_count":4,"query":"+properties.region:europe +properties.rank:>=5 +properties.rank:<=10","string_properties":{"region":"europe"}}}}

hope you guys make a correction on this bug on your next release

Unhandled error Invalid match ID

This issue is linked to issue #38 that has been closed by #39 . I don't think the fix is correct. I will explain myself.

There are two kinds of errors the client can expect to "received" actually. Socket errors and server errors. Example of socket errors are timeout, host not found, connection closed by the host, etc. An example of server error is trying to join a match with an invalid ID. In this case errors are sent by the server through the web socket connection and is as follow: {error:{code:3, message:Invalid match ID}}.

=== Nakama : DEBUG === Sending async request: MatchDataSend<match_id=a, op_code=1, presences=Null, data=eyJoZWxsbyI6IndvcmxkIn0=>
=== Nakama : WARNING === Unhandled response: {error:{code:3, message:Invalid match ID}}

As you can see in the current version this error is not handled, still after the fix of #39.

What I think is that message without a call id and having an error entry should trigger received_error signal of NakamaSocket.gd, and it's what is defined as a server error. Like a message without a call id and having a match_data entry triggers received_match_state signal.

For socket error, it can, of course, still trigger the received_error signal as fixed in #39. But I think, socket error and server error should be in separate signal, and socket error should be handled in socket_closed since a socket error closes the socket. This can explain the error report in #38, that, in fact, was not one.

Document the code generator

NakamaAPI.gd is generated by code/main.go, but there is no instructions on how to run it. This hinders willing contributors ability to update the project and causes the community to be dependant on those in the know.

Changing value of DEFAULT_LOG_LEVEL in Nakama.gd does nothing

In the file Nakama.gd there is a const named DEFAULT_LOG_LEVEL, implying it is the default level of log and, changing it should change the log level. But this const is never used.

Annotation 2020-05-16 163443

A possible solution is to DEFAULT_LOG_LEVEL should be use in line 22 of Nakama.gd

var logger = NakamaLogger.new("Nakama", DEFAULT_LOG_LEVEL)

Connection closes when passing restored session to NakamaSocket.connect_async

Attempting to connect a NakamaSocket from a NakamaSession restored from a token fails and emits signal closed. I might be missing something here such as having to wait for a signal from the session before connecting or something of the sort, so if that's the case would like to suggest adding a note on the Docs (also please don't forget to tell me here :]).

Can't run exported Godot Engine project with NakamaAPI on Windows 10

Description

Error thrown when trying to open a Godot Engine project exported for Windows 10

Steps to Reproduce

  1. Create a project following GDQuest's tutorial or download mine -> godot.zip
  2. Export the project for windows 10
  3. Run the project and read the logfile

Expected Result

The .exe should work fine, like an exported HTML5 version I've tested myself

Actual Result

Godot Engine v3.2.3.rc3.mono.official - https://godotengine.org
OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 520

Mono: Logfile is: C:/Users/nsant/AppData/Roaming/Godot/app_userdata/TEST/mono/mono_logs/2020_08_17 14.21.49 (12628).txt
**SCRIPT ERROR**: Parse Error: Expected a constant expression.
  At: res://addons/com.heroiclabs.nakama/Nakama.gdc:21:GDScript::load_byte_code() - Parse Error: Expected a constant expression.
**ERROR**: Method failed. Returning: ERR_PARSE_ERROR
  At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
**ERROR**: Cannot load byte code from file 'res://addons/com.heroiclabs.nakama/Nakama.gdc'.
  At: modules/gdscript/gdscript.cpp:2282:load() - Condition "err != OK" is true. Returned: RES()
**ERROR**: Failed loading resource: res://addons/com.heroiclabs.nakama/Nakama.gdc.
  At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
**ERROR**: Can't autoload: res://addons/com.heroiclabs.nakama/Nakama.gd
  At: main/main.cpp:1757:start() - Condition "res.is_null()" is true. Continuing.
**SCRIPT ERROR**: Parse Error: The identifier "NakamaAPI" isn't a valid type (not a script or class), or couldn't be found on base "self".
  At: res://src/Main/ServerConnection.gdc:98:GDScript::load_byte_code() - Parse Error: The identifier "NakamaAPI" isn't a valid type (not a script or class), or couldn't be found on base "self".
**ERROR**: Method failed. Returning: ERR_PARSE_ERROR
  At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
**ERROR**: Cannot load byte code from file 'res://src/Main/ServerConnection.gdc'.
  At: modules/gdscript/gdscript.cpp:2282:load() - Condition "err != OK" is true. Returned: RES()
**ERROR**: Failed loading resource: res://src/Main/ServerConnection.gdc.
  At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
**ERROR**: res://src/Main/Main.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://src/Main/ServerConnection.gd
  At: scene/resources/resource_format_text.cpp:440:poll() - res://src/Main/Main.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://src/Main/ServerConnection.gd
**ERROR**: Failed to load resource 'res://src/Main/Main.tscn'.
  At: core/io/resource_loader.cpp:208:load() - Condition "err != OK" is true. Returned: RES()
**ERROR**: Failed loading resource: res://src/Main/Main.tscn.
  At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
**ERROR**: Failed loading scene: res://src/Main/Main.tscn
  At: main/main.cpp:1944:start() - Condition "!scene" is true. Returned: false
**WARNING**: ObjectDB instances leaked at exit (run with --verbose for details).
  At: core/object.cpp:2135:cleanup() - ObjectDB instances leaked at exit (run with --verbose for details).
**ERROR**: Resources still in use at exit (run with --verbose for details).
  At: core/resource.cpp:477:clear() - Resources still in use at exit (run with --verbose for details).

Context

  • [ X ] Godot Engine

Your Environment

  • Nakama: 2.1.0 - August
  • Database: cockroachdb/cockroach:v19.2.5
  • Environment name and version: Godot Engine v3.2.3.rc3.mono.official
  • Operating System and version: Windows 10 Pro x64

Branching or naming scheme required to match sdk version with server version

This sdk currently only works with nakama server 2.x

There is no indication of this limitation.

A major version of the SDK should be compatable with the same major version of the server.

eg) sdk version 2.x works with server version 2.x, sdk version 3.x works with server version 3.x

I suggest that master branch on this repo always be the latest version of the sdk, but there should be a branch named 2.x that contains the latest version of the sdk that works against nakama server 2.x

Prepare for new GDScript syntax (GDScript 2.0)

Probably not an issue now but and it might take a while but once 4.0 releases this addon MAYBE can't be used anymore in its current state as gdscript got an overhaul (more on that here). I didn't look into the code yet and it MAY be that this actually works just fine. But if it does break: (did by now and yes it breaks)
As currently only the development branch (master) is affected I think it would be a good idea to not update master directly but keep a seperate branch for this until 4.0 is ready for release. This way the new implementation can be released simultaneously to 4.0 (and of course the 3.x one can be kept seperate). Might also be a good idea to keep 3.x in a seperate branch (but this depends on whether there will be support for 3.x once 4.0 is out)

Socket connection to group chat problem

In my Godot client when i want to join the group chat i got this error:
NakamaException(StatusCode={-1}, Message=’{ERROR [Channel]: Missing or invalid required prop {content:UserPresence, name:presences, required:True, type:19} = Null:
{group_id:bf5052a9-948c-473b-b81e-ccf76d28126a, id:3.bf5052a9-948c-473b-b81e-ccf76d28126a…, self:{persistence:True, session_id:d2dd400b-22dc-11eb-8d0d-7106fdcb5b46, user_id:20a96d58-4d6f-4338-b487-2bfc10b7a43d, username:QdcBVBRWvL}}}’, GrpcStatusCode={-1})

TCP and UDP support

As I understand, currently only http and websocket for the realtime are implemented, although nakama server supports TCP and UDP too. ¿Are there any plans on supporting UDP transport for allowing unreliable sending packets? TCP would be nice to have but websocket covers the same purpose.
Also, ¿can raw binary data be sent through the websocket? So, ¿is the en/decoding to base64 needed?

Thank you in advance and thank you very much for the work you've done, this technology looks promising!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.