[Solved]Random map generation - Array - Tiles

0 favourites
From the Asset Store
A template which allows you to customise the controls of your game.
  • Wow thanks a lot Yann. You just gave me another way to look at it !

    I really appreciate that and will give it a try!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have been working on this all night, and now I think my brain is dying slowly lol

    (by the way Yann I tried CubeMaze and it's pretty awesome)

    https://dl.dropbox.com/u/89646560/Walker3.capx

    So here is what I came up with. I think I understand the principle, the problem is: I don't know how to get it to stop...

    When I run it it either fills my layout or not, depending of the direction.

    I read a lot of tutorial and array post, and nothing is really explaining how to make it add "1" in different direction (and keep going).

    By using "For each XY element", if it read the new value "1" that was created it either stops or fill the layout. If the "1" is place to the left or the top it is too late because the "For each XY element" already passed those cells.

    Would you be able to point me in the right direction, code wise, for:

    If I just told the system to add a 1 in the array to question that new XY and not keep going from left-right and top-down (as part of the "For each XY element".)

    I hope this is not too confuse, I am trying to explain what I think is happening, and what I think I read from your previous post.

    Let me know if I need to be more clear.

    Thanks for all the help !

    -Michael

  • https://dl.dropbox.com/u/23551572/C2/startingPoint.capx

    Wow ! Thanks Yann. By looking at the code I think I just learned a lot. There is a lot of expressions I didn't know in what situation to use them, even after reading the tutorial.

    I will recreate the code to learn it and play with it to create different things.

    I guess I will get use think a certain way by doing it stuff like this over and over.

  • Yann makes the best pancakes!

  • Wastrel and you haven't even tasted them yet!

  • Good day Yann,

    Thank you so much for helping me out on my map generation with the maze idea. Everything works well.

    I tried implementing longer road segment. It seems to work, but something is a bit wrong. Unfortunately, I am not sure what it is.

    It seems that it doesn't choose a new direction. When it stops there is still option to move the road around.

    Would you mind taking a look at my code for one sec and let me know if I misplace something ?

    https://dl.dropbox.com/u/89646560/Walker4.capx

    Cheers

    -Michael

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