Any ideas on parallel computing?

0 favourites
  • 4 posts
  • Hi!

    I'm working on a game which has randomly generated levels. After the generation those leves go through another loops of optimisation and adding random stuff.

    Sometimes it takes more than 1,5 seconds to build a complete level which is not good for a continious and seamless gameplay.

    So I want to know if there is a way to do that generation on the background? Player will spend more than 1,5 seconds to beat that level which will be enough to generate the next one.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you use a array for the random generating.

    If so you can set a Global Variable with in it, the array "as json".

    Then you can carry that info over to the next level.

    So at the new level you can load the random level instantly by loading the variable back into the array as json.

    Then do your optimizing stuff and your set.

  • I'd say don't generate the whole level at once. Generate what's immediately on screen and then progressively generate the rest of it. The idea is to make it so the impact on the framerate is negligible. You could also generate the next level when the current level is done loading. There's probable a lot of ways to go about it.

    Actually doing parallel coding will require using javascript and even then it's not so simple.

  • I'd say don't generate the whole level at once. Generate what's immediately on screen and then progressively generate the rest of it.

    What a nice idea! Thank you )

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