Giter Site home page Giter Site logo

Comments (2)

tommyettinger avatar tommyettinger commented on August 21, 2024

This is partially supported by squidlib-extra, at least long-term storage of various common data types. The mechanism here is libGDX's Preferences class for storing Strings, along with customized support for JSON stringification of data, plus a dependency on a lib I worked on called BlazingChain that compresses the Strings. The last one is important because on GWT targets, data saved by Preferences is limited to the size of what the browser allows for LocalStorage, and that's rather small for the one thing it can store, UTF-16-encoded text (5 MB is a common limit). Key rebinding is a significant task on its own, but it's something we should have, and something that should be store-able with squidlib-extra.

from squidlib.

tommyettinger avatar tommyettinger commented on August 21, 2024

This has been handled by Gdx Preferences for arbitrary things that can be saved as Strings; squidlib-extra wraps this somewhat in SquidStorage, but it's perfectly usable on its own without wrapping. Keybindings in particular now have their own saving system that can be shared between games that use SquidInput (plus a utility to remap the keys with a simple UI). In practice, the text compression (now in squidlib-util as LZSPlus) isn't very fast on GWT, but saving isn't always done especially often, and as an alternative, uncompressed saving is rather quick. Saving using libGDX's Json class, as SquidStorage does, relies on an odd method of reflection that can't access long fields, so work is in-progress to make long fields into pairs of int wherever they might need to be saved. I think this is close-able.

from squidlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.