How do I generate a smart path without issues?

0 favourites
  • 5 posts
From the Asset Store
A smart joystick plugin, perfect for all mobile games.
  • Hey guys, i try to generate a smart path. So below what i need:

    Let's say we have 5 boxes:

    A B C D E

    Every 2 seconds will create a new box from A to E from bottom to top.

    Can create 1 or 2 , up to 5 at the same line / random creations of course.

    Examples:

    I hope make sense what i try. If can help i appreciate it. Many thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So what exactly do you need - to detect if a randomly generated board has a valid path, or to ensure that randomly generated board will always contain a valid path?

    In the latter case, you can create the valid path in advance, and then every 2 seconds reveal one box of this path, plus 0-4 random boxes.

  • Ok let's forget for now the 2 seconds.

    Imagine "on start of layout" to create 10 boxes from bottom to top.

    So what i need is to give me a correct path.

    Something like:

    ABCDE

    A____

    AB___

    _BC_E

    A_C_E

    __C__

    __C__

    _BCD_

    AB__E

    A__D_

    This is a correct path. I hope make sense now! :)

  • Sorry, but I still don't understand -

    A) Do you need to create a correct path? I.e. you need to generate a level which should definitely have a correct path from bottom to top.

    or

    B) Do you need to generate a random level, and then check if it contains a correct path?

    .

    If "A", then I would do something like this:

  • Basically it's to generate a random level but even your A) it's a good help. I will give a try. By the way, thanks again! :)

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