Saving State and Object Collections

0 favourites
  • 5 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • FIRST THING!

    How are other people managing state. This is what I consider state to be for more games.

      Score Progress in Game Achieves HATS

    Has anyone tried tackling this? I think my crazy large solution will be to create a Azure web service, and have it store a app GUID and a small amount of meta data per user. No login or pass so your data is only as secure as how much you give out your guid. I think with some JSON behind the scene you can just write data to an array/dictionary as the game goes on, and then you can save it to the web service when online. Or save it to a file on dropbox maybe.

    SECOND ITEM!

    I have seen a couple of threads on object collections before, but I wanted to touch on them again.

    One thing that was always helpful when I would build games in XNA was the fact you can use classes to represent objects. You could easily group objects together to form complex ones.

    One example is a boss spaceship. It has many moving parts on it, all with different behavior and sprites. Like turrets, bullets, parts of the boss that move etc.

    This is more of a feature request than anything: I'd like some way to organize an object and attach it to other objects (not pinning). So if I have a boss enemy called Boss1 and I have a bunch of turrets attached to it, I would like to call them like this Boss1.Turrets[0].Angle or something along those lines. Basically the attached objects become part of the parent object allowing you to make complicated objects. Is there a way to do this already?

  • Most people use WebStorage to save data like this...

    If I am being ignorant, sorry, I don't know much about this web tech stuff :P

  • Physics Attachment ?

    Edit : Or you can make the BossShip Family !

  • Regarding your second request, what you are looking for is the 'Containers' feature, very commonly requested (It was in CC)

    A way to work around this is to give all the 'child' objects an instance variable called 'ParentUID' or something, which is set to the parent's UID at the start of layout. Then, when you want to pick the child of certain parent, you can pick the parent with that UID.

    In terms of attaching them together, image points are probably the best option ATM.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am going to kick around these ideas as much as I can.

    I haven't looked at WebStorage yet, I'm still getting used to the HTML5 world (coming from ASP.Net). I think what webstarage is doing, is standardizing page state? This way any browser should in theory be able to share these states. My idea was to shove that into the cloud with a key. So if you move around and you have your key, you can get your state anywhere. (Azure costs money use FYI).

    Alternately, you could just specify a google drive,mobile me, dropbox or skydrive folder to save the state to an XML file.

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