This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" | |
Download and convert a lospec url to a Paint.NET palette. | |
CC0 | |
""" | |
import argparse | |
import tempfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Script to give meaningful names to tiles in these free CC0 art packs: | |
:: https://www.kenney.nl/assets/1-bit-input-prompts-pixel-16 | |
:: https://www.kenney.nl/assets/input-prompts-pixel-16 | |
pushd "C:\libraries\itch\kenney-game-assets\2D assets\Input Prompts Pixel 16×\Tiles" | |
mkdir light\xbox | |
mkdir light\playstation | |
mkdir light\nintendo | |
mkdir light\keyboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends KinematicBody | |
class_name KinematicCar | |
# Based on MIT-licensed car tutorial from KidsCanCode | |
# https://kidscancode.org/godot_recipes/3.x/2d/car_steering/ | |
# https://github.com/kidscancode/godot_recipes/blob/master/src-3/content/2D/car_steering.md | |
# Ported some features from https://kidscancode.org/godot_recipes/3.x/3d/kinematic_car/car_base/ | |
export(float, -100, 0, 1) var gravity := -20.0 | |
export(float, 0.001, 180, 1) var max_steering_angle := 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
""" | |
Video editing tools. | |
I don't remember the args for ffmpeg and it's useful to run them on multiple | |
videos in sequence. Great for shrinking game video that was captured at 4k. | |
Assumes ffmpeg is in your path. On Win10, use scoop to install (https://scoop.sh/). | |
Use .cmd files like this to make a drag-and-drop target: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Public domain/CC0 | |
-- A pid controller (proportional–integral–derivative controller). | |
-- Useful to track an entity without overshooting (like a docking spaceship). | |
-- Could be expanded to control orientation, speed, or other values. | |
-- Requires tuning values: | |
-- tuning = { | |
-- gain = { | |
-- -- all in [0,1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- public domain, CC0 | |
-- extremely basic class. | |
-- only supports instances and constructors (no inheritance, mixin, etc). | |
-- Copypaste this function to your module to avoid depending on a class library. | |
local function Class() | |
local cls = {} | |
cls.__index = cls | |
setmetatable(cls, { | |
__call = function(cls_, ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" An extremely rough approximation of vscode's inliner: | |
" https://www.youtube.com/watch?v=EenznqbW5w8 | |
" Uses vim's popupwin to show the definition of a tag. Hijacks the arrow keys | |
" to let you move a cursor inside that window and jump to another tag. | |
" | |
" Public domain, CC0. | |
let g:tagpopper_z = 0 | |
" Turning this off hides some bugs but then preview window is even more | |
" superior. Not sure why sometimes popup contents is clobbered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under CC0 and Unlicense | |
// Demo: https://imgur.com/a/9h3c6W5 | |
// Screenshake should move the camera around smoothly but unpredictably. It | |
// shouldn't jitter the camera around in a way that makes it hard to follow | |
// what's on screen. That's why you should use continuous oscillating functions | |
// to produce your shake instead of random values. I also think it's useful to | |
// make a directional shake to help connect the shaking to the thing that | |
// caused it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// public domain | |
// Add to Scripts/Editor/PrefabDetector.cs | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.Linq; | |
using System; | |
using UnityEditor.Experimental.SceneManagement; | |
using UnityEditor.SceneManagement; | |
using UnityEditor; | |
using UnityEngine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Test file for chained function calls for lua syntax | |
-- Source: https://love2d.org/forums/viewtopic.php?t=77904 | |
local flux = require "flux" | |
local colon_out = self.kitchen | |
:getContents() | |
:getCheese() | |
:enjoyCheese(self | |
:mouth() |
NewerOlder