Skip to content

Instantly share code, notes, and snippets.

@reduz
reduz / godot_over_time1.md
Last active February 6, 2024 23:55
Godot source code in 2002

This is a walkthrough to the Godot codebase over time. I can't publish full repositories, but I will put here the interfaces of some APIs including the year they were created and how they looked like at the time.

2002, Larvotor

This was the first version of the engine as such. It was later on used to create Regnum Oline. This is source code where I am sure I can still put legally here. Here are some class interfaces.

Mesh class:

@passivestar
passivestar / Editor.tres
Last active April 10, 2024 20:07
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@geegaz
geegaz / trail_3d.gd
Last active February 1, 2024 22:13 — forked from axilirate/trail_3d.gd
A Custom 3D trail renderer for Godot 4.
class_name Trail3D extends MeshInstance3D
"""
Original Author: Oussama BOUKHELF
License: MIT
Version: 0.1
Email: o.boukhelf@gmail.com
Description: Advanced 2D/3D Trail system.
"""
extends Node3D
# FABRIK for Skeletons in Godot4 based on https://github.com/joaen/EasyIK/blob/master/EasyIK/Assets/Scripts/EasyIK.cs
# Usage:
# - add the script to a node
# call the activate function
# fabrik.activate(bone_ids, skeleton, left_hand_target, left_hand_pole)
# bone_ids is an Array with the bone ids of the chain
# skeleton is the skeleton
# left_hand_target is a Node3D
@WolfgangSenff
WolfgangSenff / gist:0a9c1d800db42a9a9441b2d0288ed0fd
Last active December 14, 2023 11:07
GDScript 1.0 to 2.0 Beginner Friendly Conversion Guide
Beginner-friendly GDScript 1 to GDScript 2 Conversion Guide
First and foremost, this should not be considered a replacement for the official migration guide,
found at https://docs.godotengine.org/en/latest/tutorials/migrating/upgrading_to_godot_4.html!
Instead, this document is intended to be a friendly guide to helping you upgrade your projects from
GDScript 1 to 2. To do this, I'm going to list the most common conversions I've run into while upgrading
a few of my games and tools. This document is written as of the first release candidate version of Godot 4.0.
The first thing to do when converting a project (no need if you're starting from new) is to either have your
project in source control, or make a duplicate of your entire project's folder and rename it. This will
@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.

[WIP] Notepad++ userstyle for Godot's GDScript

  • This is a work-in-progress
  • Most things don't work yet
  • It is just a little syntax highlighting thing
  • For install: Language -> Define your Language -> Import

TODO

  • Mess around with the settings
@tomkail
tomkail / ExtendedScriptableObjectDrawer.cs
Last active April 2, 2024 18:56
Displays the fields of a ScriptableObject in the inspector
// Developed by Tom Kail at Inkle
// Released under the MIT Licence as held at https://opensource.org/licenses/MIT
// Must be placed within a folder named "Editor"
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;