Skip to content

Instantly share code, notes, and snippets.

View Deledrius's full-sized avatar

Joseph Davies Deledrius

View GitHub Profile
@Deledrius
Deledrius / better_jumping_character_example.gd
Last active May 8, 2023 12:43 — forked from sjvnnings/better_jumping_character_example.gd
An easy to work with jump in Godot 4.x
extends CharacterBody2D
@export var move_speed = 200.0
@export var jump_height : float
@export var jump_time_to_peak : float
@export var jump_time_to_descent : float
@onready var jump_velocity : float = ((2.0 * jump_height) / jump_time_to_peak) * -1.0
@onready var jump_gravity : float = ((-2.0 * jump_height) / (jump_time_to_peak * jump_time_to_peak)) * -1.0
@onready var fall_gravity : float = ((-2.0 * jump_height) / (jump_time_to_descent * jump_time_to_descent)) * -1.0
@Deledrius
Deledrius / build_cross_gcc
Created September 11, 2020 21:23 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.