Skip to content

Instantly share code, notes, and snippets.

@idbrii
idbrii / botw-cedec2017.md
Last active June 13, 2025 15:20
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo
@idbrii
idbrii / main.lua
Last active April 18, 2025 19:04
Love2d Physics Tutorial -- but with kinematic player body
-- Demonstration of love physics with a kinematic body
-- based on dynamic version: https://love2d.org/wiki/Tutorial:Physics
--
--
-- When an object is controlled by setting its position instead of applying
-- forces, it should be kinematic. But when it interacts with dynamic
-- bodies, sometimes they are sleeping and do not respond to collisions.
--
-- Possible solutions:
-- * set velocity instead of position
@idbrii
idbrii / ShakeIn2D.cs
Last active February 8, 2025 17:05
Unity camera shake 2d
// 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.
@idbrii
idbrii / lospec_to_paint.py
Created March 8, 2024 07:18
Download and convert a lospec url to a Paint.NET palette.
#! /usr/bin/env python
"""
Download and convert a lospec url to a Paint.NET palette.
CC0
"""
import argparse
import tempfile
@idbrii
idbrii / kenney_renamer.bat
Created February 19, 2024 08:55
Give Kenney's free input prompt art meaningful names
:: 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
@idbrii
idbrii / etc.screenrc
Created August 8, 2012 16:47
/etc/screenrc on Ubuntu 12.04
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $
#
# /etc/screenrc
#
# This is the system wide screenrc.
#
# You can use this file to change the default behavior of screen system wide
# or copy it to ~/.screenrc and use it as a starting point for your own
# settings.
#
@idbrii
idbrii / aseprite-easy-build.bat
Last active January 14, 2024 17:54
A simple build script for building Aseprite on Windows 10
@echo off
SETLOCAL EnableDelayedExpansion
:: Derived from the steps in INSTALL.md (https://github.com/aseprite/aseprite/blob/fd2077ce7d80e6af3202958c52291e5d6fb7f556/INSTALL.md)
:: to figure out how to builds this. Worked to build aseprite 1.2.16 release
:: with skia m71 and the most recent (sorry) verison of depot tools.
:: https://github.com/aseprite/aseprite/releases/download/v1.2.16.2/Aseprite-v1.2.16.2-Source.zip
:: https://github.com/aseprite/skia/archive/aseprite-m71.zip
:: https://storage.googleapis.com/chrome-infra/depot_tools.zip
::
@idbrii
idbrii / gist:e00b2c62120bc002ec1d
Created March 14, 2015 14:08
BugMeNot Bookmarklet
// The bookmarklet you can find online for bugmenot doesn't work. Looks like
// bugmenot now wants just the hostname instead of the full url. Here's one
// that works.
javascript:(function() { var url = ('http://www.bugmenot.com/view/' + escape(location.hostname)); w = open(url, 'w', 'location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=400,modal=yes,dependent=yes'); if (w) { setTimeout('w.focus()', 1000) } else { location = url } })();
@idbrii
idbrii / PrefabDetector.cs
Created October 17, 2020 13:30
A Unity editor window to show you the prefab-ness of an object
// 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;
@idbrii
idbrii / kinematic_car.gd
Created December 29, 2022 19:27
A 3d kinematic car for Godot 3.5
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