Skip to content

Instantly share code, notes, and snippets.

View tynrare's full-sized avatar
🏠
Working from home

tynrare tynrare

🏠
Working from home
View GitHub Profile
@Calinou
Calinou / build_javascript.sh
Last active January 9, 2022 18:59
Compile Godot for HTML5 easily
#!/bin/sh -x
# This script must be run from a GNU/Linux system with the Emscripten SDK
# installed and configured.
# Place this script at the root of your Godot Git clone.
# CC0 1.0 Universal
export EMSCRIPTEN_ROOT="/opt/emsdk/emscripten/master"

Generating Procedural Game Worlds with Wave Function Collapse

Wave Function Collapse (WFC) by @exutumno is a new algorithm that can generate procedural patterns from a sample image. It's especially exciting for game designers, letting us draw our ideas instead of hand coding them. We'll take a look at the kinds of output WFC can produce and the meaning of the algorithm's parameters. Then we'll walk through setting up WFC in javascript and the Unity game engine.

sprites

The traditional approach to this sort of output is to hand code algorithms that generate features, and combine them to alter your game map. For example you could sprinkle some trees at random coordinates, draw roads with a brownian motion, and add rooms with a Binary Space Partition. This is powerful but time consuming, and your original vision can someti

@buren
buren / cross-origin-local-storage.js
Created November 1, 2017 10:21
Cross origin local storage sharing example (using an iframe and postMessage)
const CrossOriginLocalStorage = function(currentWindow, iframe, allowedOrigins, onMessage) {
this.allowedOrigins = allowedOrigins;
let childWindow;
// some browser (don't remember which one) throw exception when you try to access
// contentWindow for the first time, it works when you do that second time
try {
childWindow = iframe.contentWindow;
} catch(e) {
childWindow = iframe.contentWindow;
@CharlieScarver
CharlieScarver / AdventureTime.csv
Last active November 10, 2024 10:39 — forked from austinpray/AdventureTime.csv
List of important adventure time episodes
Season Episode Title Reason
1 5 The Enchiridion A good intro to the series, plus introduces the important Enchiridion
1 2 Trouble in Lumpy Space* Introduces LSP (episode out of order)
1 3 Prisoners of Love Introduces Ice King and his obsession (episode out of order)
1 7 Ricardio the Heart Guy Finn and PB development, Sets a returning plot
1 8 Business Time* First mention of Ooo being post-apocalyptic
1 9 My Two Favorite People Intros the Jake and Lady Rainicorn plotline
1 10 Memories of Boom Boom Mountain A look at how Finn was adopted into Jake's Family
1 12 Evicted! Intros Marceline
@SMUsamaShah
SMUsamaShah / List of JavaScript GUI libraries.md
Last active October 10, 2024 09:19
dat.gui alternatives to create GUI from JavaScript object

JavaScript GUI libraries

These libraries can be used to quickly create a GUI for configureable parameters using sliders, checkboxes, colors pickers etc

  1. Tweakpane https://github.com/cocopon/tweakpane Demo: https://cocopon.github.io/tweakpane/
  2. control-panel https://github.com/freeman-lab/control-panel
  3. ControlKit https://github.com/automat/controlkit.js
  4. guify https://github.com/colejd/guify Main site is down, here is the demo https://jons.website/projects/guify/index
  5. oui https://github.com/wearekuva/oui
  6. Palette.js https://github.com/lehni/palette.js
@thysultan
thysultan / WebGL-frameworks-libraries.md
Created February 9, 2019 23:51 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • AwayJS: AwayJS is a graphics library for javascript written in typescript
  • SceneJS: An extensible WebGL-based engine for high-detail 3D visualisation