Tour Preview

Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › Saving in the game

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16048

    Deef

    Hello. I apologize for writing through an interpreter. I have a question: how do I save the whole state of the game? It turns out to save only certain properties of objects. And how to save dynamic objects created through EntityManager? And also their properties? There is a desire to create a step-by-step strategy or RPG, and this knowledge will be very useful to me.

    In advance thanks for the answer!

    #16051

    Günther
    Felgo Team

    Hi Deef!

    You can locally store game data with the Storage component. It allows saving custom game properties as key-value pairs, but can also store complex JSON data structures by converting from/to JSON when storing or loading data (this is automatically done internally).

    For dynamically created entities, it is required to memorize the created entities/types and their state/position, which then allows you to manually re-create them when loading the data. This is also what our Level Editor does when storing/loading levels, so you can also use the Level Editor for storing the state of your game (think of the game state as the “level” you load/save, but without an editor to configure or adding entities).

    So I suggest to either implement a custom saving/loading for your use-case or re-use the Level Editor features for that.

    Cheers,
    Günther from Felgo

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

RSS feed for this thread

You must be logged in to reply to this topic.