Coder Social home page Coder Social logo

go-wfc's People

Contributors

fabienblin avatar zfedoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

go-wfc's Issues

add a sky constraint on top row of tiles

Hey there,
Very nice job on this library, i just started today with overlapping and tiled WFC and i'm enjoying very much.

I tried your example code for the platformer with custom tiles and wanted to use this void.png (sky tile) to fill the first row :

void, _ := wfc.LoadImage(tileset_folder+"void.png")
sky := wfc.GetConstraintFromHex(wfc.HexFromColor(wfc.GetColor(void, 0, 0)))

instead of

sky := wfc.GetConstraintFromHex("c8688ac0")

The problem is, i get a row of red tiles instead

any suggestions ?

[question] is it possible to provide a pre-populated target image somehow?

In many examples on YT it is suggested to do this in order to force a certain structure. For example one could pre-populate a target image with floor tiles to mark a walkable way or where a certain room shall be.

Is that possible?

Oh, and while I'm at it: the library returns an image. However, in order to use this in a game I don't really need an image but a 2d map of tile types (e.g. walkable, walls/water/holes etc). So it would be required to pass in a list of tile properties along with the initial tileset to the function, which it keeps per every placed tile. Does that make sense?

thanks in advance,
Tom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.