All Projects → Windastella → godothub_client

Windastella / godothub_client

Licence: MIT license
GodotHub Client Class, Multiplayer and network messaging for Godot

Programming Languages

GAP
223 projects
GDScript
375 projects

Projects that are alternatives of or similar to godothub client

entity spell system
An entity and spell system c++ godot engine module, for complex (optionally multiplayer) RPGs.
Stars: ✭ 86 (+437.5%)
Mutual labels:  multiplayer, godot
space
A SCI-FI community game server simulating space(ships). Built from the ground up to support moddable online action multiplayer and roleplay!
Stars: ✭ 25 (+56.25%)
Mutual labels:  multiplayer, godot
broken seals
An open source third person action RPG with multiplayer support.
Stars: ✭ 223 (+1293.75%)
Mutual labels:  multiplayer, godot
Mdframework
A multiplayer C# game framework for Godot 3.2 Mono.
Stars: ✭ 34 (+112.5%)
Mutual labels:  multiplayer, godot
liblast
A libre multiplayer FPS game created in Godot Engine
Stars: ✭ 92 (+475%)
Mutual labels:  multiplayer, godot
Godot Multiplayer Demo
A multiplayer demo using Godot Engine's (2.2) high level networking
Stars: ✭ 52 (+225%)
Mutual labels:  multiplayer, godot
Godot goodies
Collection of nice stuff for Godot
Stars: ✭ 263 (+1543.75%)
Mutual labels:  multiplayer, godot
godothub
Multiplayer and network messaging for Godot.
Stars: ✭ 19 (+18.75%)
Mutual labels:  multiplayer, godot
SuperCTF
A multiplayer capture the flag game made in Godot with love and blood. Running live at www.superctf.com
Stars: ✭ 26 (+62.5%)
Mutual labels:  multiplayer, godot
backgammony
A backgammon client with multiplayer support
Stars: ✭ 37 (+131.25%)
Mutual labels:  multiplayer
GodotAnimationRetargeting
Animation Retargeting module for Godot Game Engine
Stars: ✭ 96 (+500%)
Mutual labels:  godot
godot-sponza
Sponza demo for Godot 3.x (`master` branch) and 4 (`4.0-dev` branch)
Stars: ✭ 133 (+731.25%)
Mutual labels:  godot
godot-dynamic-gltf-loader
Dynamic GLTF loader module for Godot 3.2.4+
Stars: ✭ 14 (-12.5%)
Mutual labels:  godot
voxelfield
Server authoritative multiplayer shooter game with fully destructible terrain
Stars: ✭ 20 (+25%)
Mutual labels:  multiplayer
WebRtcShitBlt
client side WebRTC lib to add an image / watermark on the MediaSource
Stars: ✭ 19 (+18.75%)
Mutual labels:  client-side
Godot-3.0-Noise-Shaders
Godot 3.0 Noise Shaders
Stars: ✭ 38 (+137.5%)
Mutual labels:  godot
OSIS
Entity Component System with network support (for haxe)
Stars: ✭ 40 (+150%)
Mutual labels:  multiplayer
Kosm-Classic-FPS-Template-UE4
Classic Arena First-Person-Shooter Mechanics for Unreal Engine 4.
Stars: ✭ 38 (+137.5%)
Mutual labels:  multiplayer
SocketIOUnity
A Wrapper for socket.io-client-csharp to work with Unity.
Stars: ✭ 69 (+331.25%)
Mutual labels:  multiplayer
godopy
[WIP] Python scripting for the Godot game engine
Stars: ✭ 27 (+68.75%)
Mutual labels:  godot

Godot GodotHub Class API

Multiplayer and network messaging Server for Godot.

The Godot Client code are in written as class which can be instanced through script.

The main idea of GodotHub is to have a thin server that only handle the connection and broadcast the data to channel(lobby).

GodotHub : GodotHub NodeJS Server

Implementation

The class for the client is in scripts/godothub.gd . Copy and load it into your game through script.

extends Node

onready var godothub = preload('scripts/godothub.gd')
onready var conn = godothub.new()

func _ready():
	set_process(true)

  # Connect to message signal of godothub to callback
	conn.connect("message",self,"_on_receive")

func _process(dt):

  # Listening for packet
	conn.is_listening()

# Callback for receiving incoming packet
func _on_receive(data):
	print("Receive Data: ",data)

API

Methods

.new

var obj = godothub.new( serverport, serverhost, channel, clientport)

Initialize the godothub object.

serverport Port of the Server. Default: 5000

serverhost Host Address of Server. Default: localhost

channel Initial Lobby or Room. Default: global

clientport Client's listen port. Default: 4000

.is_listening

obj.is_listening()

Listen for packet.

Return: boolean

.change_channel

obj.change_channel(channel)

Leave current channel and Join new channel. Creating new channel if the channel does not exist yet.

channel lobby you are changing to.

.broadcast

obj.broadcast(data)

Send data to the server and all clients.

data The data are formatted into JSON format.

.multicast

obj.multicast(data)

Send data to the server and all client in current channel.

data The data are formatted into JSON format.

.unicast

obj.unicast(data, ID)

Send data to the server and to specified client.

data The data are formatted into JSON format.

ID The ID of targeted client.

.disconnect_server

obj.disconnect_server()

Disconnect from server.

Signals

error(err)

Triggered when connection return error.

connected

Triggered if connection successful.

join(id)

Triggered when new client joined the channel.

id is the id of the new client.

left(id)

Triggered when a client left the channel.

id is the id of the leaving client.

message(data)

Triggered when data arrived.

data The received data.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].