Coder Social home page Coder Social logo

Comments (10)

AlexeyBond avatar AlexeyBond commented on June 11, 2024 1

So it does preserve those tile data but does not use it to generate the rules. Am I stating that correctly?

Technically, probabilities are a part of rules. But in general - yes none of tile data is used to generate list of allowed tile combinations.

Does the rule generator take layers into account? e.g. tile_A in layer_1 is on top of tile_B in layer_2?

When a tilemap has multiple layers, each combination of tiles in a cell is considered as a separate tile. E.g. "tile A on layer 0 and tile B on layer 1" is considered as single tile. Note that "no tile on layer 0 and tile A on layer 1" and "tile A on layer 0 and no tile on layer 1" are considered as different tiles.

I guess another way to phrase is, does it consider the combination of layers on a single cell (e.g. tile_A + tile_B) a single domain

That wouldn't be a correct question. Domain is a set of values a variable may have. In case of WFC on tilemaps - a set of tiles certain cell of tilemap may contain. So "tile_A + tile_B" (or rather "tile A on layer 0 and tile B on layer 1") is one value that may be contained in domains of some tilemap cells.

from godot-constraint-solving.

AlexeyBond avatar AlexeyBond commented on June 11, 2024 1

Do you plan on supporting other algorithms? e.g. perlin noise to precondition the terrain?

Yes, I do have plans to make some noise-based preconditions for things like terrain/biomes. Dungeon generator needs some improvements as well - to support hexagonal maps, tilesets where tileas are not "passable" in all directions, start point customization, etc.

It would also be nice to have a way to ingegrate other independent procedural generation plugins as preconditions for WFC, but I don't yet see how it could be done.

If you have any suggestions on what else can be added - feel free to leave them here (or implement them yourself and create a PR).

from godot-constraint-solving.

AlexeyBond avatar AlexeyBond commented on June 11, 2024

Hi.

This addon uses some properties of tiles:

  • tile probability (or a custom data layer) is used as (suddenly!) probability of tile observation
  • dungeon generator precondition may use custom data layers as indication of what class the tile belongs to

In other cases it works with just a tile identifier (atlas id, coordinates within atlas, alternative tile id). It reads these identifiers from sample map and writes them to target map. Additional tile data (custom data layers, physics, navigation, etc) is associated with this identifier (i.e. it's a property of tile in tileset, not of a cell in tilemap), so it will be present in generated map. Tile properties do not influence what tile combinations are allowed in generated map - that is determined by rules inferred from sample map(s) only.

I hope, this answers your question.

I apologize for making an issue post as there's no discussion post options. This is not an issue, just a question.

I guess, that's the right way to ask questions, since discussions are not enabled. Not sure if it makes sense to enable them yet.

from godot-constraint-solving.

feelingsonice avatar feelingsonice commented on June 11, 2024

Additional tile data (custom data layers, physics, navigation, etc) is associated with this identifier (i.e. it's a property of tile in tileset, not of a cell in tilemap), so it will be present in generated map.

So it does preserve those tile data but does not use it to generate the rules. Am I stating that correctly?

Another question I have is about layers. Does the rule generator take layers into account? e.g. tile_A in layer_1 is on top of tile_B in layer_2?

from godot-constraint-solving.

feelingsonice avatar feelingsonice commented on June 11, 2024

Another question I have is about layers. Does the rule generator take layers into account? e.g. tile_A in layer_1 is on top of tile_B in layer_2?

I guess another way to phrase is, does it consider the combination of layers on a single cell (e.g. tile_A + tile_B) a single domain, or does it do something else with layered information?

from godot-constraint-solving.

feelingsonice avatar feelingsonice commented on June 11, 2024

@AlexeyBond this is amazing. Do you plan on supporting other algorithms? e.g. perlin noise to precondition the terrain?

from godot-constraint-solving.

feelingsonice avatar feelingsonice commented on June 11, 2024

btw, is this using ac3 or ac4?

from godot-constraint-solving.

AlexeyBond avatar AlexeyBond commented on June 11, 2024

It's AC3.

from godot-constraint-solving.

feelingsonice avatar feelingsonice commented on June 11, 2024

What about scene collections? Does it support scenes as tiles or only atlas?

from godot-constraint-solving.

AlexeyBond avatar AlexeyBond commented on June 11, 2024

What about scene collections? Does it support scenes as tiles or only atlas?

I didn't test it before. Just added some scene collections to example scenes and it seems to work fine (particles above some tiles are a scene from tileset):
image

from godot-constraint-solving.

Related Issues (14)

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.