TBSr's General Hopscotch Coding Topic


#123

Yeah, I have accessed the jsons several times before. Thanks for the tutorial


#124

This is interesting! I'm not quite sure how it would display volume though, if this does work. I'm not an expert at jsons and Hopscotch, though.


#125

Took a quick look. No control of the sound pressure level or decibels (typically dBA) are exposed.


#126

That's interesting, it sounds like it is more probably in the app itself.. (the JSON just has the data/contents for each project, and its blocks, its creator and things, doesn't it)


I would also like to thank you ThinBuffalo, I felt encouraged to peek around too after seeing what you'd been doing with the JSON files in Hopscotch :blush::blush::blush:


#127

@t1_hopscotch
I saw your topic. It's great that you're exploring the json data and "thinking outside the box". I didn't want to jump in as sometimes the act of discovery is a big part of the fun :smile:, but if you have any questions feel free to tag me. I'll be glad to help if I'm able to.


#128

@MR.GAM3R
I believe I'm just about ready to ask someone else to test the program I wrote to fix a project that's been inflated with unnecessary data. Are you interested in trying fix the project you previously mentioned that has severe editor lag?

I'm still finishing some testing, but I was able to reduce the size of one of my projects from 7.8 MB to 163 KB

Issues the program should fix:

  • severe editor lag
  • draft won't upload (if you put up with the lag long enough, the file will eventually get too large to upload)

For now I just need to know if you're interested & I'll let you know when it's ready and give instructions.


#129

Yes please! I will be more than happy to try it out for you. Looking forward to it :)


#130

@MR.GAM3R
I forgot to make sure that you have access to a Windows PC?

The program I created is a Windows exe.


#131

No, I don't, but I do have Winebottler which allows you to run .exe files on Mac. How does it work? Do you upload a file then it will generate the code?


#132

Ah. That will be a really good test then :smile:

For now, you save a local copy of Hopscotch project data via iTunes. Then just run the program, pick which file you want to "clean" & save it when done.

You may need to inspect the files first to figure out which file it is that needs to be cleaned. But it's obvious enough for me to just sort the the files by size from the file selection dialogue.

:thinking: That gives me a good idea. In an update, I'll think about adding an option to enumerate all the files in the project folder and display a list of the embedded project titles to choose from. (Edit: titles aren't included in the json :confused:)


#133

@MR.GAM3R
Ok. File size is significantly reduced, so for me, it will finally upload to the server. Editor lag returned to the normal amount of lag. And the project appears unaffected by my edits. :smiley:

Do you want to give this a try yet today? I just need to complile the exe & find a good way to share it...

Here's what it looks like (not fancy)


#134

Yeah, sure! Whenever it is ready. You can post it on Dropbox and share the link.


#135

Ok, @MR.GAM3R
Here's the link if I did it right:
(Removed by TBSr)

  1. Save Hopscotch project folder to local drive using iTunes (make a copy of the folder)
  2. Run exe
  3. Load file
  4. I suggest cleaning only "eventParameters" first (this may take a while for large files)
  5. Change checkboxes to only "traits" and clean again
  6. Save file
  7. Upload project folder back to iDevice using iTunes

Let me know how/if it works and any suggestions


#136

Thanks so much @ThinBuffalo! I will check it out and let you know what happens.


#137

@ThinBuffalo Your program is working pretty well on Winebottler. I tried loading up my project, but however when I tried the clean up I got this error message:

Then when I click OK the app quits. I tried this a few times, and no luck. That file was 4 MB. (Will try saving this file from iTunes again later.)

I had another draft lying around, that was 1 MB and had a bit of lag. Worked normally when I loaded that file on the program, cleaned up both eventParameters and traits, and it reduced the file size to 460.9 KB (about half). Uploaded it back to my iPad, everything seems to be working well (no broken references). I don't really know about lag for this project, it never was super laggy like my other project, but it's still a bit slow. This is probably normal because it has quite a few objects and code blocks.


#138

@MR.GAM3R
Would you be willing to either publish the project that causes the error & give me a link, or send me the project's json text file via Dropbox?

I'd like to try some troubleshooting and see why the error is thrown.


#139

Here it is. link

Let me know once you've saved it.


#140

@MR.GAM3R
Ok. I have a copy. Thank you.

I'll try troubleshooting it tomorrow. Was this project with severe editor lag that you orginally mentioned?


#141

@MR.GAM3R
I'm thinking it must be a problem related to using WineBottler. Your project cleans without error for me. 4 MBs reduced to 231 KB, and the editor lag is fixed.

I'll publish when we're both online & unpublish after you get a copy back.


#142

@Montoya
Any progress on a fix for the root cause of the keyvaluepair inflation?
I don't mean to harass, just curious.

BTW, it may not be optimized but my fix for the project files is simple & straight forward. Just remove any traits or eventParameters when the "id" isn't referenced elsewhere in the project. It looks like all of the traits & eventParameters that are used may be at the end of the respective value arrays (newest), but I haven't evaluated a large enough sample size to have any confidence of that. For now, I'm just enumerating & searching each id individually. For eventParameters this takes a while as I've seen projects with 10s of thousands eventParameters.