This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node | |
## Networking TCP client/server architecture for godot 4 (WIP) | |
## | |
## Includes TYPE_VARIANT serialization using encode_var/decode_var for network serialization | |
@onready var sock_server : TCPServer = TCPServer.new() | |
@onready var sock_client : Socket = Socket.new() | |
var host : String = "localhost" | |
var serve_port: int = 7777 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module logger; | |
/* | |
- Supported types: string, int, float, bool | |
- License CC0, URL: https://creativecommons.org/publicdomain/zero/1.0/ | |
Using logger.d: | |
------------------- | |
import logger; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from: http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript | |
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
}); |