Skip to content

Instantly share code, notes, and snippets.

View DustinAlandzes's full-sized avatar

Dustin Alandzes DustinAlandzes

View GitHub Profile
import requests
import subprocess
import json
import sys
import threading
import time
from Queue import Queue
numberOfViewers = int(sys.argv[1])
builderThreads = int(sys.argv[2])

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

//single file version of https://github.com/kchapelier/wavefunctioncollapse
function randomIndice (array, r) {
var sum = 0,
i,
x;
for (i = 0; i < array.length; i++) {
sum += array[i];
}
@DustinAlandzes
DustinAlandzes / ANOVA.ipynb
Created September 23, 2017 20:15 — forked from tlinnet/ANOVA.ipynb
ANOVA in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DustinAlandzes
DustinAlandzes / index.html
Created August 18, 2017 08:20 — forked from anonymous/index.html
start of vanguard layout clone // source https://jsbin.com/tezigitava
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<style id="jsbin-css">
#!/usr/bin/env python
# This script generates high volume of 802.11 Probe Requests frames.
# Each frame have uniq random source MAC.
# It use Scapy http://www.secdev.org/projects/scapy/ for frames crafting.
# You need injection supported device.
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR) # Disable IPv6 warnings