Forums

OverviewV-Play 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
    V-Play 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
    V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support