Comments (4)
Update: to show what I mean: This is what I'd need:
So, I need (in this case) closed room[s]. Rooms maybe connected but if they are not, it's fine as well because in my game I have portals.
However, this is what I get currently:
How can I solve this?
from go-wfc.
So, I tried adding the feature myself, which might be a good opportunity to get deeper into WFC, see TLINDEN@c75a953
However, it's not working yet. I assume I got the slot population wrong somehow?
With this pre-populated output map:
And using this example I get:
:(
from go-wfc.
Ok, I compared the wave.PossibilitySpace
contents after one successful example (examples/islands/
) with the content of the pre-populated one:
- Each pre-populated slot has 1 module
- all 4 Adjacency checksums of those slots have the same value (since I pre-populated it with only water tiles)
- all non-pre-populated slots have all 16 modules
I also added a dump function. With the unaltered island example I get this PossibilitySpace on startup: island startup and this one when done. In comparision, I get this space on startup with the island-pre example (which uses pre-population) and this result, which is clearly incomplete.
I really don't get it why it's not working.
Any idea? (example: https://github.com/TLINDEN/go-wfc/tree/main/examples/islands-pre)
from go-wfc.
Ah, there's the problem: I prepopulate wave.PossibilitySpace with the slots of the setup image. But I set all other slots to any, including the ones neighboring the prepopulated ones. And the loop doesn't look at the prepopulated slots, because they have entropy 1. So, I think, their neighbors do not get a chance to get propagated properly. So in order to get a correct starting map, the propagation needs to run over the whole map once before the actual collapse loop.
from go-wfc.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-wfc.