Skip to content

Instantly share code, notes, and snippets.

View LordFckHelmchen's full-sized avatar

David J. Mack LordFckHelmchen

  • Philips Medical Systems
  • Boeblingen
View GitHub Profile
@dustinfarris
dustinfarris / conftest.py
Last active April 28, 2023 13:57
Stubbing out Kivy windows for your unit tests (using py.test)
"""
Unit testing Kivy is easy, but requires a little boiler plate to keep the
window quiet while you test your code. This is one way to set up py.test,
but the same technique can probably be used with other test runners as well.
More information on how these py.test hooks work:
http://pytest.org/latest/plugins.html#generic-runtest-hooks
"""
import mock

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

@lysandroc
lysandroc / settings.json
Last active November 30, 2022 08:16
gruvbox scheme for windows terminal - gruvbox theme for windows terminal
// Define gruvbox colors
"schemes": [
{
"name" : "Gruvbox for windows terminal",
"cursorColor": "#FFFFFF",
"selectionBackground": "#FFFFFF",
"background" : "#1d2021",
"foreground" : "#ebdbb2",