• Stars
    star
    305
  • Rank 136,879 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unity WaveFunctionCollapse

A fork of https://github.com/mxgmn/WaveFunctionCollapse with tools for the Unity Game engine.

Installation

Clone this repo under your projets Assets directory, or import a unity package asset from http://selfsame.itch.io/unitywfc.

Usage

video tutorial

https://www.youtube.com/watch?v=CTJJrC3BAGM

Training

Training components define sample data from their child objects. The contained objects must have a prefab connection. Rotation of objects are recorded. The OverlapWFC component will auto compile it's training on Start, in editor mode you will need to use the compile button.

Whitespace (no object) is recorded for the OverlapWFC, but ignored for the SimpleTiledWFC.

NOTE: for SimpleTiledWFC all prefabs must be located within an Assets/Resources directory!

TilePainter

Simple tilemap painting utility to help create training data. To paint, assign it's color prefab property and hover over the canvas region with the TilePainter's object selected.

Adding objects to the palette array will show them below the canvas area, palette or painted tiles can be sampled by holding the [s] key and clicking on them.

Note: You can drag a folder of prefabs from under Assets/Resources onto the palette array!

OverlapWFC

Generates output from a Training sample. On Start will compile it's training component, generate, and run.

NOTE: Using rotation specific tiles will only give nice results for symmetry 1 generation. Personally I like to use rotation for the overlap model, with a larger training area to make up for the loss of symetry variants.

  • seed: 0 for randomized
  • N: size of the overlap patterns (this is hidden in the inspector, as higher values can often freeze Unity)
  • Periodic Input: repeating sample pattern
  • Periodic Output: repeating output pattern
  • Symmetry: sample grid re-read with additional rotation/reflection variations. Note: rotation of sample tiles will only make sense for symmetry-1 output
  • Iterations: 0 will run until finished/unfinishable. Also used by incremental output.
  • Incremental: Runs iterations every update in play mode.

SimpleTiledWFC

This model uses XML data representing legal tile neighbors. The Training component has a "record neighbors" command to generate these files, the file is saved to "Assets/{{trainingGameObject.name}}.xml".

Whitespace is ignored in the neighbor scan, and can be used as margins to isolate neighbors. Training components have a weight array for neighbor xml.

NOTE: Prefabs must be located within Assets/Resources or a subdirectory within.

X I T L

Tile symmetry class can be declared via the last letter of the prefab name, for example "GroundX" or "Road-T".

Note: L tiles have an initial orientation of

OO
OX

API

Both models have a public GameObject[,] rendering; 2d array that stores their output.

More Repositories

1

mud.tilde.town

a python mud influenced by Inform7
Python
53
star
2

hard

clojure-unity fun stuff
C#
32
star
3

pdfn

clojure predicate dispatch
Clojure
27
star
4

tween

arcadia tween lib
Clojure
22
star
5

ipfs-desk

web app for ipfs
JavaScript
12
star
6

procadia2017

Arcadia Community Procjam Entry
C#
8
star
7

clojurecup2015

ASP
8
star
8

lisp-jam

Unity/Arcadia game for #LispGameJam - August 2016
Clojure
8
star
9

vcol-compositor

A Blender addon for baking and compositing vertex color layers.
Python
7
star
10

procadia2016

arcadia-unity community #procjam repo
Clojure
7
star
11

cljvr

htc vive unity arcadia
C#
6
star
12

soa

clojure Structure of Arrays data type
Clojure
5
star
13

tenlet

clojure telnet server
Clojure
5
star
14

procadia

group arcadia procjam game
C#
5
star
15

arcadia-repl

Python
5
star
16

SHIP

A spaceship horror simulation in clojure
Clojure
4
star
17

sweeper

minesweeper with a fantasy setting
Clojure
3
star
18

ld41

ludum dare 41
Clojure
3
star
19

vr-studio

vr drawing toy
C#
2
star
20

ec

Entity Component system for js/cljs
JavaScript
2
star
21

carts

pico8 carts
Lua
2
star
22

plomb

sugar macros for core.async communication between om components
Clojure
2
star
23

seecode

slideshow generation tools
Clojure
1
star
24

informish

Inform7 flavored DSL with clojure.
Clojure
1
star
25

ipjs

Clojure
1
star
26

dungeon_dropper

a little roguelike with fancy animations
JavaScript
1
star
27

ip

clojure ipfs dependency
Clojure
1
star
28

mars_base

JavaScript
1
star
29

ld36

ludum dare thirty six
Clojure
1
star
30

clj-peg

peg.js parser for clojure
JavaScript
1
star
31

hncommentfixer

chrome extension for replacing hn comments with "Very Interesting"
JavaScript
1
star
32

pong-workshop

clojurescript workshop about designing systems
Clojure
1
star