Skip to content

Instantly share code, notes, and snippets.

View lunarcloud's full-sized avatar

Sam Sarette lunarcloud

View GitHub Profile
@WolfgangSenff
WolfgangSenff / ShakeCamera2D.gd
Last active January 26, 2023 17:13
Camera shake from KidsCanCode
extends Camera2D
# Courtesy of KidsCanCode: http://kidscancode.org/godot_recipes/3.x/2d/screen_shake/ (this may change in the near future, so it may require a search)
# If you intend to use this, don't forget to turn on camera rotation! And keep in mind that smaller numbers are often the most useful - huge numbers make this thing *really* shake
# 3.5.x
export var decay = 0.8 # How quickly the shaking stops [0, 1].
export var max_offset = Vector2(100, 75) # Maximum hor/ver shake in pixels.
export var max_roll = 0.1 # Maximum rotation in radians (use sparingly).
export (NodePath) var target # Assign the node this camera will follow.
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active April 15, 2024 22:14
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.
@joningold
joningold / date.ink
Last active June 15, 2021 18:45
Using a list of adjectives to describe a number
Include list_descriptions.ink
LIST QualityAdjectives = awful = -3, bad = -1, ambivalent = 0, nice = 1, great = 3, amazing = 7
LIST InterpersonalAdjectives = excruciating = -3, dull = -1, fine = 0, interesting = 1, intriguing = 3, charming = 7
- (swipeRight)
~ temp food = RANDOM(-5, 4)
~ temp company = RANDOM(-2, 9)
~ temp dateScore = food + company