Skip to content

Instantly share code, notes, and snippets.

View jeremyabel's full-sized avatar

Jeremy Abel jeremyabel

View GitHub Profile
@jeremyabel
jeremyabel / index.html
Created July 22, 2020 18:40
Line derivatives?
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<p>There's an interaction in our game that looks like this:</p>
<br/>
<img src="https://i.imgur.com/gIixK0p.png" />
<br/>
<p>You move a slider and the landscape changes with a nice noisy kind of movement until you get the plant in the right position.</p>
<br/>
<img src="https://i.imgur.com/8dRCevu.png">
#pragma once
#include <stdlib.h>
#define NAME_NONE "NONE"
#define U8_MAX 0xFF
typedef signed char S8;
typedef unsigned char U8;
typedef signed short S16;
@jeremyabel
jeremyabel / KeyboardKeyIcons.csv
Last active March 24, 2025 20:31
Unreal Common Input Keyboard Action Icon Generator
Key Label Icon XOffset YOffset
BackSpace
Tab
Enter
Pause
CapsLock CapsLk -5
Escape Esc
SpaceBar
PageUp PgUp -5
PageDown PgDn -5
@jeremyabel
jeremyabel / MyComponentVisualizer.cpp
Last active July 11, 2025 12:43
Editable Component Vector Property Visualizer
// Copyright Feral Cat Den, LLC. All Rights Reserved.
#include "MyComponentVisualizer.h"
#include "ActorEditorUtils.h"
#include "EditorViewportClient.h"
#include "HitProxies.h"
// Include your component here
struct HMyPropertyHitProxy : HComponentVisProxy
{
@jeremyabel
jeremyabel / InputEventDebugger.cpp
Created April 17, 2025 21:51
Slate Widget Input Debug Panel
// Copyright Feral Cat Den, LLC. All Rights Reserved.
#include "GNInputEventDebugger.h"
#if WITH_GN_DEBUGGER && WITH_SLATE_DEBUGGING
#include "Debugging/SlateDebugging.h"
#include "Development/GNDebugImGuiCommon.h"
#include "UI/GNWidgetStatics.h"
from math import *
# a performant solution would store a prefix sum of line lengths to
# a sidechannel and then use that to do a bsearch; on the GPU,
# you'd do a sum tree / histopyramid as a preprocessing step
def find_point(points, d):
d = d
for i in range(1, len(points)):
x0,y0 = points[i-1]
x1,y1 = points[i]