Skip to content

Instantly share code, notes, and snippets.

View RichardEllicott's full-sized avatar

Richard Ellicott RichardEllicott

  • Luton
View GitHub Profile
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active August 24, 2024 17:32
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.
func get_all_files(path: String, file_ext := "", files := []):
var dir = Directory.new()
if dir.open(path) == OK:
dir.list_dir_begin(true, true)
var file_name = dir.get_next()
while file_name != "":
if dir.current_is_dir():
@andrew-wilkes
andrew-wilkes / prime-numbers.gd
Created July 11, 2021 08:00
Prime Numbers with GDScript
extends Node2D
export var nmax = 300
func _ready():
# Find prime numbers
sieve_of_eratosthenes(nmax)
func sieve_of_eratosthenes(n: int):
@andrew-wilkes
andrew-wilkes / Italics.shader
Last active December 10, 2019 18:53
Italic Text Shader for Godot Engine Label
shader_type canvas_item;
void vertex() {
VERTEX.x -= VERTEX.y * 0.3;
}
@curran
curran / LICENSE
Last active March 9, 2024 23:04
Simplemaps: World Cities Database
This license is a legal document designed to protect your rights and the rights of the Pareto Software, LLC, the owner of Simplemaps.com. Please read it carefully. Purchasing or downloading a data product constitutes acceptance of this license.
Description of Product and Parties: This license is a contract between you (hereafter, the Customer) and Pareto Software, LLC (hereafter, the Provider) regarding the use and/or sale of an collection of geographic data (hereafter, the Database).
Ownership of Database: All rights to the Database are owned by the Provider. The Database is a cleaned and curated collection of geographic facts and the Provider retains all rights to the Database afforded by the law. Ownership of any intellectual property generated by the Provider while performing custom modifications to the Database for a Customer (with or without payment) is retained by the Provider.
License: Customers who purchase a license are allowed to use the database for projects that benefit their organization or t