Skip to content

Instantly share code, notes, and snippets.

View NovemberDev's full-sized avatar
🌊
somewhere out there

NovemberDev

🌊
somewhere out there
View GitHub Profile
@NovemberDev
NovemberDev / godot_async_scene_loader.gd
Last active March 12, 2025 16:00
Asynchronously loads scenes in godot
# Loads a scene in the background using a seperate thread and a queue.
# Foreach new scene there will be an instance of ResourceInteractiveLoader
# that will raise an on_scene_loaded event once the scene has been loaded.
# Hooking the on_progress event will give you the current progress of any
# scene that is being processed in realtime. The loader also uses caching
# to avoid duplicate loading of scenes and it will prevent loading the
# same scene multiple times concurrently.
#
# Sample usage:
#
@NovemberDev
NovemberDev / godot_curvature_shader.glsl
Last active December 16, 2019 11:30
A shader that adds curvature to meshes in godot
/*
Adds curvature to any mesh.
Author: @November_Dev
*/
shader_type spatial;
@NovemberDev
NovemberDev / BehaviourTree.cs
Last active March 11, 2021 10:37
C# Behaviour Tree
using System;
using System.Linq;
using System.Collections.Generic;
public enum BehaviourTreeState
{
Success,
Failure,
Running
}
extends Node
var API = "http://localhost:5000/api"
var current_request = {}
var request_queue = []
var is_busy = false
var http
func _ready():
http = HTTPRequest.new()
#
# Author: @November_Dev
#
# This class is a straightforward, zero overhead implementation of
# very basic FPS controls.
#
# Ideal node setup:
# KinematicBody
# |- Camera
#
# godot_command_line.gd
# by: @november_dev
#
# Parse command line arguments in an exported project
#
# Command:
# /path/to/executable "res://scene.tscn" first_value=value second_value=value
#
# Sample:
#
@NovemberDev
NovemberDev / godot_finite_state_machine.gd
Last active October 5, 2021 12:09
Godot Finite state machine script / class in one file
# godot_finite_state_machine.gd
# by: @november_dev
#
# The finite state machine takes in a number of states and transitions.
#
# A state can contain a function that will be executed or looped while the state is active.
#
# The transition gets a function that returns a boolean truthiness value, which determines
# if the transition should happen or not.
#