rhg1968's Recent Forum Activity

  • I am actually explicitly looking in the local files in a project for the json file. I can modify the code to be able to make external requests also.

  • The sample that I included seems to work for me so I'll have to look at that if that's not working for you

  • Was that your application or the sample one that I included ?

  • I just posted a json plugin last night. Maybe it will meet your needs

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are your json files in the files folder ?

    I didn't set up or test loading files from an external source, which in theory should work. However, additional work would be required to allow cross origin requests.

    Did you try the example I included, it works with files located locally in the projects ?

  • I did just post the plug in. I'm sure it may need some more functionality, but it appears to be working correctly. Please look at the included example project for details of how to use it.

  • I did just post the plug in. I'm sure it may need some more functionality, but it appears to be working correctly. Please look at the included example project for details of how to use it.

  • The plugin is for C3 just using the old runtime. I will shortly make work also for the new runtime that is currently in alpha.

    The new runtime is being fixed and improved at a rapid pace and Ashley has even said that people shouldn't be using the new runtime other than to play with it and help find bugs.

    I am just finishing up the documentation and I'll be releasing it shortly.

  • Just to give a quick update. I think the Json plugin is about done. And I am finishing up the documentation for it, so hopefully I'll have it up in the next day or two. Error handling is a little on the weak side, but I'll enhance that soon.

    Also I only implemented this for the c2 run time at the moment, but I will look at adding the c3 runtime soon. I'll post again when it's up in the repository.

  • Just to give a quick update. I think the Json plugin is about done. And I am finishing up the documentation for it, so hopefully I'll have it up in the next day or two. Error handling is a little on the weak side, but I'll enhance that soon.

    Also I only implemented this for the c2 run time at the moment, but I will look at adding the c3 runtime soon. I'll post again when it's up in the repository.

  • I am almost done with a JsonManager add on that I have been working on and will be adding it to the repository very soon. So far I have made it to help me with the game I have been working on, but once it's out I am more than willing to add additional functionality to it.

    So far it allows you to :

    1) Load multiple json files at the same time triggering an event when all have been loaded.

    2) When loading, you specify a slot name to load each json file into.

    3) You can query the json using standard notation like slot1.prop1.arr[2].name

    4) You can loop over an array sub object in the json using a query to specify where the array is.

    5) You get and set values in the json while looping on the current element.

    6) The plugin has a caching option that allows changes that are made during program execution to persist when you run again. This however never modifies the json file itself.

    7) There are options to reset a slot so it goes back to its original Json object.

    8) Option to clear a slot and remove it from the manager.

    9) You can specify a path to a sub object and have it copied into a new slot.

    10) There is a function to create a C3 array string based on a query that locates the array.

    11) There is a function to create a c3 dictionary string based on a query that locates the object to convert.

    This all is working at the moment and I am putting together a test c3p file to demo the features.

    I posted in the SDK forum about this a week ago but haven't had any responses to it yet, so I wasn't sure if there was much interest or not.

  • I am putting together a Json Manager Plugin for my own game and have gotten pretty far with it. I wanted to see if others would be interested in this when it is totally complete.

    The idea is to load Json objects from files into named slots, so that they can be referenced later in the event sheet.

    The goal is to allow access to items using standard Json object syntax for accessing properties and array items.

    So a sample json file would look like this.

    To specify Json files to load and the slots to put them in is done through the plugins properties like shown below. Using comma separated lists.

    To load the Json and access properties in an event sheet you can do

    You will notice that you load the json files and then an event is triggered when complete and a value is accessed within the object and array to display on the screen using standard Json syntax.

    Next steps:

    1) Add expressions to access array count based on a json path.

    2) Add a loop condition to iterate over an array based on a json path.

    3) Error handling.

rhg1968's avatar

rhg1968

Early Adopter

Member since 6 Jun, 2014

Twitter
rhg1968 has 9 followers

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies

Blogs