What possibilities can I use to create groups with different amounts and combinations of items witho

0 favourites
  • 4 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I want to create a system that creates groups of letters, drawn randomly and that don't repeat themselves. There would be 5 groups with 10 variations each and with different amounts, for example: the first would have 10 variations with the amount of one letter, the second would have 10 variations, each with 2 different letters and combinations that do not repeat (a,c/a,d/b,g/...) and so on until group 5.

    Is there any way of doing this more simply than using arrays?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not really. You'd just need to pick your poison.

    Using sprites for everything is one way but picking isn't great to deal with when comparing different instances of the same type.

    You can avoid using the array plugin with text variables to some extent. To access data you need to parse the text. To modify the text you often need to rebuild it.

    Data plugins such as json or array are rather abstract but are useful if you can wrap your head around them. There may be other third party plugins that maybe are simpler? Anyways one pro about data plugins is avoiding using picking as much.

    Javascript can make it easier to deal with data but I guess that depends on what you're comfortable with.

    At a small scale I've seen just using a bunch of variables work too. But that tends to require more events.

    In practice I figure out what I want to do on paper first and how it should work. The last step is to figure out how to do it in construct using the least amount of features as possible.

  • Random without repeats can be accomplished with the Advanced Random plugin. I think it only works with numbers but you can create a lookup table to map it (0=a, 1=b, etc).

    You'll have to store the results of the random output in an array though.

  • Thank you R0J0hound and Fib

    I will check the better solution based on what you both suggested.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)