grossd's Recent Forum Activity

  • Hi all,

    Can someone explain to me what loopback.io is and whether this can be used to advantage in C2 to connect to cloud based databases using the Browser/Ajax plugins, somehow?

    Also, I have been reading a bit about node.js -- from what i gather its essentially a web server, and also includes a package manager to add packages to the server.

    Can I write node-webkit apps/games with C2, than could then also be deployed on a node.js server? Does this makes sense to do?

    Trying to get my head around all those technologies.

    My main objective is to create a simple browser plugin based approach to read/writing into a cloud database.

    Dan

  • Try Construct 3

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

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

    In the meantime I created my own C2 based "library" function to push and pop a set the path using an Array/Stack. It works pretty well ...

    so, whenever i descend I push the current last path element into a stack, and when i return from the decent i pop the stack, after each push and pop I set the path looping through the current elements in the stack (array).

    So, if you could implement a simple "pop" that would be great.

  • Thanks.

    What is the FGL plugin ... can i see examples somewhere

  • Hi,

    I'd like to use CloudBase.IO, a cloud based NoSQL DB, to store JSON data in the cloud (http://cloudbase.io/documentation/javas ... et-started).

    It looks rather simple to do. There are a number of js libraries, available in full text, defining various functions. I need to get those libraries included and the can call functions.

    I want to do this without! plugin programming using C2 facilities and existing plugins, such as external js calls, only! Can this be done?

    1. It is possible to include the libraries somehow in C2, so that the functions are available upon C2 start, and in particular in node-webkit.

    2. Is it possible to make JS library calls -- i presume that this is the easy part

    3. There is a need to response to call backs. Can this be done from C2.

    Or does this all require plugin programming (i.e. creation of a wrapper plugin) to make this work?

    thank you,

    Dan

  • all my keys are strings.

  • Thanks.

    Its like this:

    UserSession.addKey(gameMetric_n, m)

    UserSessions.addKey(Date1, UserSession.asJson)

    AllUsersSessions.addKey(userName, UserSessions.asJson)

    and a few more like these nested within UserSession

    In the end i stored AllUsersSessions.asjson into a text file.

    So, the total outcome appears like nested wrapped C2 Json

  • Thanks.

    In the end I (nested) looped (with conditions) through all the dictionary structures and used the JSON plugin to recreate JSON. Took some time to work out.

    Would there be value to have a compatible JSON export on dictionaries and arrays?

  • Hi,

    A useful feature for my purposes would be to set the path to one "level' back.

    So, if the path is set as follows:

    JSON: Set Current Path to root@"my","path","to","an","array"

    setCurrentPath_one_back

    would set it as so:

    "my","path","to","an"

    this is very useful for when you loop though complex structures and need to "automatically" back up one step, before going down several path steps again.

    Dan

  • Hi (@Ashley),

    I have quite a bit of trouble with moving data via JSON export from Dictionaries and Arrays to other programs. I need to reparse all my structure to generate "genuine" JSON, and am still working on this code and its brittle. Its all lots of recursive structures, five levels down with an element of dynamism (some are four or three levels down, and some are five).

    It would be really great, if there was a JSON export geared for interoperability without C2s Dictionary and Array wrappers. This could then be imported straight into other programs -- such as Mathematica (where i want to do all the data visualization).

    thanks,

    Dan

  • Thanks ggibson1

    Reloading into C2 works very well for me too. Just when I try to load the JSON into mathematica with Import, the nested JSON isn't recognized as an association, but as a string.

    Testing with a number of other JSON parsers, I get similar results.

    Perhaps some JSON parsers are more robust to unusual input than others ...

    p.s. BTW, i just ran my nested JSON through Lint and it only recognizses the top level keys.

  • Hi,

    I explorted into a text file a recursive JSON string I got from a dictionary which includes JSON strings as value. However, JSON parsers have trouble parsing the JSON, including the Mathematica JSON import parser -- sometimes only the first key is recognized, and Mathematica seems to view the whole JSON file as one big string.

    any thoughts on that would be appreciated,

    Dan

  • Perhaps you are right,

    In my case I have a following structure (All are dictionaries, and "varying game section" stats an Array, say, someone drops something X times during a game section, and i capture when (in seconds since game section start) each drop happened):

    User-Groups->Users->UserGamePlayedDate-Time>TotalGameStats->GameSectionsStats->VaryingGameSectionStats

    I need to analyze this data from various perspectives, such as improvements over time of individual users; average comparisons between user goups, etc. and graph it using charts (I am using the canvas chart plugin).

    Programming everything individually with loops can be pretty tedious. I am hoping that a map reduce implementation will make the code shorter and simpler.

    Dan

grossd's avatar

grossd

Member since 4 Feb, 2014

Twitter
grossd has 1 followers

Trophy Case

  • 12-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies