rexrainbow's Recent Forum Activity

  • delgado

    shinkan provides a solution, or you might try rex_time_away plugin, they are almost the same.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • vybr

    rex_Date plugin and rex_time_away (stored in webstorage) plugin does.

    But rex_time_awayL (stored in localstorage) had not been tested yet.

  • Toddler

    sqiddster

    Aphrodite

    I had made a "cache" plugin of local storage. Does it look better?

  • Thanks for suggestion, I had made my first version of dictionary cache plugin.

    After loading cache completed, all read/write operations look likes synchronous.

    • Read had been done while cache loaded.
    • Writing actions in a tick would be fired at the same time ( in tick2() ). "Condition:On writing actions complete" will be triggered when all writing actions are done. User might wait this event or not.

    Data in local storage are-

    Sample capx , plugin.

    Edit

    The reading and writing actions of local storage are embedded inside this plugin. So it does not need to work with official localstorage plugin.

  • Ashley

    I could not get your point about writing.

    The writing action could be the same as local storage plugin. If the data had lose while using cache, it would be lose when using local storage plugin. Even "then" would lose them imo.

    The benefit of cache is to reduce the read complex.

    Edit:

    Writing action would update value in cache (memory) and also write it into local storage (disk).

  • Ashley

    "cache" is a small related data set. User picks this data set at the same time then read/write it (data in this set). Not to load whole storage data into cache imo. User could release it and reload new set manually.

    For writing action, each key-value is stored into different key of local storage, so that it does not write whole cache data into local storage, just one entry.

  • I had made a behavior which could predict the interception point of a target object. Here is a demo (sample capx).

    I prefer not to bind moving behavior which changing the position or angle of object, with strategy behavior which provide the reference information.

    For example, this behavior would provide a prediction position, and the moving behavior might use car behavior, custom moving, bullet+ set angle etc.

  • Update

    Add time away L plugin which get elapsed interval of turned off game from local storage.

  • A "cache" logic might reduce the response time and the complex of reading action.

    For example, a cache with dictionary structure -

    User could load this dictionary cache by reading all key-value pairs into memory, then these values could be read immediately.

    The structure stored in local storage might be

    • Index: A JSON sting to store the keys
    • Content: Key - value pairs

    Plugin first read index, then read all key-value pairs. And the manipulation of this dictionary cache is just like official dictionary object.

    Writing action might be triggered after ticking (in tick2() maybe), to write key-value pairs with dirty bit = 1.

  • I have another question-

    I set a value into webstorage every tick, it works fine.

    But in local storage, the hard disk rotates always with big noise.

  • It is reasonable, since the development team of scirra are only two people, they could not do all things.

    You might suggest that Ashley bought cocoonJS-Ludei, then C2 would have it's own wrapper.

  • indiegrimes

    It needs to get the position of the last character. I am not sure how hard to implement it in this behavior.

rexrainbow's avatar

rexrainbow

Early Adopter

Member since 4 Apr, 2011

Twitter
rexrainbow has 84 followers

Connect with rexrainbow

Trophy Case

  • 13-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies