go-wfc | Randomly generated tile maps using Oskar Stålberg 's wave

 by   zfedoran Go Version: v0.0.8 License: MIT

kandi X-RAY | go-wfc Summary

kandi X-RAY | go-wfc Summary

go-wfc is a Go library. go-wfc has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This package uses the Wave Function Collapse algorithm as described by Oskar Stålberg.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              go-wfc has a low active ecosystem.
              It has 11 star(s) with 1 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              go-wfc has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of go-wfc is v0.0.8

            kandi-Quality Quality

              go-wfc has no bugs reported.

            kandi-Security Security

              go-wfc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              go-wfc is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              go-wfc releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-wfc
            Get all kandi verified functions for this library.

            go-wfc Key Features

            No Key Features are available at this moment for go-wfc.

            go-wfc Examples and Code Snippets

            go-wfc,Full example:
            Godot img1Lines of Code : 30dot img1License : Permissive (MIT)
            copy iconCopy
            import "github.com/zfedoran/go-wfc/pkg/wfc"
            
            func collapseWave(tileset_folder, output_image string) {
              // This is just a `[]image.Image`, you can use whatever loader function you'd like
              images, err := wfc.LoadImageFolder(tileset_folder)
              if err !  
            go-wfc,Quick Start
            Godot img2Lines of Code : 27dot img2License : Permissive (MIT)
            copy iconCopy
              // Load the input tile images (any order and count is fine)
              var input_images []image.Image
              input_images, err = wfc.LoadImageFolder(tileset_folder)
              if err != nil {
                panic(err)
              }
            
              // Setup the initialized state. The output image will be   
            go-wfc,Custom Constraints
            Godot img3Lines of Code : 5dot img3License : Permissive (MIT)
            copy iconCopy
              wave.NewWithCustomConstraints(tiles, width, height, wfc.GetConstraintFunc(2))
            
              wave.NewWithCustomConstraints(tiles, width, height, 
                func(img image.Image, d Direction) ConstraintId {
                ...
              })
              

            Community Discussions

            No Community Discussions are available at this moment for go-wfc.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install go-wfc

            You'll need to load a set of tiles (images) into an array. A convenience function is provided by this package but you can use any method you'd like. Next, initialize a wave function with the desired output size (in units of tiles). For example, lets say that you want your output image to be 32 x 8 tiles, you'd pass in the following. Finally, collapse the wave into a single state (if possible). Optionally, you can export the collapsed wave to an image. Or, you can review the results manually to do custom rendering in your game.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link