IndexedDB Pro
Welcome to IndexedDB Pro, an advanced high-performance local storage solution for Construct 3! Powered by the modern idb module, this plugin allows you to safely store massive amounts of data asynchronously without freezing or lagging your game.
Key Features
- Massive Storage: Store gigantic data, including Base64 strings or generated images from AI. Highly recommended to be paired with the Google Gen AI plugin.
- Asynchronous & Non-Blocking: Your game's framerate (FPS) will stay smooth, even when saving or loading heavy data.
- Cloud-Save Ready: Easily export your entire database into a single JSON string, making it incredibly easy to send to your server via AJAX or sync with Firebase/Firestore.
- Smart JSON Handling: Read, write, and update specific JSON properties directly without using complex array/dictionary loops.
Documentation (Actions & Features)
Category: Database Management
- Open Database: Opens a connection to the database and creates an object store. Note: If you add a new store name in an update, you must increase the Version number to force the browser to create it.
- Delete Database: Completely deletes the specified database from the user's browser.
Category: Quota Management API
- Check Storage Quota: Estimates the available and used storage space on the user's device. Results are accessible via the StorageQuotaFormatted and StorageUsageFormatted expressions (e.g., returns "208.03 GB").
Category: Data Operations
- Init Value: The smartest way to handle new players! It checks if a key exists; if it does, it gets the value. If it doesn't exist, it creates the key with your provided default value.
- Get Value: Retrieves data from a specific key.
- Put Value: Saves or overwrites data (numbers, strings, or JSON strings) into a specific key.
- Delete Value: Removes a specific key and its data from the store.
- Count Store: Returns the total number of items saved inside an object store.
Category: Queries & Indexing
- Get All Values: Retrieves everything inside a store and returns it as a single JSON Array string. Use the GetAllPropertyAt expression to easily read specific data from this array (perfect for Leaderboards or Inventories).
- Get From Index / Get All From Index: Advanced querying to search for data based on specific database indexes rather than primary keys.
Category: Advanced Utilities
- Export Store: Compiles all keys and values in a store into one master JSON string. Perfect for creating "Backup Save Data" text or sending data to a Cloud Server (AJAX/Firebase).
- Import Store: Restores data from a JSON string directly into your object store.
- Import Store From URL: Directly fetches and imports a JSON file from a web URL or a FileChooser Blob URL asynchronously, bypassing Construct 3's memory limits.
- Update JSON Property: Updates a single key inside a saved JSON object (e.g., updating only the "Gold" in a player's stats) without needing to overwrite the entire JSON string manually.
Expressions
- LastResult: Returns the data from your last Get, Init, or Export action.
- LastError: Returns the error message if an operation fails.
- GetJSONProperty(propertyName): Extracts a specific value directly from the LastResult if it is a JSON object.
- GetAllPropertyAt(index, propertyName): Magically extracts specific data from a JSON Array generated by "Get All Values" without needing the C3 Array plugin.
Credits & Support
- Core wrapper based on the incredible idb module by Jake Archibald.
- Plugin icon provided by Flaticon.
Want new features or a new custom plugin?
Support my work and request new features here:
☕ Buy me a coffee