+Random Terrain Posted August 21, 2011 Share Posted August 21, 2011 If you divide the screen into three sections and have your program randomly select one of eight pieces for each section, how do you figure out how many combinations that is? Is it as simple as 3 x 8 = 24? Or would there be more than 24 combinations? Thanks. Quote Link to comment Share on other sites More sharing options...
RevEng Posted August 21, 2011 Share Posted August 21, 2011 To calculate the total number of combinations you multiply the total number of states of each factor together. So in your case its 8x8x8=512. Much better than 24! 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted August 21, 2011 Author Share Posted August 21, 2011 To calculate the total number of combinations you multiply the total number of states of each factor together. So in your case its 8x8x8=512. Much better than 24! I knew there had to be more to it! Thanks! I'm almost done with a 16 x 16 x 16 version, so I guess that's 4,096. Quote Link to comment Share on other sites More sharing options...
RevEng Posted August 21, 2011 Share Posted August 21, 2011 No problem! I'm almost done with a 16 x 16 x 16 version, so I guess that's 4,096. Very nice! Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted August 21, 2011 Share Posted August 21, 2011 Can the pieces only be used once, or could the same piece show up in all 3 sections? If only once then it's 8 x 7 x 6. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted August 21, 2011 Author Share Posted August 21, 2011 (edited) Can the pieces only be used once, or could the same piece show up in all 3 sections? If only once then it's 8 x 7 x 6. Each section has 16 pieces that are different from the other sections and they are chosen at random: http://www.atariage.com/forums/topic/186523-random-maze-test-2011/ The only limitation is that I added a little bit of memory so no section can display a piece twice in a row. For example, if piece 6 was the last middle piece used, piece 6 can't be displayed this time. Edited August 21, 2011 by Random Terrain Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.