Skip to content

Instantly share code, notes, and snippets.

View t04glovern's full-sized avatar
🎯
Watching Speed-runs while i code

Nathan Glover t04glovern

🎯
Watching Speed-runs while i code
View GitHub Profile

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

/*
* Arduino Anti-GPS Silliness
* by Connor Nishijima 2016
*
* By reading the frequency of AC cycles in your house using an open analog pin,
* I can tell you for sure what countries you AREN'T in. Pretty god damn useless,
* but fun, nonetheless.
*
* You'll need an Arduino Mega to fit the array of Strings below, Uno doesn't cut it
* even with use of PROGMEM. The Sketch is also written to use the Seeed Studio TFT
@danieltharp
danieltharp / DangItBobby.ps1
Created April 6, 2016 22:14
PowerShell script to find where a user is logged into on the network and disable their NIC.
# ********************************************************************************
#
# Script Name: DangItBobby.ps1
# Version: 1.0.0
# Author: bluesoul <https://bluesoul.me>
# Date: 2016-04-06
# Applies to: Domain Environments
#
# Description: This script searches for a specific, logged on user on all or
# specific Computers by checking the process "explorer.exe" and its owner. It
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 22, 2024 20:58
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
Function Get-Direction()
{
Param(
[Parameter(Mandatory=$true,Position=0)] $Origin,
[Parameter(Mandatory=$true,Position=1)] $Destination,
[Parameter(Position=2)] [ValidateSet('driving','bicycling','walking')] $Mode ="driving",
[Switch] $InMiles
)
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@smarthall
smarthall / gist:1618800
Created January 16, 2012 02:56
Hacked Tone Library example for LeoStick
// A fun sketch to demonstrate the use of the Tone library.
// To mix the output of the signals to output to a small speaker (i.e. 8 Ohms or higher),
// simply use 1K Ohm resistors from each output pin and tie them together at the speaker.
// Don't forget to connect the other side of the speaker to ground!
// You can get more RTTTL (RingTone Text Transfer Language) songs from
// http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation
/*************************************************
@ajfisher
ajfisher / tsasa.py
Created January 15, 2012 09:50
Send a twitter message to a serial connection on an arduino
# Twitter stream analyser and serial activator (TSASA)
#
# This script analyses a twitter stream for keywords using the twitter
# streaming api - off the back of it, it then makes a serial request passing
# the message across to the serial device
#
# This was done fopr LCA2012 as an extension to the more code generator that
# Luke Weston build for the LeoStick
#
#