I beginning work on a personal project but before i began and dove blindly into this, i like to get some opinions from more experienced users. I'm not asking for code, just ideas or techniques that will help me implement this.

Basically, in order to move further with my project i need to figure out a way to randomly assemble a set of premade pieces on a grid based board. The conditions being that they are all interconnected and continuous; however as i go alone i will add more conditions, for now that is enough though. Also, this will be be random generation, so the generated structure will look different each time. Because pictures speak a thousand words, im going to post pictures to aid my question.

After assembling, here is what it might look like(Notice how its all continuous, even if it may have dead ends):Attachment 1137

This would be an INCORRECT way of assembling(Notice how there is a gap between the two structures, there is no way to get to the second structure from the first):Attachment 1138

So what do you guys think? How would you go about doing this? Any tips, thoughts, ideas, first impressions, guesses, etc? Essentially i need a place to start, and i'll go from there to see if it pans out.

Thanks a bunch

March 28th, 2012, 12:32 PM

copeg

Re: General Question; Need Ideas

You could start from a pre-made template - for instance the one you posted - then start randomly moving and swapping pieces to different (random but valid) locations. This would be similar in concept to how one can create a Sudoku puzzle - start from a solved one then shuffle the appropriate rows and columns and voila.

March 28th, 2012, 04:42 PM

clydefrog

Re: General Question; Need Ideas

hmmm, interesting idea; i hadnt considered that, that might be able to get me started. thanks :)