Patrix Posted June 2, 2023 Share Posted June 2, 2023 Introduction NOTE: This module is installed by default in g2o client directly. This client-side module allows the server creators to utilize the LocalStorage API for serializing informations. The g2o platform doesn't support the file API from squirrel on client-side due to security reasons, so this project feels the gap of the missing feature. The API usage is very similar to the one from browser (the main inspiration came from it). The code doesn't give the user ability to save/load data, instead it exposes an API to get or set (create/update) values. The API itself will handle the saving data to a file LocalStorage.json, which will be located in this directory: Game/Multiplayer/store/ You can find more information about the exposed API under Exposed API section or in sqmain.cpp file. Project links: - Repository - Download Usage example LocalStorage.setItem("nickname", "Patrix") LocalStorage.setItem("password", "secret") print("My nickname is: \"" + LocalStorage.getItem("nickname") +"\"") print("My password is: \"" + LocalStorage.getItem("password") +"\"") 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.