Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › Integrate User-Created Levels into Game

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5059

    phil.jahoda

    I was wondering what the best approach might be to integrate the user created levels into the already existing level structure?

    As some of you might know, our game “CrazyElephant” already contains 40 developer-designeg levels divided into 2 packages (20 each).

     

    We have a scene in our game where you can select a certain package, and in this scene I want to add another button to display a list of all the user created levels.

    So far so good.

     

    But all our developer-designed levels are .qml files, which are simply set as the source of the Loader component in our gamescene.

    Is it possible to create actual .qml files out of levels designed by the level editor?

    Or is it somehow (other than setting the .qml sourec of the Loader) possible to load user created levels with the already existing Loader element in our gamescene?

     

    #5061

    Christian
    Felgo Team

    Hi Phil,

    you have the option to use both .qml files and also use .json files exported with the LevelEditor as described in the LevelEditor documentation. Please also see the LevelEditor example and the new Squaby source code of the daily build, which contain both versions.

    So for compatibilty reasons, you can still use your old qml files, but for newly created ones I would recommend using the levels from json files. These have the advantage that you can use entity pooling, which is not possible when loading static qml files with a loader and thus gives you much faster loading times!

    Cheers, Chris

    #5063

    phil.jahoda

    Allright.

     

    Basically I have a game scene, in which is a Loader element. For my previous levels I simply changed the source of the Loader element in my gamescene to “load” a new level and the game started.

    In a totally different scene I have my LevelEditor where I create my levels. Is there still a possibility to use the self created levels in my gamescene?

     

    #5065

    phil.jahoda

    The best solution for us would be to simply export the levels created by the LevelEditor as .qml files to our levels folder, so that we can load them in our game scene. But that is not possible is it?

    #5070

    Christian
    Felgo Team

    Please do have a look at the LevelEditor example, which shows how to load both static qml levels and dynamic json levels. Instead of your custom Loader element, use the LevelLoader element as described in the docs and done in the LevelEditor example and Squaby.

    Cheers, Chris

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded