Skip to content

Instantly share code, notes, and snippets.

View Razzlegames's full-sized avatar

Kyle Luce Razzlegames

View GitHub Profile
@Razzlegames
Razzlegames / gist:95f9eb79b43e0c28786424fac48f3bea
Created March 5, 2020 04:40
qtCreator_GodotCompileError_RC_missing.log
21:25:51: Running steps for project Godot...
21:25:51: Starting: "C:\Python27\Scripts\scons.bat" -j 4 platform=windows target=debug
scons: Reading SConscript files ...
Configuring for Windows: target=debug, bits=default
Found MSVC compiler: x86
Compiled program architecture will be a 32 bit executable. (forcing bits=32).
YASM is necessary for WebM SIMD optimizations.
WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported!
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
extends "res://addons/gut/test.gd"
func before_each():
print("Before running Test")
func test_doNothing():
var parent = RigidBody2D.new()
add_child(parent)
var enemyWalkingBehavior = load("res://Prefabs/Characters/Behaviors/EnemyWalkingBehavior.tscn").instance()
@Razzlegames
Razzlegames / .gitlab-ci.yml
Created November 4, 2019 01:02
Godot Unit Test Gitlab CI example
image: barichello/godot-ci:3.1.1
stages:
- export
- deploy
- tests
before_script:
- mkdir -v -p build/linux
- mkdir -v -p build/windows
extends Node2D
export(String, DIR) var levelsPath
func _ready():
print("-----------------------------------------------------------")
print("Start Directory walk: "+ levelsPath)
print("-----------------------------------------------------------")
print("-----------------------------------------------------------")
print("Start Recursive Depth First Walk")
# Allows you to enable or disable any node within the sceenTree generically
# Probably nice to have this as a Singleton that can be used everywhere.
extends Node
func setEnabled(isEnabled, node):
if node is Node:
node.set_process(isEnabled)
node.set_physics_process(isEnabled)
node.set_process_input(isEnabled)
node.set_process_unhandled_input(isEnabled)
extends RayCast2D
# If this is use to disable collisions
export(bool) var disable_collisions = false;
# What to set/remove collisions against
export(NodePath) var physics_path
var physics_object
func _ready():
shader_type canvas_item;
uniform float refractionMagnitude = 30.0;
void fragment() {
// Possibly a more accurate way to do refraction? Uncomment and see how you like it (and comment out below refraction)
//vec3 refraction = -refract(vec3(0,0,-1), texture(NORMAL_TEXTURE, UV).rgb, 1.1) *2.0;
vec3 refraction = - texture(NORMAL_TEXTURE, UV).rgb * vec3(1.0,-1.0,1.0);
shader_type canvas_item;
uniform float timeScale = 2;
uniform float amplitude = 1.0f;
void vertex() {
VERTEX.y += sin(TIME * timeScale + VERTEX.y + VERTEX.x) * amplitude;
}
@Razzlegames
Razzlegames / movingPlatformBehavior.gd
Last active June 29, 2019 20:03
movingPlatformBehavior.gd
extends Node2D
var path_direction = 1
var pathFollow2D = null
export var curve_speed = 80
# Path to follow
export(NodePath) var pathFollow2DNodePath = null
func _ready():
if(pathFollow2DNodePath != null):
return ruleSetEvalResults.entries
.filter { ruleSetEvalResult -> ruleSetEvalResult.value.results
.map { future -> future.get() }
.all { it.hasPassed() } }
.map { it.key }