Skip to content

Instantly share code, notes, and snippets.

View sjvnnings's full-sized avatar

Samuel Jennings sjvnnings

View GitHub Profile
@sjvnnings
sjvnnings / shakeable_camera.gd
Created December 24, 2021 19:41
An easy to use screenshake system in Godot. Built with areas and simple to modify.
#For usage instructions, see the YouTube video below:
extends Area
export var trauma_reduction_rate := 1.0
export var max_x := 10.0
export var max_y := 10.0
export var max_z := 5.0
export var noise : OpenSimplexNoise
@sjvnnings
sjvnnings / menu_cursor.gd
Created September 5, 2021 22:42
A Simple JRPG-style cursor script in Godot. To use, just set the menu_parent_path property in the editor to the container your menu options are stored in.
extends TextureRect
export var menu_parent_path : NodePath
export var cursor_offset : Vector2
onready var menu_parent := get_node(menu_parent_path)
var cursor_index : int = 0
func _process(delta):
@sjvnnings
sjvnnings / better_jumping_character_example.gd
Last active May 2, 2024 22:32
An easy to work with jump in Godot
extends KinematicBody2D
export var move_speed = 200.0
var velocity := Vector2.ZERO
export var jump_height : float
export var jump_time_to_peak : float
export var jump_time_to_descent : float
@sjvnnings
sjvnnings / CustomProximityGroup.gd
Created June 25, 2021 01:12
An Area node that mimics the functionality of Godot's ProximityGroup, without it's drawbacks and confusing documentation.
extends Area
class_name CustomProximityGroup
signal broadcast(method_name, params)
enum dispatch_modes{
PROXY,
SIGNAL
}