re: How to generate level map?

0 favourites
  • 2 posts
From the Asset Store
A template which allows you to customise the controls of your game.
  • There was an interesting question posted asking for a solution for generating a branching path but seems the topic was deleted by the user jentry after he got a few solutions.

    Deleted topic:

    construct.net/en/forum/construct-3/how-do-i-8/generate-level-map-179620

    Oh well, I think he did that to me before after I posted a solution to one of his other topics. Actually, looking at his posting history he deletes everything. Good to know.

    Anyways!

    I thought the solution was interesting enough to post again. It generates branching paths like this:

    The algorithm I came up with starts with multiple parallel lines with nodes in columns, and it repeatedly collapses random adjacent nodes in the columns. This image roughly illustrates the algorithm:

    Download link. In code blocks because this forum breaks new dropbox links otherwise.

    https://www.dropbox.com/scl/fi/ukgwp8kful81ztfg7s3qc/branch_path_gen.capx?rlkey=nsyu7ofa95ie9sng6b7a0xeeb&dl=1

    There is probably cleaner ways to implement it.

    igortyhon also posted a solution but I didn't get a chance to download it.

    -cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I too believe there is a way to create a more elegant example.

    But that's what I created yesterday.

    File c3p

    I specially made a step-by-step generation with speed setting so that you could understand the mechanism better.

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