Toby R's Recent Forum Activity

  • So shinkan recently challanged me in other thread as below and pointed to this thread:

    if you make a plugin that will let me unload any object from current layout at any time at runtime then I'm ready to pay 20$ for it or even more <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    It looks that I made it <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">. Here's a video of the first (working) test

    Subscribe to Construct videos now

    As you can see it works nicely. I just need add some more ACEs, ico and I'll release it. I think it should be available within few days.

    If anyone would like to discuss some details/ACEs/whatever in regards of this plugin, I'm available on my discord server (see footer).

  • You can save a single value or the entire array as JSON.

  • I made a plugin for this

  • - This looks great! I'm definitely going to consider this, as well. However, it looks like you still have to check if it's loaded or missing in this, too. Really what I want is to be able to save and load a game in a function without checks, whatsoever (that includes CHANGING said local storage and calling it from a function, expression, etc.)

    It's just the initial load. You do it only once at the start of the project to load previous app storage state.

    Once all is loaded, you can use Set/Get/Compare straight away without any checks and delays.

    "On missing data" condition just tells you that it's the very first time the app runs on this device (nothing has been saved yet), so it's just a helpful condition under which you can set the initial data in storage. You can think of this condition as "On very first app run".

    If you have any further doubts or questions just let me know, I'm happy to answer.

  • Working with LocalStorage isn't very comfy indeed. I made SyncStorage plugin which is sychronous, can encode data, works with local storage, files and external DBs to make my life easier.

    I submitted it to Scirra Store yesterday and it just got approved so you may want to read more on the store page: https://www.scirra.com/store/construct2 ... orage-3800

  • SyncStorage — Now for sale in the Scirra Store!

    https://www.scirra.com/store/construct2-plugins/syncstorage-3800

    <h3>What you buy here?</h3><div class="deshr"></div>

    • SyncStorage plugin for C2 (c2addon) and C3 (c3addon)
    • Save to LocalStorage example capx
    • Save to file example capx (export with NW.js for testing)

    <h3>What is SyncStorage?</h3><div class="deshr"></div><p>SyncStorage is memory storage which acts as a bridge for various databases like local storage, files or external DBs. In other words it's a substitute for LocalStorage plugin with additional features like data encoding and exporting data.</p><p>And most importantly it makes using any storage much more comfortable.</p><h3>Features / Why should I use SyncStorage instead of LocalStorage?</h3><div class="deshr"></div>

    • SyncStorage operates on data directly in the memory (fastest possible storage),
    • Unlike LocalStorage, SyncStorage is synchronous (get/set/compare functions work instantly),
    • Built-in data encoding feature (configurable),
    • Can save data to local storage or export as JSON (or encoded string) to be then saved to file or any external DB,
    • When using SyncStorage to save data to LocalStorage, it uses the official LocalStorage plugin's JS library (SyncStorage will always remain compatible with local storage even after LocalStorage library update/change),
    • Has user friendly ACEs, can easily compare two items from the storage, etc.

    <h3>Dependency</h3><div class="deshr"></div>

    • When working in LocalStorage mode, simply add official LocalStorage plugin to the project to load the LS JS library (see example capx).
    • When working in custom mode (save to file for instance) there is no dependency.

    Use this topic to leave comments, ask questions and talk about SyncStorage

  • These are one of the situations that made me make the Set plugin.

    It allows you to make ORs in very elegant way like this

    You can also do it with TR_System plugin which is free, but lacks of other Set plugin feature and has many other unrelated things built in.

  • I'd hold off until the new C3 runtime, and sdk comes out.

    This may mean to hold off even for some years as all we know about it is that it is in plans.

    If new runtime will be backward compatible then there will be no problem. If not, then all third party plugins will have to be rebuilt anyway and I'll deliver updates to mine ASAP.

    Either way I don't think it's wise to wait for an update about which we know absolutely nothing except that it probably will be released some day.

  • Are we talking about just webgl, or that, and canvas?

    I know that WebGL allows you to release the memory on request. Still in canvas you can drop the reference and so the data without any pointers will be cleaned by GC.

    Up to that C2 handles objects instances in a specific way with so-called "deathRow", etc. so I can't just wipe out the texture from the memory cause this will cause some issues probably. It must be done "gently" and the right way.

    That's just a theory for now. I haven't investigated anything yet.

  • I do believe the price tag for that plugin wasn't just set to get rich fast, but rather for the proper content of the plugin:)

    as of the object unloading, I'll just give you the link, will be faster that way.

    https://www.scirra.com/forum/request-quot-unload-from-memory-quot-action_t121551

    wow, just realize that post is 3 years old...

    Like always Ashley first misunderstood the question (like most people who post there) and then totally ignored it, but there are few good posts on later pages made by people who actually knows what they doing heh

    Alright I understand. I wouldn't say that Ashley missunderstood the question, he just don't see the valid use-case. In the example you gave, unloading unused objects wasn't necessary cause they could lay down in the memory idly and wait for the end of layout without any harm to the device or the project. Therefore Ashley's reply.

    BUT. Such unloading feature would be useful if for instance the memory limit would bee 150MB and you have to load 200MB for instance. Then first you load 100MB and turn to 16MB with Paster, then release unused 100MB and then load the remaining 100MB. This would allow you to load 200MB onto device with 150MB limit for instance.

    So yes I do see the usability and I will prepare such plugin soon. I'm finishing the SyncStorage plugin at the moment and then will take a look at this one. Will keep you updated.

  • Some users reported issues with downloading the example capx from Scirra servers so I've uploaded to my Gmail Drive.

    Example capx download

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • All I meant is that I'm not the one to spend money on something you can do yourself. Easy way or hard way.

    I assure you that you are not able to replicate MM_Preloader features with C2 events. I myself made an event based preloader module (before I made this plugin) and it was ~100 events which were covering just around 50% of MM_Preloader's possibilities.

    if you make a plugin that will let me unload any object from current layout at any time at runtime then I'm ready to pay 20$ for it or even more

    By "unload any object " you mean literally any object or sprites or audio? I've already created unload audio features in my experimental AudioPlus plugin, which shortly after were implemented into official Audio plugin. Unloading objects which are not image and sound related doesn't make much sense as they are very small. So I assume that you mean Sprites mainly and releasing images from the memory?

    Fair enough - Added onto my TODO list. Will let you know when it's out.

    Anonnymitet & BadMario you guys are both right and not. Let me explain.

    C2 indeed loads all the project assets at the very beginning as BadMario says but it has nothing to do with the between-layout lags and the fact that you BadMario haven't noticed it, means that you've simply never worked on big enough project as Anonnymitet says (or you have some crazy monster fast PC).

    The assets that C2 loads at the very beginning are compressed images, yet at start of each layout C2 grabs particular compressed images and decompress them into bitmaps, and that's the process that causes the lag. I wrote an article which mentions this as well, so you may want to have a read: Game loading time optimization

Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies