Skip to content

Instantly share code, notes, and snippets.

View realkotob's full-sized avatar

Kotob realkotob

View GitHub Profile
@imjp94
imjp94 / build.gd
Last active January 10, 2023 18:21
Build script to help exporting Godot project.
tool
extends SceneTree
const PLATFORM_ANDROID = "Android"
const PLATFORM_HTML5 = "HTML5"
const PLATFORM_IOS = "iOS"
const PLATFORM_LINUX = "Linux/X11"
const PLATFORM_MAC = "Mac OSX"
const PLATFORM_UWP = "UWP"
const PLATFORM_WINDOWS = "Windows Desktop"
@LukeMathWalker
LukeMathWalker / audit.yml
Last active March 30, 2025 10:12
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@rje
rje / 1_sign_and_submit.sh
Last active July 3, 2021 10:49
This is a set of scripts that I'm using to sign and notarize a unity app that has native plugins included as .bundle files. It's a lot of steps! Hopefully this makes it a bit easier...
#!/bin/bash -x
# This script takes .app file generated by unity for OSX, signs any plugin bundles and the main app,
# zips the project, and submits it for notarization
# Required data -- You need to fill these out with useful values!
USERNAME=# username of your apple account, usually your email
PASSWORD=# a generated password from appleid.apple.com
ROOT_FOLDER=# path to where your build lives
APP_NAME=# name of the app file unity created for you
PLUGIN_DIR=Contents/Plugins # you should be able to leave this be
@Darenn
Darenn / link_parser.gd
Created April 13, 2020 16:52
A very simple #gdscript class to parse custom commands on an #Ink script, a narrative script language made by @inkleStudios. It also converts custom inline tags to support text formatting.
@Janglee123
Janglee123 / LevelLoader.gd
Created January 1, 2020 16:00
Godot Level Loader
extends Node
onready var scene_tree: = get_tree()
var _path: = "res://src/Levels/Levels/"
var _levels: = []
var _level_index: = -1
var _level
var _container
@NovemberDev
NovemberDev / godot_async_scene_loader.gd
Last active March 12, 2025 16:00
Asynchronously loads scenes in godot
# Loads a scene in the background using a seperate thread and a queue.
# Foreach new scene there will be an instance of ResourceInteractiveLoader
# that will raise an on_scene_loaded event once the scene has been loaded.
# Hooking the on_progress event will give you the current progress of any
# scene that is being processed in realtime. The loader also uses caching
# to avoid duplicate loading of scenes and it will prevent loading the
# same scene multiple times concurrently.
#
# Sample usage:
#
shader_type spatial;
render_mode unshaded;
render_mode cull_disabled;
uniform float depth_distance = 1.0;
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():
@Einlander
Einlander / scene_debug.gd
Last active February 3, 2021 20:04
A super useful script for fps games. Attach it to the root node in your scene. Provides an FPS counter, fullscreen toggle, exits the game, and reloads the scene.
# Simple Utility Script
# Traps Mouse Cursor and hides it.
# ESCAPE to quit game
# F5 to reload current scene
# F9 to toggle collision shape dispay. Scene MUST be reloaded
# F10 to toggle fps Display
# F11 to switch from windowed to fullscreen
# F12 to take screenshot
#
# Works great for fps games
@atomius0
atomius0 / PixelPerfectScaling.gd
Created March 12, 2018 16:29
Pixel-Perfect scaling script, ported to Godot 3.
# original code by CowThing: https://github.com/godotengine/godot/issues/6506
# port to Godot 3 and bugfixes by atomius.
# usage:
# set this script as AutoLoad (Singleton enabled)
#
# in the project settings:
# [display]
# set 'window/size/width' and 'window/size/height' to your desired render resolution.
# set 'window/size/test_width' and 'window/size/test_height' to the initial window size.