Search code examples
airconsole

Is it possible to have per-user persistent data with AirConsole?


I'm thinking of developing a game with AirConsole. I'm not sure if it's the right platform, though, since I need a way to save data to an object that is unique for each player, so I can save the player's data across game sessions. Here's what I want to do:

  1. While playing on one AirConsole with player B, player A unlocks an ability
  2. Player A disconnects from the AirConsole session, and later joins a game with player C
  3. Player A still has the ability unlocked from the previous time they played the game, while player C does not since they haven't played before.

What is the best way to do this securely and reliably?

Also, it would be great to see a way to do long-distance multiplayer come to AirConsole. This would let you put in a connect code in a desktop browser to have the console's screen mirrored so you could play with friends who aren't nearby.

And a way to run AirConsole from a laptop would be great too - at college the WiFi is too bad to play AirConsole on, and a way to host it locally on a separate router without an internet connection would be great


Solution

  • Persistent storage is available in the latest API, have a look at those methods

    airconsole.requestPersistentData
    airconsole.onPersistentDataLoaded
    airconsole.onPersistentDataStored
    airconsole.storePersistentData
    

    http://developers.airconsole.com/#!/api

    AirConsole does not provide anything so far to make your game an online multiplayer game. You would have to develop your own server-side solution and build your AirConsole game on top of it.