150 days ago · 11 min read2181 words · Tech · hide · Fediverse post

Hello, loves! I have a somewhat complex idea about passages, but a simpler scheme might work. Let’s find out. Anticlimax: I stop just before the thrilling conclusion. Last night, in between time-wasting activities, I did a little thinking about passages. The main concern is to randomly choose, on each border between rooms, one passage. However, we’d like it to tend to choose areas in the border that are relatively complex, rather than in the straight bits. So that got me thinking about weighted random choice, for which Python has support, so I sketched out a series of data structures that I thought I could get, leading to this scheme: Make a list of all the cells on both sides of the border. When a cell is found to have a neighbor in the other room, add both to the list. This will result in some cells occurring 1, 2, or 3 times. Using Python’s Counter, make a dictionary from cell to the count of times it occurs. Associate the desired weight with each possible count, perhaps 1:1, 2:10,…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town