Skip to content

Instantly share code, notes, and snippets.

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

# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Doppp
Doppp / gist:5498969
Last active December 16, 2015 21:20
RailsConf 2013 Talks

Opening Keynote - dhh:

- Roger's Innovation Adoption Curve - Same for open source and normal products
- Nested Russian Doll Cache

How Shopify Scales Rails:

- Stack
	- Ruby 1.9.3-p385
	- Rails 3.2
	- Percona MySQL 5.5
  • Unicorn 4.5
@Doppp
Doppp / gist:4761206
Last active December 12, 2015 10:48

It's a well-known fact that time passes quickly when you're having fun, and boy, is time zooming by. My first week at Lumos Labs went by really fast. There was another software engineer who was starting on the same day as I was so we got introduced to each other pretty quickly. We would be hanging out with each other for the most part of the initial few days regarding administrivia.

Day one was mostly administrivia, a day filled with meetings. First up was my awesome boss, Chris, who is the Lead Engineer for the Rails Team. Lumos Labs is still pretty small (approximately 80 people) and we don't really have managerial positions but we are easing into that stage where some middle management is necessary and Chris is part of that transition. He basically gave me a brief overview of the engineering team in Lumos Labs and what my role would be on the team. I was to be working on the payments system with another Software Engineer, Anthony, who interviewed me last December, and a Product